Ubuntu under ffmpeg compilation installation

Source: Internet
Author: User

Ubuntu ffmpeg Compilation Installation

Disclaimer: Reprint Please indicate the source, thank you!


The installation path of the software is specified here to
$HOME/ffmpeg_build
Packages are unified on:
$HOME/ffmpeg_sources
The final compiled Ffmpeg/ffmplay/ffserver will be placed in the
$HOME/bin


1.lame (--enable-libmp3lame)
Installation 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 possible compilation errors, workaround
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 ()
Installation 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)
Installation 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
Installation 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 x264 libraries
x264 can also be executed directly with the sudo command installation
sudo apt-get install x264


5.FAAC (--ENABLE-LIBFAAC)
Installation 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


Errors and workarounds for compiling possible hints
Problem: Because STRCASESTR has been defined in GCC, 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 directly to install
# sudo apt-get install Libopencore-amrnb-dev Libopencore-amrwb-dev



7.LIBVPX (--ENABLE-LIBVPX)
Installation 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)
Installation 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 choose to install the direct command
sudo apt-get install Libopus-dev



9.ffmpeg
Installation package Download path:
http://ffmpeg.org/releases/ffmpeg-2.6.3.tar.bz2


# TAR-JXVF FFMPEG-2.6.3.TAR.BZ2
# CD opus-1.1
#./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-x11grab-- 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



To install the 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


Ubuntu under ffmpeg compilation installation

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.