Skip to content

Instantly share code, notes, and snippets.

@qnub
Last active March 22, 2017 12:56
Show Gist options
  • Save qnub/65058920ff03e5704a80b2800f0c7e78 to your computer and use it in GitHub Desktop.
Save qnub/65058920ff03e5704a80b2800f0c7e78 to your computer and use it in GitHub Desktop.
This gist will show you how to build a minimalist ffmpeg binary and OBS on Ubuntu 16.10
#!/usr/bin/env bash
git clone https://github.com/FFmpeg/FFmpeg -b master
cd FFmpeg
git pull
./configure --enable-shared --enable-gpl --enable-libass --enable-libfreetype --enable-libx264 --enable-libx265 --enable-nvenc --enable-nonfree --enable-libfdk-aac --disable-static
make -j$(nproc)
sudo checkinstall --pkgname=FFmpeg --fstrans=no --backup=no --pkgversion="$(date +%Y%m%d)-git" --deldoc=yes --install=yes --
showinstall=no
make -j$(nproc) distclean
cd ..
git clone https://github.com/jp9000/obs-studio.git
cd obs-studio
git pull
git submodule update --init --recursive
mkdir -p build
cd build
cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
make -j$(nproc)
sudo checkinstall --pkgname=OBS-studio --fstrans=no --backup=no --pkgversion="$(date +%Y%m%d)-git" --deldoc=yes --install=ye
s --showintall=no
make -j$(nproc) clean
echo "ffmpeg and OBS with NVENC support installed"
ffmpeg -encoders 2>/dev/null | grep nvenc
#!/usr/bin/env bash
NVIDIA=$1
sudo add-apt-repository ppa:graphics-drivers/ppaffmpeg
sudo apt-get -y update && sudo apt-get dist-upgrade -y
sudo apt-get -y install autoconf automake build-essential checkinstall pkg-config cmake git \
mercurial libass-dev libtool pkg-config texinfo zlib1g-dev \
install glew-utils libglew-dbg libglew-dev libglew1.13 \
libglewmx-dev libglewmx-dbg freeglut3 freeglut3-dev libghc-glut-dev \
libghc-glut-doc libghc-glut-prof libalut-dev libxmu-dev libxmu-headers libxmu6 \
libxmu6-dbg libxmuu-dev libxmuu1 libxmuu1-db \
ffmpeg libav-tools x264 x265 libfdk-aac libfdk-aac-dev \
libx11-dev libgl1-mesa-dev libpulse-dev libxcomposite-dev \
libxinerama-dev libv4l-dev libudev-dev libfreetype6-dev \
libfontconfig-dev qtbase5-dev libqt5x11extras5-dev libx264-dev \
libxcb-xinerama0-dev libxcb-shm0-dev libjack-jackd2-dev libcurl4-openssl-dev
nvidia-${NVIDIA} nvidia-${NVIDIA}-dev
sudo apt-get install nvidia-cuda-toolkit --install-recommends -y
sudo update-alternatives --config i386-linux-gnu_gl_conf
sudo ldconfig
echo "Installation done. Please make 'sudo systemctl reboot' and run './build.sh' after reboot"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment