[FFmpeg-user] converting to h.264 using ffmpeg

Mike Scheutzow mike.scheutzow at alcatel-lucent.com
Wed May 23 14:58:23 CEST 2012


sudan landge wrote:
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample_mpeg4.mp4':
>   ...
>     Stream #0:1(eng): Video: mpeg4 (Advanced Simple Profile) (mp4v /
> 0x7634706D), yuv420p, 190x240 [SAR 1:1 DAR 19:24], 341 kb/s, 30 fps,
> 30 tbr, 30 tbn, 1k tbc

Adding to what Carl already told you:

Your input file does not contain h264 video, it contains 'mpeg4 part 2' 
video. So you can't just *copy* the video stream out of this file and 
expect to have a valid h264 file.

 >     Stream #0:1(eng): Video: mpeg4 (Advanced Simple Profile) (mp4v /

This line will say 'Video: h264' if your input file actually has an h264 
video stream. In that case, your original command line should work.

If your ffmpeg was compiled to support libx264, you can transcode from 
mp4v to h264:

ffmpeg -i infile.mp4 -an -vcodec libx264 -crf 23 outfile.h264


Mike Scheutzow


More information about the ffmpeg-user mailing list