FFmpeg codec for AMR format

Source: Internet
Author: User

FFMPEG in Linux does not support AMR Format Decoding by default. Therefore, you need to manually compile the FFMPEG source code to add a decoder to support Decoding of AMR file formats.

System Environment: SuSE 64bit OS
Preparations:
1. Download The FFMPEG source code: http://ffmpeg.org/download.html. In this example, select 0.11.1.
2,Download opencore AMR: http://sourceforge.net/projects/opencore-amr/and select 0.1.3.

Store the downloaded file in the/home/FFMPEG directory and log on to the system as the root user.

Procedure:

1. Compile and install opencore-Amr. Note that the -- enable-shared = No -- enable-static = Yes parameter must be added when the configure command is executed, its main function is to prohibit production of dynamic linked libraries and allow production of static libraries.

Chmod 755 opencore-amr-0.1.3.tar.gz

Tar-xzvf opencore-amr-0.1.3.tar.gz

CD opencore-amr-0.1.3

./Configure -- enable-shared = No -- enable-static = Yes

Make

Make install

 

2. Compile and install FFMPEG. Pay attention to the parameters to be added after the configure command. You can run the configure -- Help Command to view the parameters that are allowed later.

Chomd 755 ffmpeg-0.11.1.tar.gz

Tar-xzvf ffmepg-0.11.1.tar.gz

CD ffempg

. /Configure -- enable-GPL -- enable-version3 -- enable-nonfree -- disable-ffplay -- disable-ffprobe -- disable-ffserver -- enable-libopencore-amrnb -- enable-libopencore-amrwb -- prefix =/ home/FFMPEG/Target

Make

Make install

After the preceding command is successfully executed, the FFMPEG file is obtained in the bin directory under the/home/FFMPEG/target directory, which already contains the AMR decoder.

3. test:

Chmod 755 FFMPEG

./FFMPEG-I pa003.wav-ar 8000-AB 12.2 K-Ac 1 target. Amr

 

4. Notes:

A) All of the above methods are compiled in the form of static libraries. The advantage of using the form of static libraries is that the compiled Executable File FFMPEG does not depend on the AMR decoder. In short, the executable file contains the AMR decoder.

B) FFMPEG will give priority to finding the dynamic link library of the AMR decoder during compilation. If not, find the static library of the AMR decoder. If the first step does not prohibit AMR from generating dynamic link libraries, FFMPEG uses the dynamic link library of AMR for compilation. The disadvantage is that, the compiled Executable File FFMPEG depends on the Dynamic Link Library of AMR. If the system's dynamic link library search path LD_LIBRARY_PATH does not contain the path of the dynamic link library of AMR, FFMPEG reports an error, unable to work normally.

C) During AMR compilation and installation, we do not recommend you add the prefix = xxx parameter (./configure) to modify the AMR installation path. In this way, FFMPEG cannot find the AMR decoder during compilation and 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.