how to install libx265 for ffmpeg build on centos 7 - ffmpeg

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.

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.

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

Related

How to Install FFMpeg on centos 6 in 2022?

a client of mine asked to add videos to their website, i decided to install FFMpeg on their server so whenever they upload a video, the service automatically generates the first frame for the preview and encodes them in webm.
Sadly it seems to be impossible to install without having to compile it myself (which i don't really want to do as i have never done it before and don't want to risk breaking something in their server),
The server is running cento6 but EVERY repository that provides the centos6 version of FFMpeg seem to use dependencies from dead hosts (they are offline and unreachable), every solution i find ends up with the same error like "Couldn't resolve host 'apt.sw.be'"
I've changed yam repositories, installed apt-get to try with that instead of yam, disabled and enable repos like nux that seem to be very outdated, even followed posts that were published/updated recently like this but they all keep ending up with the the same "Couldn't resolve host..." when installing decencies.
Is there any live and updated repo that provides a way to install FFMpeg for centos6 with yum or apt-get in 2022?
Thanks
EDIT
Following Romeo's tip about downloading the binaries, i managed to install it but in my case i needed a older 32 bit version to make it work (else i'd get Kernel too old):
$ wget https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-4.0.3-32bit-static.tar.xz
$ tar xvf ffmpeg-4.0.3-32bit-static.tar.xz
$ sudo mv ffmpeg-4.0.3-32bit-static/ffmpeg ffmpeg-4.0.3-32bit-static/ffprobe /usr/local/bin/
What you can do is to try to install statically build ffmpeg binary. This will help you not to search for contemporary package and update your CentOS.
You can try this version (64bit version).

How to install ffmpeg on CentOS 6

I have been trying to install ffmpeg for 2 days now and had no luck. I have tried countless videos on youtube, step by steps on google with no luck. Any help would be great.
I have a Centos 6 server.
Yes I am using root ssh in terminal on mac.
Commands I tried are:
wget http://mirror.ffmpeginstaller.com/old/scripts/ffmpeg8/ffmpeginstaller.8.0. tar.gz
tar -xvzf ffmpeginstaller.8.0.tar.gz
cd ffmpeginstaller.8.0
./install.sh
Static build
Easiest method is to download a recent version that is already compiled.
Download a static build of ffmpeg from https://www.johnvansickle.com/ffmpeg/
Extract the archive file you just downloaded from the above site
(optional) Copy or move the ffmpeg file into /usr/local/bin
Compile
If you prefer to make a custom build you can compile. See FFmpeg Wiki: Compile FFmpeg on CentOS.

FFMPEG Install/enable 'libfdk_aac' after installed FFMPEG via PPA

I have linux MINT 17.3 Kernel 4.4.0-81 all update available. (For different reasons I can't move to newer version of ubuntu/mint)
I have installed FFMPEG via PPA (NOT from compiling the source):
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 -y
sudo apt-get update
sudo apt-get install -y ffmpeg
Then I tried to install libfdk-aac with guide:
https://trac.ffmpeg.org/wiki/CompilationGuide/Quick/libfdk-aac
sudo apt-get install pkg-config autoconf automake libtool
git clone https://github.com/mstorsjo/fdk-aac.git
cd fdk-aac
./autogen.sh
./configure --enable-shared --enable-static
make
sudo make install
sudo ldconfig
But I'm still receive from FFMPEG: "unknown encoder 'libfdk_aac'"
How can I check if "libfdk_aac' is correctly installed and HOW CAN I ACTIVATE / ENABLE the 'libfdk_aac' on FFMPEG?
If is not possible in my situation, and if I'm obliged to remove all ffmpeg and follow this:
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
FFmpeg does not have a "plug-n-play" codec system. If you want to add another external codec you must compile FFmpeg.
Alternatively, you could find a static ffmpeg binary that includes your desired codecs, but this is not a likely option due to the non-free/GPL incompatible situation of the fdk-aac license.
Your best option if you want to use libfdk_aac is to follow the compile guide you linked to. You can even keep the ffmpeg you installed from that PPA because the guide does not interfere with any existing repository ffmpeg.

Installing FFmpeg in ubuntu server which file to run for installing ffmpeg from downloaded package [duplicate]

This question already has answers here:
How to install ffmpeg for PHP
(2 answers)
Closed 6 years ago.
I have downloaded ffmpeg from http://ffmpeg.org to manipulate multimedia data using php codeigniter and i have got a package with bunch of libraries inside.
I want to run the ffmpeg in ubuntu server but i don't know which file (.exec file) to run from that package.please anyone who could help me figure out which file to Execute to use ffmpeg.
Install the yasm assembler
sudo apt-get install yasm
Configure the build. You can add your own options here.
./configure
Build and install.
make -j9
sudo make install
Find out more https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
EDIT: I'm not familiar with ffmpeg and php because I mainly use the shared libraries with my own C++ code. However, there is some information about using it from web pages here -> https://trac.ffmpeg.org/wiki/PHP

Install ffmpeg on centos server

while installing ffmpeg on my centos server.I get this error while running ./configure: checking for ffmpeg headers... configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option
cd /usr/local/src
wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2?use_mirror=nchc
tar -xjf ffmpeg-php-0.6.0.tbz2
phpize
./configure
make make
install
Try using ffmpeg auto installer, you need to dounload a package with required plugins, its free,
you can refer this link for demo
https://www.youtube.com/watch?v=EaaT7vj8K2s
Here you will get complete installation package
http://ffmpeginstaller.com/
It will take around 30 mins for complete installation, you just need to keep an eye on command prompt.
You can Install FFMPEG on CENTOS by just Downloading rpm package of ffmpeg from ffmpeg.org and place at a particular location in ur Centos Server.
by Configuring the binary you can easily use ffmpeg commands.
Hope this Will help you :)
I hope this helps.
If ever you're trying to install ffmpeg to CENTOS 7, you might want to try this since this is what I did since I have a unsolvable problems with my packages.
Download compressed ffmpeg and extract it to the server: https://www.johnvansickle.com/ffmpeg/ in this case I used ffmpeg-git-amd64-static.tar.xz.
Extract the xz file. cmd: tar -xf filename.tar.xz
Extract the tar file if it's still in tar file. cmd: tar -xvf filename.tar
Go to the extracted file’s directory.
You must see these files under the folder
Try the command ./ffmpeg -version
Add it to the environment variable so that you can use the ffmpeg globally. Assuming that the ffmpeg main folder is contained in usr/ffmpeg, get the original PATH value using the command: echo $PATH , copy the original path value add it with the path of the ffmpeg directory (e.g. :usr/ffmpeg) and add it to the PATH environment variable with the command: export
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/ffmpeg
You should be able to use the ffmpeg command now with cmd: ffmpeg -version
Try to convert files now example: cmd: ffmpeg -i input.webm output.mp4 and it should all work now.

Resources