VideoReader has no available frames
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Clyde Webster
el 20 de Sept. de 2018
Respondida: Clyde Webster
el 24 de Oct. de 2018
Hi, I'm experiencing an issue with VideoReader in R2018a on Windows 10 where I create a VideoReader object, but then no frames are available to work with i.e. hasFrames(v) = 0. I'm not performing any other operations on the object before trying to use available frames. Trying an implay on the object after reading results in "Invalid Video Data - must be a numeric or logical type data". Using readFrame on the object results is "No more frames available to read from file". The same function on the same video works in Ubuntu 16.04 with the same version of matlab (R2018a). So I'm thinking it might be a windows 10 compatibility thing...
Any help would be greatly appreciated.
0 comentarios
Respuesta aceptada
Más respuestas (1)
KSSV
el 26 de Sept. de 2018
vidObj = VideoReader('C:\Users\Public\Videos\Sample Videos\Wildlife.wmv');
numFrames = 0;
while hasFrame(vidObj)
F = readFrame(vidObj);
numFrames = numFrames + 1;
imagesc(F)
drawnow
end
numFrames
1 comentario
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!