Add an x265 decoder to gstreamer

Source: Internet
Author: User
Tags gstreamer

The current gstreamer version does not support x265 encoding/decoding. Therefore, you need to compile the code by yourself. This article is based on gstreamer1.3.3. You must first compile gstreamer1.3.3 and the corresponding base, good, bad, and uugly plug-ins.

1. Install and compile the x265 Encoder

1. Download the source code.

Open source x265 encoder official website is https://bitbucket.org/multicoreware/x265/wiki/Home

Source code: Hg clone https://bitbucket.org/multicoreware/x265

Of course, you must first install the Hg source code management tool, which is similar to git. This tool is self-contained in Debian 7 and is called mercurial.

2. Install the compiling environment:

Sudo apt-Get install cmake-Curses-Gui build-essential

3. The Debian 7 Compilation software yasm version is 1.1, and the x265 compilation requires version 1.2. Therefore, you need to compile yasm1.2 by yourself.

: Http://yasm.tortall.net/releases/Release1.2.0.html

After compilation, configure the path of the environment variable to give yasm1.2 priority.

4. Compile x265

Go to the build/Linux directory and run:

/Make-Makefiles.bash

A character configuration interface is displayed, and parameters are modified as needed.

Then make and install.

At this time, the x265 command can be executed. You can find a y4m original video file to encode it.

5. Compile and install the gstreamer x265 plugin

: Https://bugzilla.gnome.org/show_bug.cgi? Id = 726376

The bug attachment is the patch file. The author did not specify the version based on which gstreamer is written, but the location is in the bad plug-in of gstreamer. To use this patch for your gstreamer version, you need to compare the code and modify the patch according to your version. I modified the SDK Based on gstreamer1.3.3. The attachment contains my modification file .. For more information about how to use patch files, see. After the patch, several bugs need to be modified. My patch files

After the patch, the bad plug-in contains the x265enc plug-in. In the EXT/x265 directory.

Recompile the entire bad plug-in and install it.

Use the gst-inspect-1.0 | grep x265 should be able to see the x265enc plug-in. The plug-in usage is basically the same as that of xforwarenc. Of course, the function is still preliminary, but the basic x265 encoding can be completed.

Ii. Install the x265 Decoder

1. Install libde265

: Https://github.com/strukturag/libde265

Make and install

2. Install gstreamer-libde265

: Https://github.com/strukturag/gstreamer-libde265.git

Dependent on libbz2

Use autogen. Sh to configure

Make installation.

Set the installation location to the environment variable gst_plugin_path.


Iii. Test and use

Refer to the common gstreamer pipeline commands in my other blog.




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.