Skip to content

Instantly share code, notes, and snippets.

@AdrianHL
Last active June 9, 2021 04:53
Show Gist options
  • Select an option

  • Save AdrianHL/ca6b7019f2897e0a0d0d9ad4f1bfc18e to your computer and use it in GitHub Desktop.

Select an option

Save AdrianHL/ca6b7019f2897e0a0d0d9ad4f1bfc18e to your computer and use it in GitHub Desktop.

Revisions

  1. AdrianHL revised this gist Jan 8, 2019. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion install_ffmpeg_centos_7.sh
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,8 @@ cd nasm-2.14
    make
    make install

    yes | cp -rf ~/bin/nasm /usr/bin/

    #YASM
    cd ~/ffmpeg_sources
    curl -O -L http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
    @@ -150,4 +152,8 @@ PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./conf
    --enable-muxer=stream_segment
    make
    make install
    hash -r
    hash -r

    yes | cp -rf ~/bin/{{ffmpeg,ffprobe,lame,vsyasm,x264,yasm,ytasm} /usr/bin/

    ffmpeg
  2. AdrianHL revised this gist Jan 7, 2019. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install_ffmpeg_centos_7.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/sh
    yum -y update

    yum -y install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel freetype-devel speex-devel ladspa-devel
    yum -y install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel freetype-devel speex-devel ladspa-devel mercurial cmake

    mkdir ~/ffmpeg_sources

    @@ -34,7 +34,7 @@ make install

    #x265
    cd ~/ffmpeg_sources
    git clone https://bitbucket.org/multicoreware/x265
    hg clone https://bitbucket.org/multicoreware/x265
    cd ~/ffmpeg_sources/x265/build/linux
    cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
    make
  3. AdrianHL revised this gist Jan 7, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_ffmpeg_centos_7.sh
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@ make install

    #x265
    cd ~/ffmpeg_sources
    hg clone https://bitbucket.org/multicoreware/x265
    git clone https://bitbucket.org/multicoreware/x265
    cd ~/ffmpeg_sources/x265/build/linux
    cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
    make
  4. AdrianHL revised this gist Jan 3, 2019. No changes.
  5. AdrianHL revised this gist Jan 3, 2019. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions install_ffmpeg_centos_7.sh
    Original file line number Diff line number Diff line change
    @@ -122,9 +122,9 @@ make install

    #FFMPEG
    cd ~/ffmpeg_sources
    curl -O -L http://ffmpeg.org/releases/ffmpeg-4.0.3.tar.bz2
    tar xjvf ffmpeg-4.0.3.tar.bz2
    cd ffmpeg-4.0.3
    curl -O -L https://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" \
    --pkg-config-flags="--static" \
    @@ -145,7 +145,9 @@ PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./conf
    --enable-nonfree \
    --enable-libspeex \
    --enable-libtheora \
    --enable-ladspa
    --enable-ladspa \
    --enable-muxer=segment \
    --enable-muxer=stream_segment
    make
    make install
    hash -r
  6. AdrianHL revised this gist Jan 3, 2019. 1 changed file with 42 additions and 22 deletions.
    64 changes: 42 additions & 22 deletions install_ffmpeg_centos_7.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/sh
    yum -y update

    yum -y install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel freetype-devel speex-devel
    yum -y install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel freetype-devel speex-devel ladspa-devel

    mkdir ~/ffmpeg_sources

    @@ -31,7 +31,6 @@ cd x264
    PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
    make
    make install
    make distclean

    #x265
    cd ~/ffmpeg_sources
    @@ -61,9 +60,9 @@ make install

    #Opus
    cd ~/ffmpeg_sources
    curl -O -L https://archive.mozilla.org/pub/opus/opus-1.3.tar.gz
    tar xzvf opus-1.3.tar.gz
    cd opus-1.3
    curl -O -L https://archive.mozilla.org/pub/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
    make install
    @@ -79,9 +78,9 @@ make install

    #Vorbis
    cd ~/ffmpeg_sources
    curl -O -L http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.6.tar.gz
    tar xzvf libvorbis-1.3.6.tar.gz
    cd libvorbis-1.3.6
    curl -O -L http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.gz
    tar xzvf libvorbis-1.3.5.tar.gz
    cd libvorbis-1.3.5
    ./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared
    make
    make install
    @@ -94,11 +93,38 @@ cd libvpx
    make
    make install

    #LibTheora
    cd ~/ffmpeg_sources
    wget https://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.xz
    tar -xvf libtheora-1.1.1.tar.xz
    cd libtheora-1.1.1
    PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" CPPFLAGS="-I/$HOME/ffmpeg_build/include" ./configure --prefix="$HOME/ffmpeg_build" --disable-shared --disable-static
    make
    make install

    #LibSpeex
    cd ~/ffmpeg_sources
    git clone https://github.com/xiph/speex.git
    cd speex
    autoreconf -fiv
    ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
    make
    make install

    #FreeType
    cd ~/ffmpeg_sources
    wget https://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.gz
    tar -xvf freetype-2.9.tar.gz
    cd freetype-2.9
    ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
    make
    make install

    #FFMPEG
    cd ~/ffmpeg_sources
    curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
    tar xjvf ffmpeg-snapshot.tar.bz2
    cd ffmpeg
    curl -O -L http://ffmpeg.org/releases/ffmpeg-4.0.3.tar.bz2
    tar xjvf ffmpeg-4.0.3.tar.bz2
    cd ffmpeg-4.0.3
    PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
    --prefix="$HOME/ffmpeg_build" \
    --pkg-config-flags="--static" \
    @@ -116,16 +142,10 @@ PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./conf
    --enable-libvpx \
    --enable-libx264 \
    --enable-libx265 \
    --enable-nonfree
    --enable-nonfree \
    --enable-libspeex \
    --enable-libtheora \
    --enable-ladspa
    make
    make install
    hash -r

    #Fast Start
    cd ~/ffmpeg_sources/ffmpeg/tools
    make qt-faststart
    cp qt-faststart /usr/bin
    ldconfig

    #Move Binaries
    cp -a ~/bin/. /usr/local/bin
    hash -r
  7. AdrianHL revised this gist Jan 3, 2019. No changes.
  8. AdrianHL created this gist Jan 3, 2019.
    131 changes: 131 additions & 0 deletions install_ffmpeg_centos_7.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,131 @@
    #!/bin/sh
    yum -y update

    yum -y install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel freetype-devel speex-devel

    mkdir ~/ffmpeg_sources

    #NASM
    cd ~/ffmpeg_sources
    curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.14/nasm-2.14.tar.bz2
    tar xjvf nasm-2.14.tar.bz2
    cd nasm-2.14
    ./autogen.sh
    ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
    make
    make install

    #YASM
    cd ~/ffmpeg_sources
    curl -O -L 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

    #x264
    cd ~/ffmpeg_sources
    git clone --depth 1 http://git.videolan.org/git/x264
    cd x264
    PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
    make
    make install
    make distclean

    #x265
    cd ~/ffmpeg_sources
    hg clone https://bitbucket.org/multicoreware/x265
    cd ~/ffmpeg_sources/x265/build/linux
    cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
    make
    make install

    #FDK-ACC
    cd ~/ffmpeg_sources
    git clone --depth 1 https://github.com/mstorsjo/fdk-aac
    cd fdk-aac
    autoreconf -fiv
    ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
    make
    make install

    #Lame
    cd ~/ffmpeg_sources
    curl -O -L http://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
    tar xzvf lame-3.100.tar.gz
    cd lame-3.100
    ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm
    make
    make install

    #Opus
    cd ~/ffmpeg_sources
    curl -O -L https://archive.mozilla.org/pub/opus/opus-1.3.tar.gz
    tar xzvf opus-1.3.tar.gz
    cd opus-1.3
    ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
    make
    make install

    #OGG
    cd ~/ffmpeg_sources
    curl -O -L http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz
    tar xzvf libogg-1.3.3.tar.gz
    cd libogg-1.3.3
    ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
    make
    make install

    #Vorbis
    cd ~/ffmpeg_sources
    curl -O -L http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.6.tar.gz
    tar xzvf libvorbis-1.3.6.tar.gz
    cd libvorbis-1.3.6
    ./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared
    make
    make install

    #VPX
    cd ~/ffmpeg_sources
    git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git
    cd libvpx
    ./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm
    make
    make install

    #FFMPEG
    cd ~/ffmpeg_sources
    curl -O -L https://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" \
    --pkg-config-flags="--static" \
    --extra-cflags="-I$HOME/ffmpeg_build/include" \
    --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
    --extra-libs=-lpthread \
    --extra-libs=-lm \
    --bindir="$HOME/bin" \
    --enable-gpl \
    --enable-libfdk_aac \
    --enable-libfreetype \
    --enable-libmp3lame \
    --enable-libopus \
    --enable-libvorbis \
    --enable-libvpx \
    --enable-libx264 \
    --enable-libx265 \
    --enable-nonfree
    make
    make install
    hash -r

    #Fast Start
    cd ~/ffmpeg_sources/ffmpeg/tools
    make qt-faststart
    cp qt-faststart /usr/bin
    ldconfig

    #Move Binaries
    cp -a ~/bin/. /usr/local/bin