vs2012 MinGW compilation Ffmeg referencing external libraries libx264,librtmp

Source: Internet
Author: User

VS2012 How to compile FFmpeg has already been mentioned before, originally mainly about how to reference the external library libx264,librtmp,

The FFmpeg version is 3.0.2.

1. Download the x264 source file and compile it

The source address is http://www.videolan.org/developers/x264.html. The libx264 configuration and compile commands are as follows:

./configure--enable-shared--EXTRA-LDFLAGS=-WL,--output-def=libx264.def
Make
Make install

The generated DEF file can be converted to a libx264.lib file via the VC's own Lib.exe command, which is:

Lib/def:yourdll.def/machine:i386/out:yourdll.lib

Note:/def must be added, otherwise the execution command will be faulted. The lib.exe path is C:\Program Files (x86) \microsoft Visual Studio 11.0\vc\lib.

2. Download the compilation librtmp

LIBRTMP relies on open source libraries such as OpenSSL, someone has already built the vs2012 version of the project can be directly used. The main note needs to modify the configuration, otherwise the compilation Ffmeg error.

The configuration that needs to be modified is as follows:

Figure 1 Librtmp configuration options

3. Modify the FFmpeg configure file:

Will

#enabled librtmp           && require_pkg_config librtmp librtmp/rtmp.h rtmp_socket

Replaced by

Enabled librtmp           && require librtmp librtmp/rtmp.h rtmp_socket-lrtmp-lws2_32-luser32-lgdi32-lwinmm

4. Configuring, Compiling, installing

./configure--toolchain=msvc--enable-shared--ENABLE-GPL--enable-libx264  
--enable-encoder=libx264--extra-cflags="-i/home/wgg/libx264/include"
--extra-ldflags="-l/home/wgg/libx264/lib "--prefix="/home/wgg/ out-3.0.2-x264"makemake Install

The corresponding PDB file is generated when the compilation is successful.

If there is a problem to communicate, please dabigatran streaming media/ffmpeg/audio and video 127903734, the group has a compiled library file.

vs2012 MinGW compilation Ffmeg referencing external libraries libx264,librtmp

Related Article

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.