How to compile FFMPEG with h.265, h.264 and vp9 support on CentOS

You should install the latest nasm version using yum by adding the repository:

yum-config-manager --add-repo http://www.nasm.us/nasm.repo

Then:

yum install nasm

This gives you nasm ≥ 2.13.

With this, the rest of the ffmpeg guide should work. I updated the guide on the FFmpeg Wiki, too.


If you like to compile things yourself:

curl -LO https://www.nasm.us/pub/nasm/releasebuilds/2.13.01/nasm-2.13.01.tar.gz
tar xzvf nasm-2.13.01.tar.gz 
cd nasm-2.13.01
./configure --prefix=/opt/nasm
make
sudo make install
export PATH=/opt/nasm/bin/:$PATH