Created
September 27, 2012 14:09
-
-
Save codyeatworld/3794218 to your computer and use it in GitHub Desktop.
Install FFMpeg, x264, fdk-aac, libvpx, qt-faststart.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Notes: | |
# ----------------------------------------------------------------- | |
# Ubuntu 12.04 | |
# Sep 27, 2012 | |
# ----------------------------------------------------------------- | |
# I followed the instructions located on their website. | |
# https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide | |
# | |
# I ran into the following errors. | |
# ----------------------------------------------------------------- | |
# 1. ERROR: ffplay did not exist | |
# fix: apt-get libsdl1.2-dev | |
# | |
# 2. ERROR: Xfixes not found | |
# fix: apt-get libxfixes-dev | |
# | |
# They have already been applied. | |
# This has been tested on a linode! | |
# ----------------------------------------------------------------- | |
namespace :ffmpeg do | |
desc "Install x264, fdk-aac, libvpx, and FFMpeg with qt-faststart." | |
task :install, roles: :app do | |
# Remove any existing packages: | |
run "#{sudo} apt-get -y autoremove autoconf build-essential checkinstall git libfaac-dev libgpac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libtheora-dev libtool libvorbis-dev pkg-config texi2html yasm zlib1g-dev libsdl1.2-dev libxfixes-dev" | |
run "#{sudo} apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev" | |
# Get the dependencies | |
run "#{sudo} apt-get -y install autoconf build-essential checkinstall git libfaac-dev libgpac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libtheora-dev libtool libvorbis-dev pkg-config texi2html yasm zlib1g-dev libsdl1.2-dev libxfixes-dev" | |
# Install x264 | |
# H.264 video encoder. The following commands will get the current source files, compile, and install x264. | |
run "#{sudo} rm -rf ~/x264" | |
run "cd && git clone --depth 1 git://git.videolan.org/x264" | |
run "cd ~/x264 | |
&& ./configure --enable-static | |
&& make | |
&& #{sudo} checkinstall --pkgname=x264 --pkgversion=\"3:$(./version.sh | awk -F'[\" ]' '/POINT/{print $4\"+git\"$5}')\" --backup=no --deldoc=yes --fstrans=no --default" | |
# Install fdk-aac | |
# AAC audio encoder. | |
run "#{sudo} rm -rf ~/fdk-aac" | |
run "cd && git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git" | |
run "cd ~/fdk-aac | |
&& autoreconf -fiv | |
&& ./configure --disable-shared | |
&& make | |
&& #{sudo} checkinstall --pkgname=fdk-aac --pkgversion=\"$(date +%Y%m%d%H%M)-git\" --backup=no --deldoc=yes --fstrans=no --default" | |
# Install libvpx | |
# VP8 video encoder and decoder. | |
run "#{sudo} rm -rf ~/libvpx" | |
run "cd && git clone --depth 1 http://git.chromium.org/webm/libvpx.git" | |
run "cd ~/libvpx | |
&& ./configure | |
&& make | |
&& #{sudo} checkinstall --pkgname=libvpx --pkgversion=\"1:$(date +%Y%m%d%H%M)-git\" --backup=no --deldoc=yes --fstrans=no --default" | |
# Install FFMpeg. | |
# This requires x264, fdk-aac and libvpx! | |
run "#{sudo} rm -rf ~/ffmpeg" | |
run "cd && git clone --depth 1 git://source.ffmpeg.org/ffmpeg" | |
run"cd ~/ffmpeg | |
&& ./configure --enable-gpl --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3 | |
&& make | |
&& #{sudo} checkinstall --pkgname=ffmpeg --pkgversion=\"5:$(date +%Y%m%d%H%M)-git\" --backup=no --deldoc=yes --fstrans=no --default | |
&& hash x264 ffmpeg ffplay ffprobe" | |
# 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. | |
run "cd ~/ffmpeg | |
&& make tools/qt-faststart | |
&& #{sudo} checkinstall --pkgname=qt-faststart --pkgversion=\"$(date +%Y%m%d%H%M)-git\" --backup=no --deldoc=yes --fstrans=no --default install -Dm755 tools/qt-faststart /usr/local/bin/qt-faststart" | |
end | |
after "deploy:install", "ffmpeg:install" | |
end | |
# ----------------------------------------------------------------- | |
# Raw commands. | |
# ----------------------------------------------------------------- | |
sudo apt-get -y install autoconf build-essential checkinstall git libfaac-dev libgpac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libtheora-dev libtool libvorbis-dev pkg-config texi2html yasm zlib1g-dev libsdl1.2-dev libxfixes-dev | |
cd && git clone --depth 1 git://git.videolan.org/x264 | |
cd ~/x264 && ./configure --enable-static && make && sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes --fstrans=no --default" | |
cd && git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git | |
cd ~/fdk-aac && autoreconf -fiv && ./configure --disable-shared && make && sudo checkinstall --pkgname=fdk-aac --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default" | |
cd && git clone --depth 1 http://git.chromium.org/webm/libvpx.git | |
cd ~/libvpx && ./configure && make && sudo checkinstall --pkgname=libvpx --pkgversion="1:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default" | |
cd && git clone --depth 1 git://source.ffmpeg.org/ffmpeg | |
cd ~/ffmpeg && ./configure --enable-gpl --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3 && make && sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default && hash x264 ffmpeg ffplay ffprobe" | |
cd ~/ffmpeg && make tools/qt-faststart && sudo checkinstall --pkgname=qt-faststart --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default install -Dm755 tools/qt-faststart /usr/local/bin/qt-faststart" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment