VideoReader provide wrong number of frames
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I want to extract frames from a .mpg video file, and I use VideoReader to read the video file. But the number of frames obtained using this way seems not correct. As shown in the figure, the frame rate and duration of the video are 29.9 FPS and 606s, respective. But the number of frames is 1211, which is obviously not correct. I also tried another .mp4 file, this problem is solved. Does this problem arise from .mpg format? If so, could anyone please tell me how to obtain the correct information from .mpg files?

4 comentarios
Jan
el 9 de Jul. de 2022
Many programs import files even if they contain errors in the header by replacing them with feasable values. So maybe use another software to read the header and compare it with the real number of frames.
Walter Roberson
el 9 de Jul. de 2022
mpg files can be variable frame rate. 29.97 would be the nominal frame rate.
Respuestas (0)
Ver también
Categorías
Más información sobre Audio and Video Data en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!