here I have three ways to get an H264 file, like all forensic scientists, I am very curious about the differences between them:
1.
ffmpeg -i video.mp4 video.h264
2.
ffmpeg -i video.mp4 -vcodec copy -an -f h264 video.h264
3. Using the example "demuxing_decoding.c" provided on the ffmpeg official website: http://ffmpeg.org/doxygen/trunk/demuxing_decoding_8c-example.html
Obviously, the first one does the transformation, and the second one does the demuxing. They render different H264 files which however have similar file sizes(in my case, it's about say 24 MB). Suprisingly, the third one, which is also supposed to do the demuxing job, renders an H264 file with 8.4 GB! Why?
What I wondered is really, how the interiors of these three methods work?(The third one is already in source code, therefore it's quite easy to have an insight) What about the first two commands? What APIs are called when executing these two commands and how those APIs are called(namely, in what kind of sequences they are called) and things like that. One thing that is also important to me is, i have no idea how I can trace the execution routines of ffmpeg command lines. I want to see what's going on behind ffmpeg commands in source code version. Is it possible?
I appreciate any comment.