ffmpeg没有找到vcodec libx264

问题描述 投票:11回答:5

我安装了最新的ffmpeg,但似乎无法找到视频编解码器。我是否需要完全删除ffmpeg并重新运行./configure以便ffmpeg找到视频编解码器?

这是我目前的配置:

FFmpeg version git-f61cbc2, Copyright (c) 2000-2011 the FFmpeg developers built on Jan 18 2011 10:59:49 with gcc 4.0.1 (Apple Inc. build 5465) configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 libavutil 50.36. 0 / 50.36. 0 libavcore 0.16. 1 / 0.16. 1 libavcodec 52.108. 0 / 52.108. 0 libavformat 52.94. 0 / 52.94. 0 libavdevice 52. 2. 3 / 52. 2. 3 libavfilter 1.74. 0 / 1.74. 0 libswscale 0.12. 0 / 0.12. 0

或者,我可以重新运行make命令来包含库吗?

这是我的代码转换代码段:

ffmpeg -i ~/Desktop/watercarts.mov -vcodec libx264 -b 250k -bt 50k -acodec libfaac -ab 56k -ac 2 -s 480x320 ~/Desktop/watercartsipod.mp4

而错误:

Unknown encoder 'libx264'

先感谢您。

ffmpeg video-encoding libavcodec
5个回答
6
投票

你需要配置./configure --enable-gpl --enable-libx264,你需要最近的x264。


24
投票

在Ubuntu 10.10(maverick)中,这个编解码器由来自multiverse存储库的libavcodec-extra-53包提供。


3
投票

尝试使用apt-get install进行安装,而不是通过编译源代码。它将下载所有必要的编解码库(至少在我的gubuntu上)


1
投票

如果您使用的是ubuntu(各种版本),可以使用此建议使用lib x264安装ffmpeg

http://ubuntuforums.org/showthread.php?t=1117283

我个人使用选项“C”。两个简单的命令(复制和粘贴),自动安装正确的版本+库,没什么可编译的,一切正常:)

如果您更喜欢编译,那么在同一页面上有“A”选项(它适用于ubuntu 10.10我编译了最后一个版本)。


1
投票

我在link to a binary static build上发现了一个this forum,它完全开箱即用!

长话短说

$ wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
$ tar xvf ffmpeg-release-amd64-static.tar.xz
$ cd ffmpeg-4.1.1-amd64-static

$ ./ffmpeg
ffmpeg version 4.1.1-static https://johnvansickle.com/ffmpeg/
...
© www.soinside.com 2019 - 2024. All rights reserved.