简体   繁体   English

FFMPEG和H264编码mp4

[英]FFMPEG and H264 encode mp4

I tried to encode a video mov to mp4 width h264 codec but I get this error : 我试图将视频mov编码为mp4宽度h264编解码器,但我收到此错误:

Unknown encoder 'libx264'

But when I check if h264 if supported by my config I saw it does : 但当我检查h264是否支持我的配置时,我看到它:

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 ; 运行ffmpeg -codecs ; it will list all the supported codecs, and make sure you have libx264 which is the name of the H.264 encoder. 它将列出所有支持的编解码器,并确保你有libx264这是H.264编码器的名称。 The decoder in ffmpeg is named h264 . ffmpeg中的解码器名为h264

If you are compiling ffmpeg you need to compile and install x264 and then compile ffmpeg using compile options --enable-gpl --enable-libx264 . 如果要编译ffmpeg,则需要编译并安装x264,然后使用编译选项--enable-gpl --enable-libx264编译ffmpeg。 See Compile FFmpeg on Ubuntu Hardy Heron or How to quickly compile libx264 . 请参阅在Ubuntu Hardy Heron上编译FFmpeg如何快速编译libx264 Alternatively, you can use an already compiled static build . 或者,您可以使用已编译的静态构建

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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