简体   繁体   中英

FFMPEG and H264 encode mp4

I tried to encode a video mov to mp4 width h264 codec but I get this error :

Unknown encoder 'libx264'

But when I check if h264 if supported by my config I saw it does :

DVD h264 H.264 / AVC / MPG-4 AVC/ MPEG-4 part 10

and my code :

FFMPEG -y -i video.mov -vcodec h264 video.mp4 ;

Can someone help me with this ? Thanks.

Run ffmpeg -codecs ; it will list all the supported codecs, and make sure you have libx264 which is the name of the H.264 encoder. The decoder in ffmpeg is named h264 .

If you are compiling ffmpeg you need to compile and install x264 and then compile ffmpeg using compile options --enable-gpl --enable-libx264 . See Compile FFmpeg on Ubuntu Hardy Heron or How to quickly compile libx264 . Alternatively, you can use an already compiled static build .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM