Compile FFmpeg in Ubuntu and support x264 and x265 (HECV)

Source: Internet
Author: User

All download sources
Compile FFmpeg in Ubuntu and support x264 and x265.
Ubuntu 12.04

FFmpeg 2.1 Release

Note:
Upgrade cmake to 2.8.8
Upgrade yasm to 1.2.0

0000. materials:
Http://stackoverflow.com/questions/19634453/ffmpeg-how-to-generate-a-mp4-with-h-265-codec
FFmpeg supports encoding HEVC/H.265 since 2-12-2014 with libx265. Now you can use ffmpeg directly to encode HEVC or use another encoder than manually mux that. mp4 using FFmpeg. of course you can still use some patched FFmpeg build, but it is not recommended.
To make matters more confusing, there are two independent projects both named "x265", one by a Chinese college student and is practically dead, and another by a specified cial company called MulticoreWare. although the former started out first, it is practically dead now, and the latter is under active development and is supported by VideoLAN (the developer of x264 ).
Anyways, these are a complete set of current possibilities of encoding HEVC in order of my recommendation:
Directly using MulticoreWare libx265 with FFmpeg. This means with the latest Zeranoe build you can now do this:
Ffmpeg-I INPUT-x265-params crf = 25 OUT. mov
Using standalone MulticoreWare x265 and then mux the resulting file with FFmpeg.

Using DivX HEVC Encoder and then mux it.
Using standalone Chinese x265 then mux the resulting file with FFmpeg.
Using patched FFmpeg with Chinese x265 support.
Update: FFmpeg has HEVC encoding support using MulticoreWare libx265 now.

0001. Official Instructions:
Http://ffmpeg.org/general.html
External libraries
X265
FFmpeg can make use of the x265 library for HEVC encoding.
Go to http://x265.org/developers.html and follow the instructions for installing the library. Then pass -- enable-libx265 to configure to enable it.
X265 is under the GNU Public License Version 2 or later (see http://www.gnu.org/licenses/old-licenses/gpl-2.0.html for details), you must upgrade FFmpeg's license to GPL in order to use it.

0002. Install x264
$ Git clone git: // git.videolan.org/x264.git
$ Cd x264
$./Configure -- enable-static -- disable-opencl -- disable-avs -- disable-cli -- disable-ffms -- disable-gpac -- disable-lavf -- disable-swscale
$ Make
$ Make install

0003. Install x265
Https://bitbucket.org/multicoreware/x265/wiki/Home
# Ubuntu packages:
$ Sudo apt-get install mercurial cmake-curses-gui build-essential yasm
# Note: if the packaged yasm is older than 1.2, you must download yasm-1.2 and build it
$ Hg clone https://bitbucket.org/multicoreware/x265
$ Cd x265/build/linux
$./Make-Makefiles.bash
# Set LOG_CU_STATISTICS to ON, then press "c" to implement configure, and press "q" to exit
$ Make
$ Make install

0004. Download ffmpeg
Download ffmpeg 2.1 source code from http://ffmpeg.org/download.html
$./Configure -- enable-libx264 -- enable-libx265 -- enable-gpl
$ Make
$ Make install

FFmpeg details: click here
FFmpeg: click here

Recommended reading:

Compile FFmpeg in Linux to download and compile the source file

Linux compiling and upgrading FFmpeg

Install FFMPEG on CentOS 5.6

Install FFmpeg in Ubuntu

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.