[FFmpeg-user] Difference between FFmpeg Formats/Containers MP4 and H264

Roger rogerx.oss at gmail.com
Sun May 15 05:57:48 EEST 2022

>MP4 can contain a variety of streams, including h264. If you specify h264,
>you just have a raw h264 video stream, that's it.

I've always used -f h264 until I ran into Hauppauge WinTV Version 10 using:

ffmpeg -i "[SOURCE_FILE]" -f mp4 -vcodec libx264 -preset ultrafast -profile:v main -acodec aac "[DEST_FILE].mp4

On the flip, I've never seen a *.h264 file name.

If I'm not mistaken, the "-f" specifies the format or the container of the 
video/audio stream.

So when specifying, "-f h264", format is assuming a video only container?

More information about the ffmpeg-user mailing list