Difference between revisions of "Ffmpeg: compile"

From OnnoWiki
Jump to navigation Jump to search
(New page: Compile FFmpeg on Ubuntu, Debian, or Mint Contents Get the Dependencies Compilation & Installation Conclusion Updating FFmpeg Reverting Changes Made by This Guide ...)
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Compile FFmpeg on Ubuntu, Debian, or Mint
+
Compile FFmpeg di Ubuntu, Debian, atau Mint
  
Contents
 
  
    Get the Dependencies
+
==Instalasi aplikasi pendukung==
    Compilation & Installation
 
    Conclusion
 
    Updating FFmpeg
 
    Reverting Changes Made by This Guide
 
    If You Need Help
 
    Also See
 
  
This guide for supported releases of Ubuntu, Debian, and Linux Mint will provide a local install of the latest FFmpeg tools and libraries including several external encoding and decoding libraries (codecs). This will not interfere with repository packages.
+
sudo apt-get update
 +
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-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
  
You may also refer to the Generic FFmpeg Compilation Guide for additional information.
+
mkdir -p ~/ffmpeg_sources
  
Recent ​static builds are also available for lazy people or those who are unable to compile.
+
Catatan:
Get the Dependencies
 
  
Copy and paste the whole code box for each step.
+
Untuk server tidak perlu menginstalasi dependensi untuk ffplay dan x11
  
sudo apt-get update
+
libsdl1.2-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxfixes-dev.
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-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
 
mkdir ~/ffmpeg_sources
 
  
Notes:
+
Untuk ubuntu versi barudapat menginstalasi lengkap dengan codec
  
    Server users can omit the ffplay and x11 dependencies: libsdl1.2-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxfixes-dev.
+
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev \
    Lucid lacks the package libva-dev. This can be ignored.
+
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 \
 +
yasm libx264-dev libmp3lame-dev nasm libopus-dev
  
Compilation & Installation
 
  
You can compile ffmpeg to your liking. If you do not require certain encoders you may skip the relevant section and then remove the appropriate ./configure option in FFmpeg. For example, if libopus is not needed, then skip that section and then remove --enable-libopus from the Install FFmpeg section.
 
  
This guide is designed to be non-intrusive and will create several directories in your home directory:
+
==Compilation & Installation==
  
    ffmpeg_sources – Where the source files will be downloaded.
 
    ffmpeg_build – Where the files will be built and libraries installed.
 
    bin – Where the resulting binaries (ffmpeg, ffplay, ffserver, x264, and yasm) will be installed.
 
  
You can easily undo any of this as shown in Reverting Changes Made by This Guide.
+
Kita dapat mengcompile ffmpeg sesuai dengan kemauan kita. Kita dapat menghilangkan / skip bagian yang kita tidak perlukan di opsi ./configure saat mengcompile FFmpeg. Contoh, jika kita tidak memerlukan libopus skip bagian libopus dan buang --enable-libopus dari ./configure ffmpeg.
Yasm
 
  
An assembler for x86 optimizations used by x264 and FFmpeg. Highly recommended or your resulting build may be very slow.
+
Manual ini akan membuat directory
  
If your repository offers a yasm package ≥ 1.3.0 then you can install that instead of compiling:
+
    ffmpeg_sources – dimana source file akan di download.
 +
    ffmpeg_build – dimana file akan di built dan library di instalasi.
 +
    bin – dimana binary (ffmpeg, ffplay, ffserver, x264, and yasm) akan di instalasi.
  
sudo apt-get install yasm
+
==Yasm==
  
Otherwise you can compile:
+
Assembler untuk optimisasi x86 digunakan oleh x264 dan FFmpeg. Sangat di sarankan agar build yang kita lakukan tidak terlalu lambat.
  
cd ~/ffmpeg_sources
+
Jika repository kita dapat memberikan yasm package ≥ 1.3.0 maka kita dapat menginstalasi dengan cara:
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
 
make distclean
 
  
libx264
+
sudo apt-get install yasm
  
H.264 video encoder. See the H.264 Encoding Guide for more information and usage examples.
+
Atau kita dapat compile:
  
Requires ffmpeg to be configured with --enable-gpl --enable-libx264.
+
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
 +
make distclean
  
If your repository offers a libx264-dev package ≥ 0.118 then you can install that instead of compiling:
+
==libx264==
  
sudo apt-get install libx264-dev
+
H.264 video encoder.
  
Otherwise you can compile:
+
ffmpeg perlu di konfigurasi dengan --enable-gpl --enable-libx264.
  
cd ~/ffmpeg_sources
+
Jika repository kita dapat memberi libx264-dev package ≥ 0.118 kita dapat menginstalasi:
wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
 
tar xjvf last_x264.tar.bz2
 
cd x264-snapshot*
 
PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
 
PATH="$HOME/bin:$PATH" make
 
make install
 
make distclean
 
  
libfdk-aac
+
sudo apt-get install libx264-dev
  
AAC audio encoder. See the AAC Audio Encoding Guide for more information and usage examples.
+
atau compile:
  
Requires ffmpeg to be configured with --enable-libfdk_aac (and --enable-nonfree if you also included --enable-gpl).
+
cd ~/ffmpeg_sources
 +
wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
 +
tar xjvf last_x264.tar.bz2
 +
cd x264-snapshot*
 +
PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
 +
PATH="$HOME/bin:$PATH" make
 +
make install
 +
make distclean
  
sudo apt-get install unzip
+
==libfdk-aac==
cd ~/ffmpeg_sources
 
wget -O fdk-aac.zip https://github.com/mstorsjo/fdk-aac/zipball/master
 
unzip fdk-aac.zip
 
cd mstorsjo-fdk-aac*
 
autoreconf -fiv
 
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
 
make
 
make install
 
make distclean
 
  
libmp3lame
+
AAC audio encoder.
  
MP3 audio encoder.
+
ffmpeg perlu di konfigurasi --enable-libfdk_aac (dan --enable-nonfree jika kita menggunakan --enable-gpl).
 +
 
 +
Atau compile:
 +
 
 +
sudo apt-get install unzip
 +
cd ~/ffmpeg_sources
 +
wget -O fdk-aac.zip https://github.com/mstorsjo/fdk-aac/zipball/master
 +
unzip fdk-aac.zip
 +
cd mstorsjo-fdk-aac*
 +
autoreconf -fiv
 +
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
 +
make
 +
make install
 +
make distclean
  
Requires ffmpeg to be configured with --enable-libmp3lame.
+
==libmp3lame==
  
If your repository offers a libmp3lame-dev package ≥ 3.98.3 then you can install that instead of compiling:
+
MP3 audio encoder.
  
sudo apt-get install libmp3lame-dev
+
ffmpeg di konfigurasi dengan --enable-libmp3lame.
  
Otherwise you can compile:
+
Jika repository dapat memberikan libmp3lame-dev package ≥ 3.98.3 kita dapat menginstalasi dengan:
  
sudo apt-get install nasm
+
sudo apt-get install libmp3lame-dev
cd ~/ffmpeg_sources
 
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
 
tar xzvf lame-3.99.5.tar.gz
 
cd lame-3.99.5
 
./configure --prefix="$HOME/ffmpeg_build" --enable-nasm --disable-shared
 
make
 
make install
 
make distclean
 
  
libopus
+
atau compile:
  
Opus audio decoder and encoder.
+
sudo apt-get install nasm
 +
cd ~/ffmpeg_sources
 +
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
 +
tar xzvf lame-3.99.5.tar.gz
 +
cd lame-3.99.5
 +
./configure --prefix="$HOME/ffmpeg_build" --enable-nasm --disable-shared
 +
make
 +
make install
 +
make distclean
  
Requires ffmpeg to be configured with --enable-libopus.
+
==libopus==
  
If your repository offers a libopus-dev package ≥ 1.1 then you can install that instead of compiling:
+
Opus audio decoder & encoder.
  
sudo apt-get install libopus-dev
+
ffmpeg di konfiurasi dengan --enable-libopus.
  
Otherwise you can compile:
+
Jika repository memberi libopus-dev package ≥ 1.1 kita dapat menggunakan
  
cd ~/ffmpeg_sources
+
sudo apt-get install libopus-dev
wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
 
tar xzvf opus-1.1.tar.gz
 
cd opus-1.1
 
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
 
make
 
make install
 
make distclean
 
  
libvpx
+
atau:
  
VP8/VP9 video encoder and decoder. See the VP8 Video Encoding Guide for more information and usage examples.
+
cd ~/ffmpeg_sources
 +
wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
 +
tar xzvf opus-1.1.tar.gz
 +
cd opus-1.1
 +
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
 +
make
 +
make install
 +
make distclean
  
Requires ffmpeg to be configured with --enable-libvpx.
+
==libvpx==
  
cd ~/ffmpeg_sources
+
VP8/VP9 video encoder & decoder.  
wget http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2
 
tar xjvf libvpx-v1.3.0.tar.bz2
 
cd libvpx-v1.3.0
 
PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples
 
PATH="$HOME/bin:$PATH" make
 
make install
 
make clean
 
  
ffmpeg
+
ffmpeg di konfigurasi dengan --enable-libvpx.
  
Note: Server users can omit --enable-x11grab (this option is for x11 screen grabbing).
+
Atau compile:
  
cd ~/ffmpeg_sources
+
cd ~/ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
+
wget http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
+
tar xjvf libvpx-v1.3.0.tar.bz2
cd ffmpeg
+
cd libvpx-v1.3.0
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
+
PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples
  --prefix="$HOME/ffmpeg_build" \
+
PATH="$HOME/bin:$PATH" make
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
+
make install
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
+
make clean
  --bindir="$HOME/bin" \
 
  --enable-gpl \
 
  --enable-libass \
 
  --enable-libfdk-aac \
 
  --enable-libfreetype \
 
  --enable-libmp3lame \
 
  --enable-libopus \
 
  --enable-libtheora \
 
  --enable-libvorbis \
 
  --enable-libvpx \
 
  --enable-libx264 \
 
  --enable-nonfree \
 
  --enable-x11grab
 
PATH="$HOME/bin:$PATH" make
 
make install
 
make distclean
 
hash -r
 
  
Conclusion
+
==ffmpeg==
  
Installation is now complete and ffmpeg is now ready for use. Your newly compiled FFmpeg programs are in ~/bin. To use it:
+
Catatan: untuk Server dapat men-skip --enable-x11grab (opsi ini untuk melakukan x11 screen grabbing).
  
    Navigate to ~/bin and execute the binary: cd ~/bin && ./ffmpeg -i ~/input.mp4 ~/videos/output.mkv (notice the ./)
+
cd ~/ffmpeg_sources
    Or you can use the full path to the binary: /home/yourusername/bin/ffmpeg -i ../input.mp4 ../videos/output.mkv
+
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
    Or if you simply want to just issue the ffmpeg command and have your shell use your compiled binary see the Persistent Environment Variables section below.
+
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" \
 +
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
 +
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
 +
  --bindir="$HOME/bin" \
 +
  --enable-gpl \
 +
  --enable-libass \
 +
  --enable-libfdk-aac \
 +
  --enable-libfreetype \
 +
  --enable-libmp3lame \
 +
  --enable-libopus \
 +
  --enable-libtheora \
 +
  --enable-libvorbis \
 +
  --enable-libvpx \
 +
  --enable-libx264 \
 +
  --enable-nonfree \
 +
  --enable-x11grab
 +
PATH="$HOME/bin:$PATH" make
 +
make install
 +
make distclean
 +
hash -r
  
Persistent Environment Variables
+
==Penutup==
  
You can tell your shell (assuming you're using Bash) to persistently use your new ffmpeg in ~/bin. The first command will allow you to simply run man ffmpeg to get the FFmpeg man pages. The second command will source ~/.profile which will add ~/bin to your $PATH. In short, the following commands will allow you to simply type ffmpeg and man ffmpeg in your terminal and they will "just work":
+
Instalasi selesai dan ffmpeg siap digunakan. FFmpeg program ada di ~/bin. Untuk menggunakannya:
  
echo "MANPATH_MAP $HOME/bin $HOME/ffmpeg_build/share/man" >> ~/.manpath
+
* Pindah ke ~/bin dan jalankan:
. ~/.profile
 
  
Note:
+
cd ~/bin && ./ffmpeg -i ~/input.mp4 ~/videos/output.mkv (perhatikan ./)
  
    This may reset custom variables in the current shell session.
+
* Atau menggunakan full path:
    This assumes you are using the default ~/.profile (and therefore ~/.bashrc).
 
    This assumes you are using Bash shell.
 
    Sourcing the default ~/.profile will also source ~/.bashrc.
 
    You may have to log out and then log in for man ffmpeg to work.
 
    Don't worry: you can undo any of this as shown in Reverting Changes Made by This Guide.
 
  
See ​Ubuntu Wiki: Persistent Environment Variables for more info.
+
/home/yourusername/bin/ffmpeg -i ../input.mp4 ../videos/output.mkv
Additional Notes
 
  
    See the H.264 Encoding Guide for some encoding examples.
+
Atau yang lebih sederhana jalankan langsung perintah ffmpeg.
    If you do not see FFmpeg developers in your ffmpeg console output then something went wrong and you're probably using the ​fake "ffmpeg" from the repository.
 
    HTML formatted documentation is available in ~/ffmpeg_build/share/doc/ffmpeg.
 
    You can keep the ffmpeg_sources directory if you plan on updating later. See Updating FFmpeg below for more details followed by instructions for reverting all changes made by this guide.  
 
  
Updating FFmpeg
 
  
Development of FFmpeg is active and an occasional update can give you new features and bug fixes. First you need to delete (or move) the old files:
+
==Persistent Environment Variables==
  
rm -rf ~/ffmpeg_build ~/ffmpeg_sources ~/bin/{ffmpeg,ffprobe,ffserver,vsyasm,x264,yasm,ytasm}
+
Agar ffmpeg dapat langsung dijalankan tanpa pusing kepala
  
Now just follow the guide from the beginning.
+
echo "MANPATH_MAP $HOME/bin $HOME/ffmpeg_build/share/man" >> ~/.manpath
Reverting Changes Made by This Guide
+
. ~/.profile
  
rm -rf ~/ffmpeg_build ~/ffmpeg_sources ~/bin/{ffmpeg,ffprobe,ffserver,vsyasm,x264,yasm,ytasm}
 
sudo apt-get autoremove autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \
 
  libmp3lame-dev libopus-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev \
 
  libvorbis-dev libvpx-dev libx11-dev libx264-dev libxext-dev libxfixes-dev texi2html zlib1g-dev
 
sed -i '/ffmpeg_build/c\' ~/.manpath
 
hash -r
 
  
If You Need Help
+
==Updating FFmpeg==
  
Feel free to ask questions at the #ffmpeg IRC channel or the ​ffmpeg-user mailing list.
+
Pengembangan FFmpeg sangat aktif dan kadang-kadang di update untuk memberikan fitur baru dan perbaikan. Pertama-tama kita perlu men-delete file lama:
Also See
 
  
    Generic FFmpeg Compilation Guide
+
rm -rf ~/ffmpeg_build ~/ffmpeg_sources \
    H.264 Video Encoding Guide
+
~/bin/{ffmpeg,ffprobe,ffserver,vsyasm,x264,yasm,ytasm}
    AAC Audio Encoding Guide
 
  
 +
Kemudian ikuti lagi perintah dari awal. Atau yang lebih lengkap
  
 +
rm -rf ~/ffmpeg_build ~/ffmpeg_sources \
 +
~/bin/{ffmpeg,ffprobe,ffserver,vsyasm,x264,yasm,ytasm}
  
 +
sudo apt-get autoremove autoconf automake build-essential libass-dev \
 +
libfreetype6-dev libgpac-dev libmp3lame-dev libopus-dev libsdl1.2-dev \
 +
libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libvpx-dev \
 +
libx11-dev libx264-dev libxext-dev libxfixes-dev texi2html zlib1g-dev
 +
sed -i '/ffmpeg_build/c\' ~/.manpath
 +
hash -r
  
  

Latest revision as of 07:00, 20 November 2014

Compile FFmpeg di Ubuntu, Debian, atau Mint


Instalasi aplikasi pendukung

sudo apt-get update
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-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
mkdir -p ~/ffmpeg_sources

Catatan:

Untuk server tidak perlu menginstalasi dependensi untuk ffplay dan x11

libsdl1.2-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxfixes-dev.

Untuk ubuntu versi barudapat menginstalasi lengkap dengan codec

sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-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 \
yasm libx264-dev libmp3lame-dev nasm libopus-dev


Compilation & Installation

Kita dapat mengcompile ffmpeg sesuai dengan kemauan kita. Kita dapat menghilangkan / skip bagian yang kita tidak perlukan di opsi ./configure saat mengcompile FFmpeg. Contoh, jika kita tidak memerlukan libopus skip bagian libopus dan buang --enable-libopus dari ./configure ffmpeg.

Manual ini akan membuat directory

   ffmpeg_sources – dimana source file akan di download.
   ffmpeg_build – dimana file akan di built dan library di instalasi.
   bin – dimana binary (ffmpeg, ffplay, ffserver, x264, and yasm) akan di instalasi.

Yasm

Assembler untuk optimisasi x86 digunakan oleh x264 dan FFmpeg. Sangat di sarankan agar build yang kita lakukan tidak terlalu lambat.

Jika repository kita dapat memberikan yasm package ≥ 1.3.0 maka kita dapat menginstalasi dengan cara:

sudo apt-get install yasm

Atau kita dapat compile:

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
make distclean

libx264

H.264 video encoder.

ffmpeg perlu di konfigurasi dengan --enable-gpl --enable-libx264.

Jika repository kita dapat memberi libx264-dev package ≥ 0.118 kita dapat menginstalasi:

sudo apt-get install libx264-dev

atau compile:

cd ~/ffmpeg_sources
wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
tar xjvf last_x264.tar.bz2
cd x264-snapshot*
PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
PATH="$HOME/bin:$PATH" make
make install
make distclean

libfdk-aac

AAC audio encoder.

ffmpeg perlu di konfigurasi --enable-libfdk_aac (dan --enable-nonfree jika kita menggunakan --enable-gpl).

Atau compile:

sudo apt-get install unzip
cd ~/ffmpeg_sources
wget -O fdk-aac.zip https://github.com/mstorsjo/fdk-aac/zipball/master
unzip fdk-aac.zip
cd mstorsjo-fdk-aac*
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
make distclean

libmp3lame

MP3 audio encoder.

ffmpeg di konfigurasi dengan --enable-libmp3lame.

Jika repository dapat memberikan libmp3lame-dev package ≥ 3.98.3 kita dapat menginstalasi dengan:

sudo apt-get install libmp3lame-dev

atau compile:

sudo apt-get install nasm
cd ~/ffmpeg_sources
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar xzvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --prefix="$HOME/ffmpeg_build" --enable-nasm --disable-shared
make
make install
make distclean

libopus

Opus audio decoder & encoder.

ffmpeg di konfiurasi dengan --enable-libopus.

Jika repository memberi libopus-dev package ≥ 1.1 kita dapat menggunakan

sudo apt-get install libopus-dev

atau:

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

libvpx

VP8/VP9 video encoder & decoder.

ffmpeg di konfigurasi dengan --enable-libvpx.

Atau compile:

cd ~/ffmpeg_sources
wget http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2
tar xjvf libvpx-v1.3.0.tar.bz2
cd libvpx-v1.3.0
PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples
PATH="$HOME/bin:$PATH" make
make install
make clean

ffmpeg

Catatan: untuk Server dapat men-skip --enable-x11grab (opsi ini untuk melakukan x11 screen grabbing).

cd ~/ffmpeg_sources
wget http://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" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --bindir="$HOME/bin" \
  --enable-gpl \
  --enable-libass \
  --enable-libfdk-aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libtheora \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-nonfree \
  --enable-x11grab
PATH="$HOME/bin:$PATH" make
make install
make distclean
hash -r

Penutup

Instalasi selesai dan ffmpeg siap digunakan. FFmpeg program ada di ~/bin. Untuk menggunakannya:

  • Pindah ke ~/bin dan jalankan:
cd ~/bin && ./ffmpeg -i ~/input.mp4 ~/videos/output.mkv (perhatikan ./)
  • Atau menggunakan full path:
/home/yourusername/bin/ffmpeg -i ../input.mp4 ../videos/output.mkv

Atau yang lebih sederhana jalankan langsung perintah ffmpeg.


Persistent Environment Variables

Agar ffmpeg dapat langsung dijalankan tanpa pusing kepala

echo "MANPATH_MAP $HOME/bin $HOME/ffmpeg_build/share/man" >> ~/.manpath
. ~/.profile


Updating FFmpeg

Pengembangan FFmpeg sangat aktif dan kadang-kadang di update untuk memberikan fitur baru dan perbaikan. Pertama-tama kita perlu men-delete file lama:

rm -rf ~/ffmpeg_build ~/ffmpeg_sources \
~/bin/{ffmpeg,ffprobe,ffserver,vsyasm,x264,yasm,ytasm}

Kemudian ikuti lagi perintah dari awal. Atau yang lebih lengkap

rm -rf ~/ffmpeg_build ~/ffmpeg_sources \
~/bin/{ffmpeg,ffprobe,ffserver,vsyasm,x264,yasm,ytasm}
sudo apt-get autoremove autoconf automake build-essential libass-dev \
libfreetype6-dev libgpac-dev libmp3lame-dev libopus-dev libsdl1.2-dev \
libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libvpx-dev \
libx11-dev libx264-dev libxext-dev libxfixes-dev texi2html zlib1g-dev
sed -i '/ffmpeg_build/c\' ~/.manpath
hash -r


Referensi