FFmpeg installation configuration steps in Linux systems

Source: Internet
Author: User
Tags bz2 svn git clone


Http://ffmpeg.org/download.html

Windows version is easier, you can go to see the month before the article point before the small rise here

Linux
Installation Environment CentOS
Download TAR.BZ2 installation package
TAR-XVF XX.tar.bz2

Yasm/nasm not found or too old. Use–disable-yasm for a crippled build.

If You are configure made a mistake, make sure you are using the latest
Version from Git. If The latest version fails, the problem to the
ffmpeg-user@ffmpeg.org Mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "Config.log" produced by configure as this'll help
Solve the problem.

http://yasm.tortall.net/Download.html Download Yasm
TAR-ZXVF yasm.tar.gz
./configure
Make
Make install

Again
Under FFmpeg
./configure

Installation completed and found unable to turn AMR into MP3
./ffmpeg-i X.amr X.mp3

./configure–enable-libmp3lame
Less this libmp3lame

# wget http://downloads.sourceforge.net/lame/lame-3.97.tar.gz
# tar Xzf lame-3.97.tar.gz
# CD lame-3.97
#./configure
# make
# make Install

Error:libmp3lame >= 3.98.3 not found

http://downloads.sourceforge.net/lame/go here to find the latest version, download one.

I came down to lame-3.99.5.tar.gz.
#./configure
# make
# make Install

./ffmpeg-i X.amr X.mp3

Ffmpeg:error while loading shared libraries:libmp3lame.so.0:cannot open Shared object file:no such file or directory

This is what happens when we do this.

Edit the/etc/ld.so.conf file to add the following content
/usr/local/lib
Execute ldconfig command after saving exit

Done.

The library you're missing, it's probably down there.

FFmpeg software is only a decoding code software, if the support of a variety of formats must first install the corresponding library, the following is the next I installed the library:
1. Install Faad2

# wget http://downloads.sourceforge.net/faac/faad2-2.6.1.tar.gz
# tar Xvfz faad2-2.6.1.tar.gz
# CD Faad2
#./bootstrap
#./configure
# make
# make Install
2. Install Liba52

# wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz
# tar Xvfz a52dec-0.7.4.tar.gz
# CD a52dec-0.7.4
#./configure
# make
# make Install
3. Install Libdirac

# wget http://downloads.sourceforge.net/dirac/dirac-0.10.0.tar.gz
# tar Xvfz dirac-0.10.0.tar.gz
# CD dirac-0.10.0
#./configure
# make
# make Install
4. Install Faac2

# wget http://downloads.sourceforge.net/faac/faac-1.26.tar.gz
# tar Xvfz faac-1.26.tar.gz
# CD FAAC
#./bootstrap
#./configure
# make
# make Install
5. Install Libamrnb

# wget HTTP://FTP.PENGUIN.CZ/PUB/USERS/UTX/AMR/AMRNB-7.0.0.2.TAR.BZ2
# tar XVFJ amrnb-7.0.0.2.tar.bz2
# CD amrnb-7.0.0.2
#./configure
# make
# make Install
6. Install LIBAMRWB

# wget HTTP://FTP.PENGUIN.CZ/PUB/USERS/UTX/AMR/AMRWB-7.0.0.3.TAR.BZ2
# tar XVFJ amrwb-7.0.0.3.tar.bz2
# CD amrwb-7.0.0.3
#./configure
# make
# make Install
7. Install Libmp3lame

# wget http://downloads.sourceforge.net/lame/lame-3.97.tar.gz
# tar Xzf lame-3.97.tar.gz
# CD lame-3.97
#./configure
# make
# make Install
8. Install libx264
This package needs to be fetched with git, so install git first:

# wget http://kernel.org/pub/software/scm/git/git-1.6.2.tar.gz (address to confirm)
# tar ZXVF git-1.6.2.tar.gz
# CD git-1.6.2
#./configure
# make
# make Install
Then install libx264

#/usr/local/bin/git Clone Git://git.videolan.org/x264.git x264
# CD x264
#./configure–enable-pthread–enable-shared–disable-asm
# make
# make Install
8. Install Libnut, the software needs to get the source code SVN, SVN can be used directly yum install svn to install. Download First:

# SVN Co svn://svn.mplayerhq.hu/nut/src/trunk libnut
After downloading the code is saved in the newly established Libnut directory, the configuration file needs to be modified for 64-bit Linux:

# CD Libnut
# VI Config.mak
In the last cflags the next line increases:

Cflags + +-fpic
Then compile the installation:

# make
# make Install
9. Install Libogg

# wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
# tar XVF libogg-1.1.3.tar.gz
# CD libogg-1.1.3
#./configure
# make
# make Install
10. Install Libtheora (SVN fetch)

# SVN Co http://svn.xiph.org/trunk/theora Theora
# CD Theora
#./autogen.sh
#./configure
# make
# make Install
11. Install Libvorbis

# wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz
# tar Xvfz libvorbis-1.2.0.tar.gz
# CD libvorbis-1.2.0
#./configure
# make
# make Install
12. Install Libxvid

# wget http://downloads.xvid.org/downloads/xvidcore-1.2.1.tar.gz
# tar XVF xvidcore-1.2.1.tar.gz
# CD Xvidcore-1.2.1/build/generic
#./bootstrap.sh
#./configure–disable-assembly
# make
# make Install

The above Media support library after installation, you can set up the environment ready to compile FFmpeg!
13. Modifying Environment variables

# vi/etc/ld.so.conf
Add one line to the end of the file:

/usr/local/lib
And then comes into force:

# Ldconfig
14. Install FFmpeg
You can get it from SVN, but the file is larger, so it's very slow:

# SVN Checkout Svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
# CD FFmpeg
You can also download it yourself:

# http://www.ffmpeg.org/releases/ffmpeg-0.5.tar.bz2
# bzip2-d FFMPEG-0.5.TAR.BZ2
# TAR-XF Ffmpeg-0.5.tar
# CD ffmpeg-0.5
Compile (64-bit system needs to set Pkg_config_path parameters):

# export Pkg_config_path=/usr/local/lib/pkgconfig cflags= '-fpic-m64″
#./configure–enable-shared \
–ENABLE-GPL \
–enable-nonfree \
–enable-postproc \
–enable-avfilter \
–ENABLE-AVFILTER-LAVF \
–enable-pthreads \
–ENABLE-LIBAMR-NB \
–ENABLE-LIBAMR-WB \
–enable-libdirac \
–ENABLE-LIBFAAC \
–enable-libfaad \
–enable-libfaadbin \
–enable-libmp3lame \
–enable-libnut \
–enable-libtheora \
–enable-libvorbis \
–enable-libx264 \
–enable-libxvid \
–enable-decoder=libx264 \
–enable-encoder=libx264
# make
# make Install

14. Errors that may occur:

/usr/include/linux/videodev.h:56:error:syntax error before "ULONG"
/usr/include/linux/videodev.h:72:error:syntax error before '} ' token
libavdevice/v4l.c:in function ' Grab_read_header ':
Libavdevice/v4l.c:75:error:storage size of ' tuner ' isn ' t known
Libavdevice/v4l.c:133:error:invalid application of ' sizeof ' to incomplete type ' Video_tuner '
Libavdevice/v4l.c:140:error:invalid application of ' sizeof ' to incomplete type ' Video_tuner '
libavdevice/v4l.c:75:warning:unused variable ' tuner '
This may be the source code videodev.h is not written for the minor version of Linux, Standard C has no ulong type, so to change to unsigned long

15. Run Ffmpeg-formats, possible error:

Ffmpeg:error while loading shared libraries:libavfilter.so.0:cannot open Shared object file:no such file or directory
This thing is not set up environment path caused by adding a ffmpeg.conf profile:

# CD/ETC/LD.SO.CONF.D
# VI Ffmpeg.conf
Write in the file:

/usr/local/lib
Then confirm the entry into force:

# Ldconfig
16. Other:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.