Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# License of this script: CC0
# Installation of dependent libraries and softwares is required to use this script
# ex. nasm, yasm, libmp3lame-dev, libopus-dev, libvorbis-dev, libvpx-dev...
set -ex
# setup
temp_dir=$(mktemp -d)
# build openh264
cd $temp_dir
git clone -b v1.7.0 --depth 1 --single-branch
cd openh264
make -j `nproc`
sudo make install
sudo ldconfig
# replace openh264 binary to avoid license problem
cd $temp_dir
curl -o ./ -L
sudo cp /usr/local/lib/
sudo rm /usr/local/lib/libopenh264.a
# build ffmpeg
cd $temp_dir
git clone
cd ffmpeg
git checkout n3.4.2
./configure --enable-libopenh264 --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx
make -j `nproc`
sudo make install
# cleanup
rm -rf $temp_dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment