Created
April 25, 2019 09:44
-
-
Save Samfox2/04ab79c8fdc4216ec63e0ebde64b2e51 to your computer and use it in GitHub Desktop.
Revisions
-
Brainiarc7 revised this gist
Jun 8, 2018 . 1 changed file with 41 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,25 +12,37 @@ sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libxcb-xfixes0-dev pkg-config texi2html zlib1g-dev } #install CUDA SDK InstallCUDASDK(){ echo "Installing CUDA and the latest driver repositories from repositories" cd ~/ffmpeg_sources wget -c -v -nc https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.2.88-1_amd64.deb sudo dpkg -i cuda-repo-ubuntu1604_9.2.88-1_amd64.deb sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub sudo apt-get -y update sudo apt-get -y install cuda sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update && sudo apt-get -y upgrade } #Install nvidia SDK installSDK(){ echo "Installing the nVidia NVENC SDK." cd ~/ffmpeg_sources cd ~/ffmpeg_sources git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git cd nv-codec-headers make sudo make install } #Compile nasm compileNasm(){ echo "Compiling nasm" cd ~/ffmpeg_sources wget http://www.nasm.us/pub/nasm/releasebuilds/2.14rc0/nasm-2.14rc0.tar.gz tar xzvf nasm-2.14rc0.tar.gz cd nasm-2.14rc0 ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" make -j$(nproc) make -j$(nproc) install @@ -83,9 +95,9 @@ make -j$(nproc) distclean compileLibOpus(){ echo "Compiling libopus" cd ~/ffmpeg_sources wget http://downloads.xiph.org/releases/opus/opus-1.2.1.tar.gz tar xzvf opus-1.2.1.tar.gz cd opus-1.2.1 ./configure --prefix="$HOME/ffmpeg_build" --disable-shared make -j$(nproc) make -j$(nproc) install @@ -96,10 +108,11 @@ make -j$(nproc) distclean compileLibPvx(){ echo "Compiling libvpx" cd ~/ffmpeg_sources git clone https://chromium.googlesource.com/webm/libvpx cd libvpx PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples --enable-runtime-cpu-detect --enable-vp9 --enable-vp8 \ --enable-postproc --enable-vp9-postproc --enable-multi-res-encoding --enable-webm-io --enable-better-hw-compatibility --enable-vp9-highbitdepth --enable-onthefly-bitpacking --enable-realtime-only \ --cpu=native --as=nasm PATH="$HOME/bin:$PATH" make -j$(nproc) make -j$(nproc) install make -j$(nproc) clean @@ -109,14 +122,18 @@ make -j$(nproc) clean compileFfmpeg(){ echo "Compiling ffmpeg" cd ~/ffmpeg_sources git clone https://github.com/FFmpeg/FFmpeg -b master cd FFmpeg PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \ --prefix="$HOME/ffmpeg_build" \ --extra-cflags="-I$HOME/ffmpeg_build/include" \ --extra-ldflags="-L$HOME/ffmpeg_build/lib" \ --bindir="$HOME/bin" \ --enable-cuda-sdk \ --enable-cuvid \ --enable-libnpp \ --extra-cflags="-I/usr/local/cuda/include/" \ --extra-ldflags=-L/usr/local/cuda/lib64/ \ --enable-gpl \ --enable-libass \ --enable-libfdk-aac \ @@ -140,8 +157,9 @@ hash -r cd ~ mkdir ffmpeg_sources installLibs InstallCUDASDK installSDK compileNasm compileLibX264 compileLibfdkcc compileLibMP3Lame -
Brainiarc7 revised this gist
Nov 27, 2016 . 1 changed file with 28 additions and 27 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,9 +32,9 @@ wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz tar xzvf yasm-1.3.0.tar.gz cd yasm-1.3.0 ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" make -j$(nproc) make -j$(nproc) install make -j$(nproc) distclean } #Compile libx264 @@ -45,9 +45,9 @@ wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2 tar xjvf last_x264.tar.bz2 cd x264-snapshot* PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static PATH="$HOME/bin:$PATH" make -j$(nproc) make -j$(nproc) install make -j$(nproc) distclean } #Compile libfdk-acc @@ -60,9 +60,9 @@ unzip fdk-aac.zip cd mstorsjo-fdk-aac* autoreconf -fiv ./configure --prefix="$HOME/ffmpeg_build" --disable-shared make -j$(nproc) make -j$(nproc) install make -j$(nproc) distclean } #Compile libmp3lame @@ -74,35 +74,35 @@ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz tar xzvf lame-3.99.5.tar.gz cd lame-3.99.5 ./configure --prefix="$HOME/ffmpeg_build" --enable-nasm --disable-shared make -j$(nproc) make -j$(nproc) install make -j$(nproc) distclean } #Compile libopus compileLibOpus(){ echo "Compiling libopus" cd ~/ffmpeg_sources wget http://downloads.xiph.org/releases/opus/opus-1.1.3.tar.gz tar xzvf opus-1.1.3.tar.gz cd opus-1.1.3 ./configure --prefix="$HOME/ffmpeg_build" --disable-shared make -j$(nproc) make -j$(nproc) install make -j$(nproc) distclean } #Compile libvpx compileLibPvx(){ echo "Compiling libvpx" cd ~/ffmpeg_sources wget storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-1.6.0.tar.bz2 tar xjvf libvpx-v1.6.0.tar.bz2 cd libvpx-v1.6.0 PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples PATH="$HOME/bin:$PATH" make -j$(nproc) make -j$(nproc) install make -j$(nproc) clean } #Compile ffmpeg @@ -120,6 +120,7 @@ PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./conf --enable-gpl \ --enable-libass \ --enable-libfdk-aac \ --enable-vaapi \ --enable-libfreetype \ --enable-libmp3lame \ --enable-libopus \ @@ -129,9 +130,9 @@ PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./conf --enable-libx264 \ --enable-nonfree \ --enable-nvenc PATH="$HOME/bin:$PATH" make -j$(nproc) make -j$(nproc) install make -j$(nproc) distclean hash -r } -
Brainiarc7 renamed this gist
Oct 29, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ #!/bin/bash #This script will compile and install a static ffmpeg build with support for nvenc un ubuntu. #See the prefix path and compile options if edits are needed to suit your needs. #install required things from apt installLibs(){ echo "Installing prerequisites" sudo apt-get update sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \ libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \ -
Brainiarc7 created this gist
Oct 29, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,150 @@ #!/bin/bash #This script will hopefully install ffmpeg with support for nvenc un ubuntu. #Cross your fingers. #install required things from apt installLibs(){ echo "Installing prerequosites" sudo apt-get update sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \ libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \ libxcb-xfixes0-dev pkg-config texi2html zlib1g-dev } #Install nvidia SDK installSDK(){ echo "Installing the nVidia NVENC SDK." cd ~/ffmpeg_sources mkdir SDK cd SDK wget http://developer.download.nvidia.com/compute/nvenc/v5.0/nvenc_5.0.1_sdk.zip -O sdk.zip unzip sdk.zip cd nvenc_5.0.1_sdk sudo cp Samples/common/inc/* /usr/include/ } #Compile yasm compileYasm(){ echo "Compiling yasm" cd ~/ffmpeg_sources wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz tar xzvf yasm-1.3.0.tar.gz cd yasm-1.3.0 ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" make make install make distclean } #Compile libx264 compileLibX264(){ echo "Compiling libx264" cd ~/ffmpeg_sources wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2 tar xjvf last_x264.tar.bz2 cd x264-snapshot* PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static PATH="$HOME/bin:$PATH" make make install make distclean } #Compile libfdk-acc compileLibfdkcc(){ echo "Compiling libfdk-cc" sudo apt-get install unzip cd ~/ffmpeg_sources wget -O fdk-aac.zip https://github.com/mstorsjo/fdk-aac/zipball/master unzip fdk-aac.zip cd mstorsjo-fdk-aac* autoreconf -fiv ./configure --prefix="$HOME/ffmpeg_build" --disable-shared make make install make distclean } #Compile libmp3lame compileLibMP3Lame(){ echo "Compiling libmp3lame" sudo apt-get install nasm cd ~/ffmpeg_sources wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz tar xzvf lame-3.99.5.tar.gz cd lame-3.99.5 ./configure --prefix="$HOME/ffmpeg_build" --enable-nasm --disable-shared make make install make distclean } #Compile libopus compileLibOpus(){ echo "Compiling libopus" cd ~/ffmpeg_sources wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz tar xzvf opus-1.1.tar.gz cd opus-1.1 ./configure --prefix="$HOME/ffmpeg_build" --disable-shared make make install make distclean } #Compile libvpx compileLibPvx(){ echo "Compiling libvpx" cd ~/ffmpeg_sources wget http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2 tar xjvf libvpx-v1.3.0.tar.bz2 cd libvpx-v1.3.0 PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples PATH="$HOME/bin:$PATH" make make install make clean } #Compile ffmpeg compileFfmpeg(){ echo "Compiling ffmpeg" cd ~/ffmpeg_sources wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 tar xjvf ffmpeg-snapshot.tar.bz2 cd ffmpeg PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \ --prefix="$HOME/ffmpeg_build" \ --extra-cflags="-I$HOME/ffmpeg_build/include" \ --extra-ldflags="-L$HOME/ffmpeg_build/lib" \ --bindir="$HOME/bin" \ --enable-gpl \ --enable-libass \ --enable-libfdk-aac \ --enable-libfreetype \ --enable-libmp3lame \ --enable-libopus \ --enable-libtheora \ --enable-libvorbis \ --enable-libvpx \ --enable-libx264 \ --enable-nonfree \ --enable-nvenc PATH="$HOME/bin:$PATH" make make install make distclean hash -r } #The process cd ~ mkdir ffmpeg_sources installLibs installSDK compileYasm compileLibX264 compileLibfdkcc compileLibMP3Lame compileLibOpus compileLibPvx compileFfmpeg echo "Complete!"