Compile ffmpeg in windows

Source: Internet
Author: User

1. Download the compilation environment MinGW + Msys. Address: Compile. After the download is complete, install it directly. It is not recommended to modify any default path (the current computer and drive C are very large ).

Both MinGW and Msys were previously installed separately. Now they can be installed together at one time. It can be installed online or offline. Offline installation is recommended. The above link is used to download the offline installation package.

2. Download The exefile repository of yasmfrom http://yasm.tortall.net/download.html and put it in the bin directory of the MinGW installation directory.

If this step is not performed, the yasm command may not be found during ffmpeg compilation. The compilation acceleration code in ffmpeg needs to be used. If compilation acceleration is disabled, the compilation efficiency of the codec library will be affected.

3. Compile SDL and SDL to download the source code from http://www.libsdl.org/download-1.2.php before compiling ffmpeg. Decompress the package.

(Install SDL can refer to this: http://blog.pantokrator.net/2006/08/08/setting-up-msysmingw-build-system-for-compiling-sdlopengl-applications)

4. Enter the MinGW command line through the shortcut of the desktop or start menu, and enter the SDL decompression directory.

Note: use the "cd drive letter" command to switch the drive letter. For example, "cd d:" indicates that the drive letter is switched to the drive d.

5. Use the configure command to configure ffmpeg compilation parameters. The parameters I configured are as follows (for reference only ):

/Configure -- prefix =/mingw

You can use./configure -- help to view help. The instructions for each of the above parameters can be found in help;

6. Input make to compile.

7. After compilation, enter make install for deployment.

8. Download ffmpeg. After the download is complete, decompress the package to somewhere.

9. Same as installing SDL, it also performs./configure, make, make install

10. Copy the SDL. dll file to the ffmpeg file after installation.

11. test whether the installation is successful:

Start at --cmd, run the ffplay.exe file name to check whether the video can be played. If the video can be played, the compilation is successful.


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.