mdsh.com/wiki


RecentChanges

TextFormattingRules
AllWikiTopics
OrphanedWikiTopics
ToDoWikiTopics
WikiLockList
RSS
Export2HTML

WikiSearch

SetUsername

StartingPoints
Home
FFmpeg:compiling

Ubuntu 12.10


Get tools to build the source:

sudo apt-get -y install \
build-essential yasm \
autoconf libtool pkg-config \
texi2html bison flex m4 \
subversion git-core \
checkinstall


Get pre-built libraries:

sudo apt-get -y install \
libmp3lame-dev libmp3lame0 \
libbz2-dev \
libxvidcore-dev libxvidcore4 \
libvorbis-dev libvorbis0a libvorbisenc2 libvorbisfile3 \
libopenjpeg-dev libopenjpeg2 \
libspeex-dev libspeex1 \
libtheora-dev libtheora0 \
libfaac-dev libfaac0 \
libgsm1-dev libgsm1 \
libdirac-dev libdirac-encoder0 libdirac-decoder0 \
vflib3-dev


Build libraries


Decide and create the place where you are going to do all your building, and set an environment variable so that it is easy to script the install:

export PREFIX=$HOME/share/ffmpeg-build
mkdir -p $PREFIX/src


libx264


cd $PREFIX/src
git clone git://git.videolan.org/x264.git
cd x264
./configure \
--prefix=$PREFIX \
--enable-static \
--disable-lavf
make -j4
sudo checkinstall \
--pkgname=ffmpeg_build_libx264 \
--pkgversion="3:$(date +%Y%m%d%H%M)-$(./version.sh | awk -F'[" ]' '/POINT/{print $4"+git"$5}')" \
--backup=no \
--fstrans=no \
--nodoc \
--default


note: You could build a 10 bit version by adding the bit-depth option, if required

--bit-depth=10


libvpx


cd $PREFIX/src
git clone http://git.chromium.org/webm/libvpx.git
cd libvpx
./configure \
--prefix=$PREFIX
make -j4
sudo checkinstall \
--pkgname=ffmpeg_build_libvpx \
--pkgversion="1:$(date +%Y%m%d%H%M)-$(git rev-parse --short HEAD)-git" \
--backup=no \
--fstrans=no \
--nodoc \
--default


ffmpeg


cd $PREFIX/src
tsocks git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure \
--cpu=i686 \
--enable-static \
--extra-cflags='-I$PREFIX/include' \
--extra-libs='-L$PREFIX/lib' \
--prefix=$PREFIX \
--enable-ffplay \
--enable-ffprobe \
--enable-gpl \
--enable-nonfree \
--enable-pthreads \
--enable-libfaac \
--enable-libgsm \
--enable-libmp3lame \
--enable-libopenjpeg \
--enable-libspeex \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libxvid \
--enable-libfreetype
sudo checkinstall \
--pkgname=ffmpeg_build_ffmpeg \
--pkgversion="1:$(date +%Y%m%d%H%M)-$(./version.sh)" \
--backup=no \
--fstrans=no \
--nodoc \
--default


Compile for 32bit on a 64bit system


FFmpeg's onfigure script will select the correct architecture for your system's default
compiler if you do not explicitly set a compiler with
--cc=


To compile for 32bit on a 64bit system, you can for example use:
./configure - -cc='cc -m32'


FFmpeg:compiling is mentioned on: FFmpeg


VeryQuickWiki Version 2.8.1 | Admin

All contents copyright mdsh.com (C) 2011-2018.