Simplest Video Encoder: Compile

Source: Internet
Author: User

Simplest Video Encoder: Compile

Recently I have studied several common video encoders: x264, x265, and vpx. This article briefly records their compilation methods.

The three open-source video encoders x264, x265, and vpx can be said to be the "most popular" Video Encoder today. X264 currently occupies H. 264 video encoder is half the country; x265 is the best open-source video encoder to implement H.265 standards, and may replace x264 in the future; vpx is an open-source Video Encoder Launched by Google, the performance of the proposed VP9 coding standard is also good. After recording this article, we plan to write three articles for x264, x265, and vpx respectively to record their usage methods.


X264

 

 

Source code retrieval address:

git clone git://git.videolan.org/x264.git

Note that yasm must be installed before compilation.

The simplest compilation procedure in Windows (MinGW)

1. Download and install MinGW, run it, and switch to the source code directory.

2. Enter./configure
3. Enter make
4. Enter make install for installation (optional)

The simplest compilation procedure in Linux:

1. Switch to the source code directory.

2. Enter./configure
3. Enter make

4. Enter make install for installation (optional)

 

Generated after compilation:

X264.exe: the code H.264 command line program that can be used directly

Libx264.a: class library that can be used for Program Development encoding H.264

 

Compile and obtain the lib class library in Windows (generate libx264.lib)
1. Generate the "*. def" file. When you enter the "./configure" command, add a parameter after "./configure" and change it:
./configure --enable-shared --extra-ldflags=-Wl,--output-def=libx264.def
In this way, the "libx264.dll" and "libx264.def" files can be generated.
2. Use the lib generation tool "LIB" that comes with VC to generate the "libx264.lib" file. Use Visual Studio command prompt to switch to the x264 source code directory and enter the following command:
LIB /DEF:libx264.def
You can generate libx264.lib for development under VC.

X265
Site 1: http://www.videolan.org/developers/x265.html

Website 2: https://bitbucket.org/multicoreware/x265

Source code retrieval address:
hg clone http://hg.videolan.org/x265

Note that you need to install the SDK before compiling:
(1) yasm.
(2) CMake.

The simplest compilation procedure in Windows (VC2010)
1. Use CMake to generate the x265.sln file. Find the version of ". sln" to be generated in the "build" folder in the root directory of the Code.

Take the local machine as an example, open the "vc10-x86", run the "make-solutions.bat", you can generate VC2010 32-bit solution file. A CMake configuration dialog box is displayed ,. You can directly click "Configure" and then click "Generate.

2. Open the generated x265.sln with VC to compile the program. You can right-click the solution and select "generate solution" to batch compile all projects.

 

Generated after compilation:

X265.exe: a command line program that can be directly used to encode H.265

Libx265.dll, libx265.lib: Class Library (separated by lib and dll) that can be used for program development)

X265-static.lib: class library that can be used for program development code H.265 (a separate lib)


VPX

 

Website: http://www.webmproject.org/

Source code retrieval address:

 

git clone https://chromium.googlesource.com/webm/libvpx

 

The above address may not be accessible. You can use the following image address:

 

git clone https://github.com/webmproject/libvpx

 

Note that yasm must be installed before compilation.

The simplest compilation procedure in Windows (MinGW)

1. Download and install MinGW, run it, and switch to the source code directory.
2. Enter./configure
3. Enter make

Simple compilation steps in Linux
1. Switch to the source code directory.
2. Enter./configure
3. Enter make

 

Generated after compilation:
Vpxdec.exe: Decoding VP8 and VP9 command line programs that can be used directly
Vpxenc.exe: Code VP8 and VP9 that can be used directly.
Libvpx. a: class library that can be used for program development code VP8 and VP9

 

How to compile and obtain the VS2010 solution for each project in Windows

1. Set "-target" to "x86-win32-vs10" during configure"

./configure --target=x86-win32-vs10

2. Use VC to open the generated vpx. sln, and you can use VS to browse the entire solution. You can right-click the solution and select "generate solution" to batch compile all projects.

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.