Adminbuntu

Everything for the Ubuntu Server Administrator

User Tools

Site Tools


Sidebar

Server Administration


Server Applications


At the Command Line


Elsewhere


Copyright 2013 Applied Conscious Technologies, LLC

Terms of Agreement

Contact


submit to reddit

ffmpeg

Server Applications

Ffmpeg

The distributions ffmpeg package can be somewhat lacking for advanced uses.


Installation

The following guide provides an excellent guide on how to download, make and install ffmpeg and associated commands.

https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide

x264 Encoding Guide

AAC Encoding Guide

Installation Script

Tested on 12.04 LTS Ubuntu Server

First Install Prerequisites

sudo aptitude -y safe-upgrade
sudo aptitude -y install autoconf automake build-essential git libass-dev libgpac-dev \
  libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev \
  libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev checkinstall

The Script

THIS SCRIPT NEEDS ADDITIONAL WORK AND TESTING. NOT READY FOR USE.

#
# Build ffmpeg on Ubuntu Server
#
#
#
# from: https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
 
#
# download, build and install yasm
#
echo "***download, build and install yasm***"
mkdir ~/build
cd ~/build
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
./configure
make
sudo checkinstall --pkgname=yasm --pkgversion="1.2.0" --backup=no --deldoc=yes --fstrans=no --default
cd ~/build
rm yasm-1.2.0.tar.gz
 
#
# download, build and install x264
#
echo "***download, build and install x264***"
cd ~/build
git clone --depth 1 git://git.videolan.org/x264.git
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
 
 
#
# download, build and install fdk-aac
#
echo "***download, build and install fdk-aac***"
cd ~/build
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
 
 
 
#
# download, build and install libvpx
#
echo "***download, build and install libvpx***"
cd ~/build
git clone --depth 1 http://git.chromium.org/webm/libvpx.git
cd libvpx
./configure --disable-examples --disable-unit-tests
make
sudo checkinstall --pkgname=libvpx --pkgversion="1:$(date +%Y%m%d%H%M)-git" --backup=no \
  --deldoc=yes --fstrans=no --default
 
 
 
#
# download, build and install ffmpeg
#
echo "***download, build and install ffmpeg***"
cd ~/build
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame \
  --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex --enable-librtmp --enable-libtheora \
  --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="7:$(date +%Y%m%d%H%M)-git" --backup=no \
  --deldoc=yes --fstrans=no --default
hash -r
 
 
#
# download, build and install qt-faststart
#
echo "***download, build and install qt-faststart***"
cd ~/build/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

ffmpeg.txt · Last modified: 2015/05/31 21:20 (external edit)