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

Roger rogerx.oss at gmail.com
Sat May 14 21:01:55 EEST 2022


What are the differences when specifying the format/contain as MP4 or H264?  
Are there any differences, when additionally specifying the video and audio 
codecs?

$ ffmpeg-formats |grep mp4 
 D  mov,mp4,m4a,3gp,3g2,mj2 QuickTime / MOV
  E mp4             MP4 (MPEG-4 Part 14)

MPEG-4 Part 14
https://en.wikipedia.org/wiki/MPEG-4_Part_14
Laste published release: January 2020; 2 years ago

$ ffmpeg-formats |grep h264
 DE h264            raw H.264 video

Advanced Video Coding
https://en.wikipedia.org/wiki/Advanced_Video_Coding
Last published version: 22 August 2021


So what are the differences between the following?

$ ffmpeg -i video-in.ts -f mp4 -vcodec libx264 -preset ultrafast -profile:v main -acodec aac video-out.mp4

$ ffmpeg -i video-in.ts -f h264 -vcodec libx264 -preset ultrafast -profile:v main -acodec aac video-out.mp4


Roger



More information about the ffmpeg-user mailing list