Compile FFmpeg on Ubuntu Lucid Lynx 10.04 LTS
来源:互联网 发布:女生降低体脂率 知乎 编辑:程序博客网 时间:2024/04/29 21:13
https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuideLucid
Compile FFmpeg on Ubuntu Lucid Lynx 10.04 LTS
Contents
- Preparation
- Installation
- Finish
- Optional Installation
- Updating FFmpeg
- Reverting Changes Made by This Guide
- If You Need Help
This guide supports Ubuntu Lucid Lynx 10.04 LTS. If you are using a different Ubuntu version see the main Compile FFmpeg on Ubuntu Guide. This guide will enable several external encoders and decoders: libfaac (AAC encoder),libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired.
Note: Copy and paste the whole code box for each step.
Preparation
Remove any existing packages:
sudo apt-get remove ffmpeg x264 libx264-dev yasm
Get the dependencies (Ubuntu Desktop users):
sudo apt-get updatesudo apt-get install -y build-essential git-core checkinstall texi2html libfaac-dev \ libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \ libvorbis-dev libx11-dev libxfixes-dev pkg-config zlib1g-dev
Get the dependencies (Ubuntu Server or headless users):
sudo apt-get updatesudo apt-get install -y build-essential git-core checkinstall texi2html libfaac-dev \ libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev pkg-config zlib1g-dev
Installation
Yasm
Yasm is an assembler and is recommended for x264 and FFmpeg.
cdwget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gztar xzvf yasm-1.2.0.tar.gzcd yasm-1.2.0./configuremakesudo checkinstall --pkgname=yasm --pkgversion="1.2.0" --backup=no --deldoc=yes --default
x264
H.264 video encoder. The following commands will get the current source files, compile, and install x264.
cdgit clone --depth 1 git://git.videolan.org/x264cd x264./configure --enable-staticmakesudo checkinstall --pkgname=x264 --default --pkgversion="3:$(./version.sh | \ awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes
Note: See using snapshots if you are having connection issues with the Git server.
LAME
MP3 audio encoder.
sudo apt-get remove libmp3lame-devsudo apt-get install nasmcdwget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gztar xzvf lame-3.99.5.tar.gzcd lame-3.99.5./configure --enable-nasm --disable-sharedmakesudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.99.5" --backup=no --default \ --deldoc=yes
libvpx
VP8 video encoder and decoder.
cdgit clone --depth 1 http://git.chromium.org/webm/libvpx.gitcd libvpx./configuremakesudo checkinstall --pkgname=libvpx --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no \ --default --deldoc=yes
FFmpeg
cdgit clone --depth 1 git://source.ffmpeg.org/ffmpegcd ffmpeg./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \ --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx \ --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grabmakesudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \ --deldoc=yes --defaulthash x264 ffmpeg ffplay ffprobe
Note: Ubuntu Server users should omit --enable-x11grab.
Finish
Installation is now complete and FFmpeg is now ready for use. You can keep the x264, libvpx, and ffmpeg directories in your home directory if you plan on updating later. See Updating FFmpeg below for more details. Some optional steps are next followed by instructions on updating FFmpeg and finally instructions on reverting all changes made by this guide.
Optional Installation
qt-faststart
This is a useful tool if you're showing your H.264 in MP4 videos on the web. It relocates some data in the video to allow playback to begin before the file is completely downloaded. Usage: qt-faststart input.mp4 output.mp4.
cd ~/ffmpegmake tools/qt-faststartsudo checkinstall --pkgname=qt-faststart --pkgversion="$(./version.sh)" --backup=no \ --deldoc=yes --default install -Dm755 tools/qt-faststart /usr/local/bin/qt-faststart
Add lavf support to x264
This allows x264 to accept just about any input that FFmpeg can handle and is useful if you want to use x264 directly.
cd ~/x264make distclean./configure --enable-staticmakesudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \ awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \ --fstrans=no --default
Updating FFmpeg
Development of FFmpeg and x264 is active and an occasional update can give you new features and bug fixes. First, remove some packages and then update the dependencies:
sudo apt-get -y remove ffmpeg x264 libx264-dev libvpx-devsudo apt-get updatesudo apt-get install -y build-essential git-core checkinstall texi2html libfaac-dev \ libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \ libvorbis-dev libx11-dev libxfixes-dev pkg-config zlib1g-dev
x264
cd ~/x264make distcleangit pull
Now run ./configure, make, and make install as shown in the Install x264 section.
libvpx
cd ~/libvpxmake cleangit pull
Now run ./configure, make, and make install as shown in the Install libvpx section.
FFmpeg
cd ~/ffmpegmake distcleangit pull
Now run ./configure, make, and make install as shown in the Install FFmpeg section.
Reverting Changes Made by This Guide
To remove FFmpeg/x264 and other packages added for this guide:
sudo apt-get remove x264 ffmpeg qt-faststart build-essential git-core checkinstall \ nasm yasm texi2html libfaac-dev lame-ffmpeg libsdl1.2-dev libtheora-dev libvorbis-dev \ libx11-dev libxfixes-dev zlib1g-dev
Lastly, delete the x264, libvpx, and ffmpeg directories in your home folder.
If You Need Help
Feel free to ask your questions at the #ffmpeg IRC channel or the ffmpeg-user mailing list.
- Compile FFmpeg on Ubuntu Lucid Lynx 10.04 LTS
- Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04 LTS
- [zz]Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04
- Ubuntu 10.04 LTS (Lucid Lynx) 正式发布
- Ubuntu 10.04 LTS - Lucid Lynx安装GeForce4 MX440 With AGP8X显卡
- Ubuntu 10.04 LTS - Lucid Lynx控制台显示中文的处理方法
- 惊艳的Ubuntu 10.04 Lucid Lynx
- Ubuntu 10.04 Lucid Lynx Beta 2发布
- Compile FFmpeg on Ubuntu
- Compile FFmpeg on Ubuntu
- Compile FFmpeg on Ubuntu
- Middle Button Scroll and Disabling Touchpad on IBM Ultranav USB Keyboard SK-8845 – Ubuntu Linux 10.04 Lucid Lynx
- How to compile and debug VLC player source code in eclipse IDE on Ubuntu 10.04 (lucid)?
- How to compile and debug VLC player source code in eclipse IDE on Ubuntu 10.04 (lucid)
- Compile Linux Kernel on Ubuntu 12.04 LTS
- Ubuntu 10.04.2 LTS(lucid)下多个workspace之间无法切换
- Howto install Sun Java Runtime Environment (JRE) in Ubuntu 10.04 (Lucid Lynx)
- Compile FFmpeg on Ubuntu, Debian, or Mint
- 新站可以考虑从长尾关键字来做SEO
- 机器学习中的各种距离
- 发布高质量外链的绝佳时间点
- [IOS] viewDidLoad
- .NET 下使用 log4net
- Compile FFmpeg on Ubuntu Lucid Lynx 10.04 LTS
- ABAP关系运算符
- 内容管理系统 Ametys
- MFC实现QQ抖动
- ffmpeg编译安装支持视频常用格式
- “指定的元素已经是另一个元素的逻辑子元素,请先将其断开连接”问题的解决方法
- Java 枚举类型
- RAC 监听的BLOCKED状态
- 个人站长创业失败的原因总结