Ubuntu under FFmpeg compile installation

Source: Internet
Author: User
Tags bz2
Ubuntu FFmpeg Compile Installation

Disclaimer: Please indicate the source of the reprint, thank you.
The installation path to the software is specified here
$HOME/ffmpeg_build
The package is unified on:
$HOME/ffmpeg_sources
The final compiled Ffmpeg/ffmplay/ffserver will be placed in the
$HOME/bin


1.lame (--enable-libmp3lame)
Install package Download Path:
Http://ncu.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz


# TAR-ZXVF Lame-3.99.5.tar.gz
# CD lame-3.99.5
#./configure--prefix= "$HOME/ffmpeg_build"--enable-static--disable-shared


Problems with compilation errors may occur and solutions
A. Reference link http://blfs-dev.linuxfromscratch.narkive.com/ydjvk2Ou/error-compiling-lame-3-99-5
{{{
---lame-3.99.5.orig/configure 2012-02-28 15:54:37.000000000-0300
+++ Lame-3.99.5/configure 2014-04-29 11:15:10.118691341-0300
@@ -11913,6 +11913,15 @@

Fi

+case $host _cpu in
+i686*)
+ check_xmmintrin=
+ ;;
+*)
+ check_xmmintrin= "Xmmintrin.h"
+ ;;
+esac
+
For ac_header in \
Errno.h \
Fcntl.h \
@@ -11922,7 +11931,7 @@
Sys/soundcard.h \
Sys/time.h \
Unistd.h \
-Xmmintrin.h \
+ $check _xmmintrin \
Linux/soundcard.h
DO:
As_ac_header= ' $as _echo "Ac_cv_header_$ac_header" | $as _tr_sh '
}}}


B. Install the corresponding components directly in Ubuntu
# sudo apt-get install lame


2.libvorbis ()
Install package Download Path:
Http://downloads.xiph.org/releases/vorbis/vorbis-tools-1.4.0.tar.gz


# TAR-ZXVF Vorbis-tools-1.4.0.tar.gz
# CD vorbis-tools-1.4.0
#./configure--prefix= "$HOME/ffmpeg_build"--enable-static--disable-shared


3.xvidcore (--enable-libxvid)
Install package Download Path:
Http://downloads.xvid.org/downloads/xvidcore-1.3.3.tar.gz


# TAR-ZXVF Xvidcore-1.3.3.tar.gz
# CD Xvidcore
#./configure--prefix= "$HOME/ffmpeg_build"--enable-static--disable-shared


4.x264
Install package Download Path:
ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2


# TAR-JXVF LAST_X264.TAR.BZ2
# CD lx264-snapshot-20141218-2245
#./configure--prefix= "$HOME/ffmpeg_build"--enable-static


Tip: Another way to install the x264 library
x264 can also perform sudo command installation directly
sudo apt-get install x264


5.FAAC (--ENABLE-LIBFAAC)
Install package Download Path:
Http://superb-dca2.dl.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz


# TAR-ZXVF Faac-1.28.tar.gz
# CD faac-1.28
#./configure--prefix= "$HOME/ffmpeg_build"--enable-static


Compile errors and solutions that may be prompted
Problem: Because GCC has defined the STRCASESTR, it creates a conflict
Workaround: Comment out the char *strcasestr (const char *haystack, const char *needle) in Common/mp4v2/mpeg4ip.h;
line126://char *strcasestr (const char *haystack, const char *needle);


6.AMRNB,AMRWB (--ENABLE-LIBOPENCORE-AMRWB--enable-libopencore-amrnb)
For both libraries, you can run the sudo command installation directly
# sudo apt-get install Libopencore-amrnb-dev Libopencore-amrwb-dev



7.LIBVPX (--ENABLE-LIBVPX)
Install package Download Path:
Https://codeload.github.com/webmproject/libvpx/zip/master


# Unzip Libvpx-master.zip
# CD Libvpx-master
#./configure--prefix= "$HOME/ffmpeg_build"--enable-static--disable-shared



8.opus (--enable-libopus)
Install package Download Path:
Http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz


# TAR-ZXVF Opus-1.1.tar.gz
# CD opus-1.1
#./configure--prefix= "$HOME/ffmpeg_build"--enable-static--disable-shared


You can also select Direct command installation
sudo apt-get install Libopus-dev



9.ffmpeg
Install package Download Path:
http://ffmpeg.org/releases/ffmpeg-2.6.3.tar.bz2


# TAR-JXVF FFMPEG-2.6.3.TAR.BZ2
# CD ffmpeg-2.6.3
#./afa_configure.sh


Afa_configure.sh content:
#!/bin/sh
Echo $HOME
Path= "$PATH: $HOME/bin" pkg_config_path= "/home/afa/ffmpeg_build/lib/pkgconfig"./configure \
--prefix= "$HOME/ffmpeg_build"--extra-cflags= "-i$home/ffmpeg_build/include-dredirect_debug_log"--extra-ldflags= "-l$home/ffmpeg_build/lib"--bindir= "$HOME/bin" \
--enable-postproc--disable-shared--enable-static--enable-zlib--enable-bzlib--enable-postproc-- Enable-libopus--enable-libvpx \
--enable-libmp3lame--enable-encoder=libmp3lame--enable-nonfree--enable-libvorbis \
--ENABLE-LIBOPENCORE-AMRWB--enable-libopencore-amrnb--enable-libxvid--enable-decoder=libxvid--enable-encoder= Libxvid \
--enable-libx264--enable-encoder=libx264--enable-avfilter--enable-filter=movie--ENABLE-GPL--enable-version3 \
--DISABLE-ENCODER=AAC--ENABLE-LIBFAAC--ENABLE-ENCODER=LIBFAAC--enable-pthreads--enable-runtime-cpudetect



Install ffmpeg reference Link:
Http://www.cnblogs.com/wanghetao/p/3386311.html
http://blog.csdn.net/fireroll/article/details/8607955
http://ubuntuforums.org/showthread.php?t=2187623
http://permalink.gmane.org/gmane.comp.video.ffmpeg.user/53750
https://github.com/Homebrew/homebrew/commit/a96e684eec54f30c9521ba2af352a780f1d10f9f

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.