Sort FFMPEG usage

Source: Internet
Author: User
Tags vc9
To enable FFMPEG to support MP4 format. If you enable FFMPEG to decode media files in MPEG4 format, the error message tells us that the mp4a format of an audio channel is not supported. In order to support audio decoding in this mp4a format, you need to support AAC and go to the AAC website to find two things that need to be installed: faad2 and faac. FFmpeg supports faad and faac differently from 3GPP, similar to lamemp3. The following describes the process. 1. To begin. 2. Compile faad2, decompress it to a proper place, run./Bootstrap first, and then run.
/Configure: You can specify the parameter or not when configuring Configure. I am always used to specifying my -- prefix parameter, which is clean. Make
Under makefile modification in the faad2 main directory, find a line with "rpm: makefile" and change all spaces before the three lines to a Tab character. If
If this parameter is not changed, an error will be reported during compilation. Then make and make install. 3. Compile faac, decompress it to a proper place, and then first./Bootstrap, then./configure, then make, and then make install. This makefile is correct, so it is easier. 4. In the directory specified by -- prefix of faad and faac, copy the. H files in the include directory.
To/usr/include, copy all the files starting with LIB under their lib directory to the/usr/lib directory. If faad and faac are not compiled before
Do not specify -- prefix. This copy step is not required. Note that if you only copy the libfaad. A and libfaac. A static library files
FFmpeg has no dynamic library dependency on them and can be run independently. 5. Compile FFMPEG with the -- enable-amr_nb -- enable-faad -- enable-faac parameter added to configure. There is no dependency between dynamic libraries after compilation, and FFMPEG can be run independently. In the Windows environment, the compilation of faad2 still has a problem. The previous compilation of lame requires mingw. Now, the compilation of faac also says cygwin and the aclocal of automake are always incorrect, it's too much trouble to wait for time ,. Allow FFMPEG to support the 3GPP format FFMPEG by default does not support the 3GPP format, config plus -- enable-amr_nb is to support this format option, but it will tell you that you need to download the 3GPP package to continue. The whole process is simple. 1. Download the source code package from the 3GPP website. 2. In the libavcodec directory of FFMPEG, create the amr_float directory and copy all the files in the 3GPP package to this directory. 3. Add the -- enable-amr_nb option to the configure of FFMPEG. How to enable FFMPEG to support three versions of Microsoft asfin vc1 format: wmv1, wmv2, and wmv3 correspond to mediaplayer versions 7, 8, and
9, so vc1 is often called wmv3 or wmv9. Sometimes it can be seen in the code that it is called vc9. Because Microsoft has not officially published this format
Vc1 support is not complete yet. This article is based on the translation and improvement of a blog by multimedia Mike. 1. Download SMPTE VC-1Reference decoder. This organization is charged. You can download it for free. 2. Create the libvc1 directory under the libavcodec directory under the FFMPEG directory. 3. Copy all the *. C and *. H files in the vcpus reference_decoder_release6/Decoder/directory to the libvc1 directory. 4. Copy all the *. C and *. H files in the vcpus reference_decoder_release6/shared/directory to the libvc1 directory. 5. Set Libvc1-makefile.txtPut the MAKEFILE file in libvc1. 6. Set Smpte-vc1.cPut the file in the libavcodec directory. 7. Modify the vc9.c in the libavcodec directory, and include the structure of the avcodec in the final wmv3_decoder of the file with # If 0 and # endif, that is, it becomes invalid. 8. Modify allcodecs. c In the libavcodec directory, and remove the comments from and from register_avcodec (& wmv3_decoder) to make it work. 9. Modify the makefile under the libavcodec directory and add the objs list to the smpte-vc1.o. 10. Modify the MAKEFILE file in the FFMPEG main directory and add-L./libavcodec/libvc1-lvc1 $ (buildsuf) to the end of fflibs. 11. Go to FFMPEG/libavcodec/libav1 and execute make 12. Go to the FFMPEG main directory and execute config; Make; make install. Parameters are included in config according to the actual situation. To use FFMPEG to transcode FLV files, use FFMPEG to transcode FLV files. The major difference between using FFMPEG to transcode files and using other media types is that the lame library must be supported, because
The FLV Audio Encoding adopts the MP3 format, which is not lame. It is a disaster to add the lame library to compile FFMPEG, especially in windows, many parameters cannot be used.
Finally, manually copy and modify some files. Record it quickly, saving you from forgetting it later. 1. If you compile in windows, the first step is to download mingw and msys to install it. To begin. 2. Install mingw first, run mingw-5.0.2.exe directly, and select a directory. For example, select D:/mingw as the installation directory. Select the GCC and make modules for installation. The installation file is small and will be downloaded from the Internet for installation. 3. Then install msysand directly run msys-1.0.11-2004.04.30-1.exe. Security
For installation directories, select D:/mingw/bin/1.0 ., During the installation process, you will be asked about the directory where mingw was just installed, and enter D:/mingw. All the others will answer 'y. If no
Clearly, you can see the effect of this image. 4. Run msys. There is an icon on the desktop. Double-click the icon to run it. The running result is a UNIX-simulated command window. The subsequent compilation is in this State. The preceding four steps are not required in Linux. 5. To begin. Run./configure -- prefix = prefix make install 6. Copy the compiled include lame directory to the/usr/include directory
To the/usr/lib directory. Note that there is a change here. If you only copy the static library under the lib directory to/usr/lib, only
Copy the libmp 3lame. A file. The compiled FFMPEG does not ultimately depend on the dynamic library of libmp 3lame.
The static library is not found. If this copy is not performed, lame not found will be reported no matter how the parameter is specified during FFMPEG compilation. 7. Slave. How to compile and install SVN is omitted here. 8. In Windows, open the MAKEFILE file in the decompressed FFMPEG directory and add-lmp3lame $ (buildsuf) to the line of fflibs ). I don't know which bug caused this problem. It took a long time to make it happen and I was depressed. This is not required in Linux. 9. Compile FFMPEG to execute./configure -- prefix = prefix -- enable-memalign-hack -- enable-mingw32 -- enable-mp3lame -- enable-GPL in Windows

Run

./Configure -- prefix = prefix -- enable-mp3lame -- enable-GPL and then execute make install 10. As a result, the compiled files can be executed independently without dependency on the dynamic library.

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.