How to extract the "real frames" without rely on fps? 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.
You don't quite understand how this works.
h.264 doesn't save single images, but much rather one image, than f.e. 4 estimations what should come after.

For example:
Imagine a ball rolling from left to right, you could noe either store 30 frames of the ball rolling, or you store 1 frame of the ball in the beginning and one in the end, and when you play the video, just take the first image, and copy the ball a bit to the right.

This means, that I Frame compression can be smaller, than single frames.