Compile and install FFMPEG to support MP3, x264, etc.

Source: Internet
Author: User

FFmpeg is a good thing, but it may be due to issues related to license conflicts (it seems that gplv3 is in conflict with other licenses ), therefore, FFMPEG in the past two years does not include the support for common libraries such as libmp 3lame and libx264, which is inconvenient for actual use. Although there are some simple methods, such as HOWTO: easily enable MP3, MPEG4, AAC, and other restricted encoders in FFMPEG, I tried two simple methods: neither the extra library nor the medibuntu library can be installed. Therefore, you have to compile and install FFMPEG on your own.

The platform used is Ubuntu 12.04 amd64. The main problem was that video editing software such as kdenlive and openshot could not export MP4, H.264, and Xvid formats. Therefore, the solution here is mainly for these two software.

Compile and install x264 and libvpx according to the official FFMPEG file compile FFMPEG on Ubuntu. However, in 64-Bit mode, you must use the following command (with -- enable-shared) to compile x264; otherwise, an error occurs when compiling FFMPEG:

 
./Configure -- enable-static -- enable-shared

For the 64-bit platform, note the result after the command is run. The values of shared and PIC must be yes.

Compile and install FFmpeg is a compilation parameter recommended by kdenlive's installing FFMPEG document. Some libraries may need to be installed with apt. Note: Install the corresponding-dev version.

. /Configure -- prefix =/usr -- enable-shared -- enable-libmp3lame -- enable-GPL -- enable-libfaac \ -- enable-libvorbis -- enable-pthreads -- enable-libfaac -- enable-xlibvid -- enable-x11grab \ -- enable-libgsm -- enable-libx264 -- enable-libtheora -- enable-libdc1394 -- enable-nonfree \ -- disable-stripping -- enable-avfilter -- enable-libschroedinger -- enable-libopencore-amrnb \ -- enable- libopencore-amrwb -- enable-version3

I installed the following:

 
Sudo apt-Get install libgsm1-dev libschroedinger-dev libdc1394-22-dev

Compilation is also recommended using kdenlive:

 
Make-J3

The installation is officially recommended by FFMPEG:

 
Sudo checkinstall -- pkgname = FFMPEG -- pkgversion = "5: $ (date + % Y % m % d % H % m) -Git "-- backup = NO \ -- deldoc = yes -- fstrans = No -- defaulthash x264 FFMPEG ffplay ffprobe

In this way, you can.

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.