I noticed if I extract frames with this command:
ffmpeg -i sample_nosound.mp4 $filename%03d.jpg
It will extract depends on fps by default. ffmpeg -i
shows this video has 6 fps, so it extracted 1630 jpg frame files, which 1630/6 = 271.6 seconds equivalent to the 4:32 total video duration.
But 1630 jpg frames total size is 13 MB:
$ du -h extracted_jpg_folder
13M extracted_jpg_folder
, while the file size of the mp4 is 1.8 MB, far lower than the total frames size:
$ ls -la sample_nosound.mp4
-rw-rw-r-- 1 xiaobai xiaobai 1814889 Feb 13 15:42 'sample_nosound.mp4'
That means ffmpeg extract frames by referring fps info.
Therefore my question is, how to make ffmpeg extract frames by "real frames" without rely on fps ?
I expect I can get total frames size which almost equivalent with the mp4 files size.
I don't expect exact match file size, since mp4 may contains some metadata.