Navigation
Nouveautés
Bibliothèques :
aptitude install git-core wget unzip bzip2 build-essential
mkdir /root/sources && cd /root/sources
git clone git://git.videolan.org/x264.git cd x264 ./configure --prefix=/tmp/codecs --enable-static make && make install
wget http://downloads.sourceforge.net/faac/faac-1.28.tar.bz2 tar -jxvf faac-1.28.tar.bz2 cd faac-1.28 sed -i '126d' ./common/mp4v2/mpeg4ip.h deb:~/src$ ./configure --prefix=/tmp/codecs --enable-shared=no --enable-static=yes make && make install
wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.bz2 tar -jxvf faad2-2.7.tar.bz2 cd faad2-2.7 ./configure --prefix=/tmp/codecs --enable-shared=no --enable-static=yes make && make install
wget http://downloads.xiph.org/releases/ao/libao-1.1.0.tar.gz tar -zxvf libao-1.1.0.tar.gz cd libao-1.1.0 ./configure --prefix=/tmp/codecs --enable-shared=no --enable-static=yes make && make install
wget http://downloads.xiph.org/releases/ogg/libogg-1.2.2.tar.gz tar -zxvf libogg-1.2.2.tar.gz cd libogg-1.2.2 ./configure --prefix=/tmp/codecs --enable-shared=no --enable-static=yes make && make install
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz tar -zxvf libvorbis-1.3.2.tar.gz cd libvorbis-1.3.2 ./configure --prefix=/tmp/codecs --enable-shared=no --enable-static=yes make && make install
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz tar -zxvf libtheora-1.1.1.tar.gz cd libtheora-1.1.1 ./configure --prefix=/tmp/codecs --enable-shared=no --enable-static=yes --with-ogg=/tmp/codecs/ --with-vorbis=/tmp/codecs make && make install
wget http://downloads.xvid.org/downloads/xvidcore-1.3.1.tar.gz tar -zxvf xvidcore-1.3.1.tar.gz cd xvidcore/build/generic ./configure --prefix=/tmp/codecs make && make install
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz tar -zxvf lame-3.98.4.tar.gz cd lame-3.98.4 ./configure --prefix=/tmp/codecs --enable-shared=no --enable-static=yes make && make install
wget http://webm.googlecode.com/files/libvpx-v0.9.6.tar.bz2 tar -jxvf libvpx-v0.9.6.tar.bz2 cd libvpx-v0.9.6 ./configure --prefix=/tmp/codecs make && make install
git clone git://github.com/FFmpeg/FFmpeg.git cd FFmpeg
./configure --prefix=/usr/local/ffmpeg --disable-ffprobe --disable-ffplay --disable-ffserver --disable-devices --disable-network --enable-libx264 --enable-libfaac --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-libxvid --enable-libvpx --enable-gpl --enable-nonfree --enable-pthreads --extra-cflags='-I/tmp/codecs/include/ -I/tmp/codecs/include/ao -I/tmp/codecs/include/lame -I/tmp/codecs/include/ogg -I/tmp/codecs/include/vorbis -I/tmp/codecs/include/theora -I/tmp/codecs/include/vpx' --extra-ldflags='-L/tmp/codecs/lib -static'
make && make install
Le binaire de FFmpeg incluant tous les codecs est désormais disponible. Il n'est lié à aucune librairie externe et
peut-être déployé seul sur des architectures similaires à celle où il a été compilé.
ldd usr/localffmpeg/bin/ffmpeg n'est pas un exécutable dynamique
ffmpeg -i video_in.avi -acodec libfaac -ar 44100 -ab 128k -ac 2 -vcodec libx264 -r 24 -s 640x360 -b 2496k -bt 1024k -y video_out.mp4
Puisque vous avez compilé avec l'option –enable-pthreads, si votre processeur est multithreadé (processeurs multi-coeur ou disposant de l'hyper-threading) vous pouvez en profiter dans l'encodage x264. Pour ce faire rajoutez simplement l'option “ -threads 0 ” dans votre ligne de commande.