Mingw compilation FFMPEG + x265 process records

Source: Internet
Author: User

Mingw compilation FFMPEG + x265 process records

Email: [email protected]

Operating Environment OS: Windows 7

1. Download related resources

Ffmpeg-2.3 http://ffmpeg.org/releases/ffmpeg-2.3.3.tar.bz2

X265-1.3 download https://bitbucket.org/multicoreware/x265/wiki/Home

Http://ffmpeg.zeranoe.com/builds/source/external_libraries/

X264 download http://ffmpeg.zeranoe.com/builds/source/external_libraries/

2. Compile x265-1.3

X264, x265, and FFMPEG all require the yasm compiler. You need to download the yasm compiler and copy it to the Ming/bin directory.

X265 needs to install cmake to produce project files, need to download the latest cmake-2.8.12 version, and install, note the need to add its installation path to the PATH variable of the Windows environment variable.

2.1 Go To The x265/build/msys directory and execute the make-Makefiles.sh


Click Configure, generate, close, and return to the command line. Execute make and then make install. After compilation, you can find the corresponding lib file in the/loacal/lib directory.

3. Compile ffmpeg-2.33.1. FFMPEG compilation configuration options

Copy the header files compiled by x264 and x265 to the/usr/local/directory.


Copy the tyd. Sh file to the ffmpeg-2.3.3 directory. Run tyd. Sh.

3.2 problems with running the compilation Option

Error: x265 not found

3.2.1. The PKG-config program is missing and the x265.pc file is missing.

View the config. Log File. According to the following error message, the PKG-config program is missing and the x265.pc file is missing.


For installation of the PKG-config program, refer to the article, or directly download PKG-config copy to the/Ming/bin directory.

PKG-config

Install http://blog.csdn.net/chaosllgao/article/details/3984462

Download http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-0.23-2.zip

X265.pc file copy/usr/local/lib


You can use PKG-config to obtain file information related to x265.

3.2.2 config. log error log information a) GCC dependency library is missing

As shown in, the link to the new \ delete function fails, apparently caused by the default gcc-related function.


The reason is that the dependency library of the x265 library cannot be correctly read by PKG-config of the msys version, so you need to manually add


B) Strange Link errors

C:/mingw/lib/libstdc ++. A (new_op.o): new_op.cc :(. Text + 0x34): Undefined reference to '_ unwind_sjlj_register'

C:/mingw/lib/libstdc ++. A (new_op.o): new_op.cc :(. Text + 0x87): Undefined reference to '_ unwind_sjlj_unregister'

C:/mingw/lib/libstdc ++. A (new_op.o): new_op.cc :(. Text + 0xb7): Undefined reference to '_ unwind_sjlj_resume'


Through the analysis, we can find out the reason why the gcc library used by the upstream link is inconsistent with the function library used by x265.exe. The root cause is that PKG-config cannot correctly parse the x265.pc file. The solution is as follows:


C) result of correctly executing configure Configuration


The third-party libraries on which FFMPEG depends have been correctly configured with libx264 and libx265.

4. Compile the FFMPEG Project

This step is basically done. You only need to execute make & make install.

Finally, you can find the compilation result under the directory output.





Mingw compilation FFMPEG + x265 process records

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.