![Ubuntu 12.10 量子服务器上的 ffmpeg2](https://linux22.com/image/970019/Ubuntu%2012.10%20%E9%87%8F%E5%AD%90%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E7%9A%84%20ffmpeg2.png)
目前我只能通过存储库 ppa:samrog131/ppa 安装 ffmpeg2。
为什么它不起作用?在各个网站上都说 ppa 适用于 ubuntu 12.10。我做错了吗?因为它是从标准 ubuntu 存储库 (0.8.6) 安装 ffmpeg
希望有人能帮忙 :/
答案1
ffmpeg-real
apt-cache show ffmpeg-real
描述:多媒体播放器、服务器和编码器
FFmpeg 是一个完整的跨平台解决方案,用于记录、转换和传输音频和视频。
这是真正的 ffmpeg。二进制文件安装到 /opt/ffmpeg/bin。手册页安装到 /opt/ffmpeg/share/man。
ffmpeg 安装到 /opt。它不会替换 ffmpeg 的官方 Ubuntu 版本。ffmpeg 版本 2 将使用以下命令启动:
/opt/ffmpeg/bin/ffmpeg
ffmpeg 可以通过命令‘ffmpeg’和 Debian 替代方案(另一个包)启动:
ffmpeg 设置替代方案
apt-cache show ffmpeg-set-alternatives
描述:用于创建 ffmpeg 的 Debian 替代品的包。
用于创建和删除 ffmpeg 替代方案的辅助包。
Debian 替代系统 (man update-alternatives):
可以同时在单个系统上安装多个具有相同或类似功能的程序。例如,许多系统会同时安装多个文本编辑器。这为系统用户提供了选择,允许每个用户根据需要使用不同的编辑器,但如果用户未指定特定的首选项,程序将很难为要调用的编辑器做出良好的选择。Debian 的替代系统旨在解决这个问题。
该软件包为 ffmpeg、ffplay、ffprobe 和 ffserver 创建了替代方案。
当这个包被删除时,替代品也将被删除。
可以通过命令行(man update-alternatives)或kalternatives来配置替代方案。
一个例子
开始情况:从 Ubuntu 官方存储库安装 ffmpeg 软件包。
:~$ ffmpeg
ffmpeg version 0.8.6-6:0.8.6-0ubuntu0.12.10.1, Copyright (c) 2000-2013 the Libav developers
built on Apr 2 2013 17:02:16 with gcc 4.7.2
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
ffmpeg-set-alternatives 推荐kalternatives。
kalternatives 是:
apt-cache show kalternatives
Description: graphical alternatives system configuration tool
Kalternatives offers a GUI to configure the alternative systems (a
system that allows you to select one alternative file for many in the
filesystem).
Kalternatives is available as KDE configuration module, integrated by default
into KDE's System Settings.
.
This is an advanced GUI of the update-alternatives program shipped with dpkg.
另外还有以下替代方案:
apt-cache show galternatives
Description: graphical setup tool for the alternatives system
A GUI to help the system administrator to choose what program
should provide a given service.
.
This is a graphical front-end to the update-alternatives
program shipped with dpkg.
使用选项 --no-install-recommends 安装 ffmpeg-set-alternatives
sudo apt-get install ffmpeg-set-alternatives --no-install-recommends
The following NEW packages will be installed:
ffmpeg-real ffmpeg-set-alternatives libavcodec55-ffmpeg libavdevice55-ffmpeg
libavfilter3-ffmpeg libavformat55-ffmpeg libavutil52-ffmpeg
libpostproc52-ffmpeg libswresample0-ffmpeg libswscale2-ffmpeg
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,105 kB of archives.
After this operation, 16.2 MB of additional disk space will be used.
...
Setting up ffmpeg-set-alternatives (0.1~quantal~ppa1) ...
update-alternatives: using /usr/bin/ffmpeg to provide /usr/local/bin/ffmpeg (ffmpeg) in auto mode
update-alternatives: using /usr/bin/ffplay to provide /usr/local/bin/ffplay (ffplay) in auto mode
update-alternatives: using /usr/bin/ffprobe to provide /usr/local/bin/ffprobe (ffprobe) in auto mode
update-alternatives: using /usr/bin/ffserver to provide /usr/local/bin/ffserver (ffserver) in auto mode
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
现在有选项(列表):
update-alternatives --list ffmpeg
/opt/ffmpeg/bin/ffmpeg
/usr/bin/ffmpeg
选择所需的 ffmpeg(配置)
sudo update-alternatives --config ffmpeg
There are 2 choices for the alternative ffmpeg (providing /usr/local/bin/ffmpeg).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/ffmpeg 20 auto mode
1 /opt/ffmpeg/bin/ffmpeg 10 manual mode
2 /usr/bin/ffmpeg 20 manual mode
Press enter to keep the current choice[*], or type selection number: 1
update-alternatives: using /opt/ffmpeg/bin/ffmpeg to provide /usr/local/bin/ffmpeg (ffmpeg) in manual mode
...并且 ffmpeg 命令告诉(在这里):
:~$ ffmpeg
ffmpeg version 2.0.2 Copyright (c) 2000-2013 the FFmpeg developers
built on Oct 9 2013 20:12:01 with gcc 4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1)
configuration: --prefix=/opt/ffmpeg --libdir=/opt/ffmpeg/lib/ --enable-shared --disable-stripping --enable-gpl --enable-version3 --enable-runtime-cpudetect --enable-postproc --enable-x11grab --enable-libcdio --enable-vaapi --enable-vdpau --enable-bzlib --enable-gnutls --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libfaac --enable-libvo-aacenc --enable-nonfree --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfdk_aac --enable-libopus --enable-pthreads --enable-zlib --enable-libvpx --enable-libfreetype --enable-libpulse
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'