我已经从 https://github.com/FFmpeg/FFmpeg 安装了 ffmpeg 3.0 ,我正在尝试将使用 mepeg4 第 2 部分编码的视频转换为 H264,但我得到了 Unknown encoder 'libx264'
错误
这是我的命令:(我尝试了 h264、x264、libx264,但都没有工作)
ffmpeg -i Fashion.divx -acodec aac -vcodec libx264 out.mp4
我检查了支持的编解码器列表
Codecs:
D..... = Decoding supported
.E.... = Encoding supported
..V... = Video codec
..A... = Audio codec
..S... = Subtitle codec
...I.. = Intra frame-only codec
....L. = Lossy compression
.....S = Lossless compression
-------
D.VI.. 012v Uncompressed 4:2:2 10-bit
这是h264:
D.V.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_vdpau)
我正在使用 ffmpeg 3.0,从该列表中,似乎不支持使用 h264 编码,仅支持解码 h264,对吗?
我尝试使用本指南启用 h.264
How to quickly compile FFmpeg with libx264 (x264, H.264)
./configure --enable-gpl --enable-libx264
我明白了
./configure --enable-gpl --enable-libx264
ERROR: libx264 not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
我应该怎么做才能使 h.264 中的编码视频工作?
最佳答案
好的,我刚发现需要单独安装libx264,命令如下
sudo apt-get install yasm libvpx. libx264.
确实在安装libx264之后,我得到了
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_vdpau ) (encoders: libx264 libx264rgb )
关于ffmpeg - 如何使用 ffmpeg 对 H.264 中的视频进行编码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37066553/