krishna
krishna

Reputation: 31

how to install libx265 for ffmpeg build on centos 7

When I try to compile ffmpeg with libx265 (./configure --enable-gpl --enable-libx265), it is getting error as: (ERROR: x265 not found using pkg-config). How to install libx265 and get configure with ffmpeg.

Upvotes: 2

Views: 7418

Answers (2)

Mobieus Jay
Mobieus Jay

Reputation: 39

I wrote a script for Ubuntu recently, but I think it can be applied to CentOS. You need to comment off the Ubuntu apt-get in the script in order to get it running.

Also before you use it, please ensure that you have git and mercurial installed. My script pulls the latest copy of necessary libraries from either from git or mercurial.

https://github.com/tangingw/libx265_installer

Upvotes: 0

Martin
Martin

Reputation: 4030

There are two solutions to your problem.

A)

If there are no libx265 available on CentOS 7 then you'll have to build it yourself. It follows the pretty straightforward method of configure/make.

Using mercurial:

hg clone http://hg.videolan.org/x265
cd x265/build/linux
./make-Makefiles.bash
make -j6
make install
ldconfig

Then be sure to specify the path libx265 was installed to when building ffmpeg. With pkg-config: PKG_CONFIG_PATH="/usr/local/lib/pkgconfig".

B)

But it appears there are rpm entries for x265 on CentOS 7: http://pkgs.org/centos-7/nux-dextop-x86_64/x265-devel-1.2-6.el7.nux.x86_64.rpm.html. If they are compatible on your system you should be able to simply install instead of building.

Upvotes: 2

Related Questions