Last active
October 26, 2024 17:43
-
-
Save hyer/5a63543966dd2642989a to your computer and use it in GitHub Desktop.
installing ffmpeg from source code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You should download the ffmpeg source code from the http://ffmpeg.org/ | |
# libx264 need yasm, so we install yasm first | |
sudo apt-get install yasm | |
sudo apt-get install libx264-dev | |
# then, install the required packages | |
sudo apt-get install libfaac-dev | |
sudo apt-get install libmp3lame-dev | |
sudo apt-get install libtheora-dev | |
sudo apt-get install libvorbis-dev | |
sudo apt-get install libxvidcore-dev | |
sudo apt-get install libxext-dev | |
sudo apt-get install libxfixes-dev | |
# unzip the ffmpeg source code and install | |
tar -xjvf ffmpeg-2.8.2.tar.bz2 | |
cd ffmpeg-2.8.2 | |
./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab --enable-libvorbis | |
sudo make | |
sudo make install | |
# configure the PATH param | |
echo "# Add FFMpeg bin & library paths:" >> ~/.bashrc | |
echo "export PATH=/usr/local/ffmpeg/bin:$PATH" >> ~/.bashrc | |
echo "export LD_LIBRARY_PATH=/usr/local/ffmpeg/lib:$LD_LIBRARY_PATH" >> ~/.bashrc | |
source ~/.bashrc | |
## You can also install from a PPA | |
# sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next | |
# sudo apt-get update | |
# sudo apt-get install ffmpeg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment