[FFmpeg-user] Converting to h264

Mike Scheutzow mike.scheutzow at alcatel-lucent.com
Mon May 9 18:14:50 CEST 2011


Cecil Westerhof wrote:
> I was told to make mp4 files. I did, but now at the client I find out
> that the format is wrong.

This confusion happens a lot, because client's don't always specify 
whether they are referring to the container or to the codec. You have to 
ask.


> My files have the following format:
>     Stream #0.0(und): Video: mpeg4,       yuv420p, 1028x795 [PAR 1:1 DAR 1028:795], 1085 kb/s, 15 fps, 15 tbr, 15 tbn,  15 tbc
> but what they need is:
>     Stream #0.0(eng): Video: h264 (High), yuv420p,  640x480 [PAR 1:1 DAR 4:3],        30 kb/s, 10 fps, 10 tbr, 10k tbn, 20 tbc
> 
> I tried several things, but until now with no avail.
> 
> I tried for example:
> ffmpeg -i afspraak.mp4 -vcodec copy -vbsf h264_mp4toannexb -an of.h264


You can not use '-vcodec copy' to convert from 'Video: mp4' to 'Video: 
h264'. These video types are different and have incompatible binary formats.

You need to do a full re-encode, typically using '-vcodec libx264', 
along with the additional command line arguments that codec requires.

Either mp4 video or h264 video can be stored in a .mp4 container.


Mike Scheutzow


More information about the ffmpeg-user mailing list