How to build API and CLI of x265

After computation complexity, license fee issue seems bringing big trouble to H.265/HEVC. Royalty-free codecs (VP9, Thor, Daala) become new threats to it. Would H.265/HEVC become successful in the near future? A big question mark.

But from technique perspective, followed by the success of x264, x265 seems made steady progress towards practical application, especially the multi-platform support. If you already familiar with x264, it would be a small piece of cake for you to turn to x265. The build of API and CLI of x265 is quite intuitive and simple, thanks for the good Readme.txt. I am just sharing what I had went through to get them.

  1. The source code package can be downloaded from Bitbucket here:
    I’m using “x265_1.7.tar.gz“, the latest version I can got for now.
  2. After uncompress the package and get into \x265_1.7\build folder, you’ll see multiple build version for multiple platform support. As an initial test, “vc12-x86” is selected for my case, because I’m using Windows and have MSVC2013 in my PC. The following actions are also valid for Windows only.
  3. Before you click anything, make sure “CMake” and “YASM” are correctly installed as Readme.txt described.
    CMake can be downloaded here: (I use cmake-3.3.2-win32-x86.exe)
    YASM can be downloaded here: (I use Win32 VS2010 .zip)
    After those installation done, open a command line window and type in “cmake –version” and “yasm –version” to make sure the system is able to find them.
    Tips: When I install cmake, the installer warned me that the path is too long to be added into the system environmental variable. I have to added manually at computer property page.
  4. VisualLeakDetector is optional and can be downloaded here:
  5. Now the configuration is ready, simple double-click the “make-solutions.bat” in the build folder. cmake-gui.exe will be opened to configure build options as below:
    Just keep click “Configure” until all red are gone, as below:
    Then click “Generate”
    Now, you should see the lovely “x265.sln” in the “x265_1.7\build\vc12-x86” folder. Double click it which will be opened with MS Visual Studio and build all projects. The API and CLI of x265 will be generated in your Debug or Release folder and are ready to use.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s