问题描述
我试图在trusty /Ubuntu 14.04中安装ffmpeg,并得到以下消息:
$sudo apt-get install ffmpeg
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ffmpeg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ffmpeg' has no installation candidate
为什么不提供这个软件包?
最佳解决思路
最新消息
-
WEB UPD8:FFmpeg使用Ubuntu 15.04 Vivid Vervet返回到官方的Ubuntu软件源
FFmpeg和libav
来自Ubuntu储存库的libav
Ubuntu开始在recent releases中运送libav分支而不是FFmpeg。如果你安装了ffmpeg package,那么你实际上安装了libav-tools package和一个程序,告诉你将来使用avconv
而不是ffmpeg
,给人的印象是ffmpeg已被弃用,事实并非如此。
过渡性的ffmpeg
软件包似乎已经从trusty /Ubuntu 14.04中删除(比较the source package的可靠性和可信度的软件包文件列表)。
因此,一种选择是安装libav-tools软件包并改用avconv
(注意,这不是”mainline” FFmpeg,而是一个突出的分支)。
Launchpad上的PPA中的FFmpeg
另一种选择是使用提供FFmpeg的PPA。请查看FFmpeg download页面以了解可用的PPA和包装的详细信息。如果他们仍然是最新的,你应该每隔一段时间检查一次PPA。
相关问题:
从源代码安装
另一种选择是安装FFmpeg依赖包,然后手动编译+从源代码安装。
使用静态构建
尽管从包装的角度来看它可能看起来有些尴尬,但您也可以使用来自可信来源的静态构建。在我的情况下,我将FFmpeg Windows 32位和64位二进制文件以及x264-10位二进制文件保存在一个文件夹中,以便在需要时在Wine或Windows中运行它们。
The following is what I could find, when researching this topic. I haven’t been following the development of both projects closely and it is not my intention to blame anyone. You as a reader shouldn’t do either.
fork 是怎么发生的?
维基百科表示,2011年3月13日宣布分叉项目以及最初发布的版本,但是还有更多事情正在进行。
通过Git提交进行提交
-
2011年1月18日 – 提交f4f5cab94e0881cd30965b28f3d78d9c63d6918e从
MAINTAINERS
文件中删除FFmpeg项目负责人Michael Niedermayer。 -
2011年7月27日 – commit 6291d7e41605c0b1e9debfae8a2b1d4cf7b0e0b3
avconv
介绍:使用新名称 – avconv复制ffmpeg。它将会进一步发展并带来一些不兼容的变化。 ffmpeg.c将保持原有状态一段时间,所以使用它的任何脚本都不会被破坏。 -
2011年7月27日 – commit 791a86c37a03b94207bc2d0ad4cbe7f39d7e495a
ffmpeg.c
源代码的分叉版本中添加了一条警告,这可能会误导未注意到叉的用户,并且他们不再使用FFmpeg。 -
2012年1月12日 – 提交0fec2cb15cc6ff1fcc724c774ec36abadcb7b6ad
ffmpeg.c
已从源代码中删除。
官方公告libav.org
以下帖子来自新闻栏目(历史最悠久):
August 09 2011
Updated on 12.09.2011.
For consistency with our new name we have renamed ffplay to avplay, ffserver to avserver and ffprobe to avprobe. Their behavior is the same, just the names were changed.
With ffmpeg (the command line tool) we decided to use this opportunity to fix some longstanding usability problems, which involves breaking compatibility. Therefore we have added a new tool named avconv which is based on ffmpeg, but has a different (hopefully more powerful and easier to use) syntax for some options. ffmpeg will be kept in its current state for some time, so no scripts or frontends using it will break. However it will not be developed further.
Differences between avconv and ffmpeg are:
[…]
Note that the avconv interface is not considered stable yet. More incompatible changes may come in the following weeks. We will announce here when avconv is stable.
而在2011年早些时候:
Mar 18, 2011
We have just pushed another point release from our 0.6 release branch: Libav 0.6.2. This is another maintenance-only release addressing two security issues.
From now on, we will be using our new project name libav. But don’t worry, compared to the preceding release 0.6.1, the only functional changes are the two security fixes for the VC1 and APE decoders. This means that libav provides a painless drop-in replacement for existing FFmpeg installations.
Moreover, we are proud to accompany this source release with executables and libraries for the win32 platform. These binaries include H.264 encoding using the bundled x264 library. Enjoy!
Distributors and system integrators are encouraged to update and share their patches against our release branches.
Mar 17, 2011
We have just pushed another point release from our 0.5 release branch: FFmpeg 0.5.4. This is another maintenance-only release that addresses a number of security issues.
Distributors and system integrators are encouraged to update and share their patches against our release branches.
March 13, 2011
We, as a group of FFmpeg developers, have decided to continue developing FFmpeg under the name Libav. All existing infrastructure will be transferred to the libav.org domain.
- Website: http://www.libav.org/
- Git: git://git.libav.org/libav.git (see http://libav.org/download.html)
- FATE: http://fate.libav.org/
- Roundup: https://roundup.libav.org/
- Patchwork: http://patches.libav.org/
- Mailinglists: http://lists.libav.org/ (developer list: libav-devel@libav.org)
You can update your git repository using the following command:
git remote set-url origin 'git://git.libav.org/libav'
For now we are still reachable over FFmpeg’s mailing lists and IRC channels but we will migrate to libav.org counterparts. For a transition period both the website and source might still contain references to FFmpeg. These will disappear over time, except where historically relevant.
February 24, 2011
FFmpeg development has moved to Git, and the SVN repository is no longer updated. The SVN repository may be removed in a near future, so you’re recommended to use a Git repository instead.
The last revision committed to SVN was r26402 on 2011-01-19 and replaced the svn:external libswscale with a standalone copy.
请注意,FFmpeg开发事实上已经转移到了Git仓库,并且有两个Git仓库。请参阅相应的项目下载页面。
次佳解决思路
ffmpeg
在之前版本中由libav项目中的avconv
程序替换。
要安装avconv
,您需要安装libav-tools
软件包:
sudo apt-get install libav-tools
avconv
与ffmpeg
非常相似,但它们在语法上也有一些差异。
编辑:看来Ubuntu 16.04LTS在他们的仓库中再次ffmpeg
,所以libav-tools是一个虚拟软件包,只创建一个别名avconv -> ffmpeg
(和其他人)
第三种解决思路
ffmpeg已经删除了Ubuntu的repo,而不是libav。你应该添加ppa:
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg gstreamer0.10-ffmpeg
看你的输出
第四种思路
您也可以使用此PPA:ppa:jon-severinsson/ffmpeg
编辑:这个ppa已经从Launchpad中删除,我不知道为什么。取而代之的是,您可以使用samrog131 PPA(用于Trusty,Utopic& Vivid)
sudo add-apt-repository ppa:samrog131/ppa
sudo apt-get update
sudo apt-get install ffmpeg-set-alternatives
PPA还包含其他可能不需要的软件包。安装完成后卸下ppa。
sudo add-apt-repository --remove ppa:samrog131/ppa
sudo apt-get update
第五种思路
自从Debian存储库一段时间以来,FFMPEG包已被删除。还有一个ongoing debate关于再次在软件仓库中包含软件包。 Ubuntu作为Debian衍生产品,取决于上游做出的决定。很久以前,这个软件包只是空着,依赖于libav。 2012年5月12日,当这个软件包被删除并从档案中删除时,这一情况发生了变化:
libav (6:0.8.99-1537-gacb2c79-1) experimental; urgency=low
* New upstream snapshot
- Drop patches applied upstream
- Longer build libpostproc, dropped upstream
- follow soname bump of libavcodec and libavformat 53->54
- New library: libswresample
* no longer build and use dirac, removed upstream in favor of libschroedinger
* remove deprecated ffmpeg package
* bump shlibs version
-- Reinhard Tartler <siretart@tauware.de> Sat, 12 May 2012 22:02:03 +0200
第六种思路
试图运行时出现同样的错误
sudo apt-get install ffmpeg
所以我结合了其他一些答案,以及this site的内容,以获得以下适用于我的配方:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:mc3man/trusty-media # ignore warning if not found
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install ffmpeg
现在我可以看到已经安装了ffmpeg:
sudo find / -type f -name "ffmpeg"
返回/opt/ffmpeg/bin/ffmpeg
在bash提示符下,命令ffmpeg
现在可以从任何文件夹中运行。