FFMpeg : Différence entre versions

De Wiki levelKro
m
 
(2 révisions intermédiaires par le même utilisateur non affichées)
Ligne 7 : Ligne 7 :
 
=== Préparation du système ===
 
=== Préparation du système ===
 
Assurez-vous d'êtres à jour et d'avoir vos librairies requises installés.
 
Assurez-vous d'êtres à jour et d'avoir vos librairies requises installés.
{{Code|
+
<pre>yum update
code=yum update
+
yum install autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel</pre>
yum install autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel}}
 
 
N'oubliez pas de créer le dossier de travail.
 
N'oubliez pas de créer le dossier de travail.
{{Code|code=mkdir ~/ffmpeg_sources}}
+
<pre>code=mkdir ~/ffmpeg_sources</pre>
 
=== Installation de NASM ===
 
=== Installation de NASM ===
{{Code|cd ~/ffmpeg_sources
+
<pre>cd ~/ffmpeg_sources
 
wget http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2
 
wget http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2
 
tar xjvf nasm-2.13.02.tar.bz2
 
tar xjvf nasm-2.13.02.tar.bz2
Ligne 20 : Ligne 19 :
 
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
 
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
 
make
 
make
make install}}
+
make install</pre>
 
=== Installation de YASM ===
 
=== Installation de YASM ===
{{Code|cd ~/ffmpeg_sources
+
<pre>cd ~/ffmpeg_sources
 
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
 
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
 
tar xzvf yasm-1.3.0.tar.gz
 
tar xzvf yasm-1.3.0.tar.gz
Ligne 28 : Ligne 27 :
 
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
 
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
 
make
 
make
make install}}
+
make install</pre>
 
Nettoyer les traces de l'installation native de NASM.
 
Nettoyer les traces de l'installation native de NASM.
{{Code|yum remove nasm && hash -r}}
+
<pre>yum remove nasm && hash -r</pre>
 
=== Installation de x264 (H.264) ===
 
=== Installation de x264 (H.264) ===
{{Code|cd ~/ffmpeg_sources
+
<pre>cd ~/ffmpeg_sources
 
git clone --depth 1 http://git.videolan.org/git/x264
 
git clone --depth 1 http://git.videolan.org/git/x264
 
cd x264
 
cd x264
 
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
 
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
 
make
 
make
make install}}
+
make install</pre>
 
=== Installation de x265 (H.265) ===
 
=== Installation de x265 (H.265) ===
{{Code|cd ~/ffmpeg_sources
+
<pre>cd ~/ffmpeg_sources
 
hg clone https://bitbucket.org/multicoreware/x265
 
hg clone https://bitbucket.org/multicoreware/x265
 
cd ~/ffmpeg_sources/x265/build/linux
 
cd ~/ffmpeg_sources/x265/build/linux
 
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
 
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
 
make
 
make
make install}}
+
make install</pre>
 
=== Installation de AAC ===
 
=== Installation de AAC ===
{{Code|cd ~/ffmpeg_sources
+
<pre>cd ~/ffmpeg_sources
 
git clone --depth 1 https://github.com/mstorsjo/fdk-aac
 
git clone --depth 1 https://github.com/mstorsjo/fdk-aac
 
cd fdk-aac
 
cd fdk-aac
Ligne 52 : Ligne 51 :
 
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
 
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
 
make
 
make
make install}}
+
make install</pre>
 
=== Installation de Lame (MP3) ===
 
=== Installation de Lame (MP3) ===
{{Code|cd ~/ffmpeg_sources
+
<pre>cd ~/ffmpeg_sources
 
wget http://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
 
wget http://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
 
tar xzvf lame-3.100.tar.gz
 
tar xzvf lame-3.100.tar.gz
Ligne 60 : Ligne 59 :
 
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm
 
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm
 
make
 
make
make install}}
+
make install</pre>
 
=== Installation de Opus ===
 
=== Installation de Opus ===
{{Code|cd ~/ffmpeg_sources
+
<pre>cd ~/ffmpeg_sources
 
wget https://archive.mozilla.org/pub/opus/opus-1.2.1.tar.gz
 
wget https://archive.mozilla.org/pub/opus/opus-1.2.1.tar.gz
 
tar xzvf opus-1.2.1.tar.gz
 
tar xzvf opus-1.2.1.tar.gz
Ligne 68 : Ligne 67 :
 
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
 
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
 
make
 
make
make install}}
+
make install</pre>
 
=== Installation de Ogg ===
 
=== Installation de Ogg ===
{{Code|cd ~/ffmpeg_sources
+
<pre>cd ~/ffmpeg_sources
 
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz
 
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz
 
tar xzvf libogg-1.3.3.tar.gz
 
tar xzvf libogg-1.3.3.tar.gz
Ligne 76 : Ligne 75 :
 
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
 
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
 
make
 
make
make install}}
+
make install</pre>
 
=== Installation de Vorbis ===
 
=== Installation de Vorbis ===
{{Code|cd ~/ffmpeg_sources
+
<pre>cd ~/ffmpeg_sources
 
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.gz
 
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.gz
 
tar xzvf libvorbis-1.3.5.tar.gz
 
tar xzvf libvorbis-1.3.5.tar.gz
Ligne 84 : Ligne 83 :
 
./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared
 
./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared
 
make
 
make
make install}}
+
make install</pre>
 
=== Installation de VPX (Flash Video) ===
 
=== Installation de VPX (Flash Video) ===
{{Code|cd ~/ffmpeg_sources
+
<pre>cd ~/ffmpeg_sources
 
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git
 
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git
 
cd libvpx
 
cd libvpx
 
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm
 
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm
 
make
 
make
make install}}
+
make install</pre>
 
=== Installation de FFMpeg ===
 
=== Installation de FFMpeg ===
{{Code|cd ~/ffmpeg_sources
+
<pre>cd ~/ffmpeg_sources
 
wget https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
 
wget https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
 
tar xjvf ffmpeg-snapshot.tar.bz2
 
tar xjvf ffmpeg-snapshot.tar.bz2
Ligne 119 : Ligne 118 :
 
make
 
make
 
make install
 
make install
hash -r}}
+
hash -r</pre>
 +
[[Catégorie:Logiciels]]

Version actuelle datée du 27 mai 2019 à 03:23

FFMpeg est un encodeur/décodeur multi-formats rapide et performant, il est requis pour plusieurs applications de diffusions et de vidéos.

Pré-requis

Ce guide est fait pour CentOS 7 X64, mais peut marcher avec CentOS 6.x.

Installation

Préparation du système

Assurez-vous d'êtres à jour et d'avoir vos librairies requises installés.

yum update
yum install autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel

N'oubliez pas de créer le dossier de travail.

code=mkdir ~/ffmpeg_sources

Installation de NASM

cd ~/ffmpeg_sources
wget http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2
tar xjvf nasm-2.13.02.tar.bz2
cd nasm-2.13.02
./autogen.sh
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
make
make install

Installation de YASM

cd ~/ffmpeg_sources
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar xzvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
make
make install

Nettoyer les traces de l'installation native de NASM.

yum remove nasm && hash -r

Installation de x264 (H.264)

cd ~/ffmpeg_sources
git clone --depth 1 http://git.videolan.org/git/x264
cd x264
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
make
make install

Installation de x265 (H.265)

cd ~/ffmpeg_sources
hg clone https://bitbucket.org/multicoreware/x265
cd ~/ffmpeg_sources/x265/build/linux
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
make
make install

Installation de AAC

cd ~/ffmpeg_sources
git clone --depth 1 https://github.com/mstorsjo/fdk-aac
cd fdk-aac
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install

Installation de Lame (MP3)

cd ~/ffmpeg_sources
wget http://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
tar xzvf lame-3.100.tar.gz
cd lame-3.100
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm
make
make install

Installation de Opus

cd ~/ffmpeg_sources
wget https://archive.mozilla.org/pub/opus/opus-1.2.1.tar.gz
tar xzvf opus-1.2.1.tar.gz
cd opus-1.2.1
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install

Installation de Ogg

cd ~/ffmpeg_sources
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz
tar xzvf libogg-1.3.3.tar.gz
cd libogg-1.3.3
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install

Installation de Vorbis

cd ~/ffmpeg_sources
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.gz
tar xzvf libvorbis-1.3.5.tar.gz
cd libvorbis-1.3.5
./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared
make
make install

Installation de VPX (Flash Video)

cd ~/ffmpeg_sources
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git
cd libvpx
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm
make
make install

Installation de FFMpeg

cd ~/ffmpeg_sources
wget https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$HOME/bin:$PATH" 
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" 
./configure \
  --prefix="$HOME/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --extra-libs=-lpthread \
  --extra-libs=-lm \
  --bindir="$HOME/bin" \
  --enable-gpl \
  --enable-libfdk_aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-libx265 \
  --enable-nonfree
make
make install
hash -r