├── .github └── workflows │ └── installation.yml ├── install └── README.md /.github/workflows/installation.yml: -------------------------------------------------------------------------------- 1 | name: FFmpeg Installation 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Install the ffmpeg 15 | run: | 16 | curl https://raw.githubusercontent.com/XniceCraft/ffmpeg-colab/master/install -o install 17 | chmod +x ./install 18 | ./install 19 | 20 | - name: Test 21 | run: | 22 | wget http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4 23 | ffmpeg -i ForBiggerBlazes.mp4 -c:a libfdk_aac -b:a 192k -c:v libopenh264 -b:v 1000k hi.mp4 24 | -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e -u 4 | 5 | FFMPEGLOC=$(which ffmpeg) 6 | CURL_EXISTS=$(command -v "curl") 7 | WGET_EXISTS=$(command -v "wget") 8 | if [ -z $CURL_EXISTS ] && [ -z $WGET_EXISTS ]; then 9 | echo "Please install either wget or curl" 10 | exit 1 11 | fi 12 | 13 | if [ -z "$FFMPEGLOC" ]; then 14 | echo "No FFmpeg found" 15 | else 16 | echo "FFmpeg was found at "$FFMPEGLOC 17 | echo "Removing old FFmpeg" 18 | rm -rf $FFMPEGLOC 19 | echo "Done" 20 | fi 21 | 22 | if [ ! -f "ffmpeg" ]; then 23 | if [ $WGET_EXISTS ]; then 24 | wget "https://github.com/XniceCraft/ffmpeg-colab/releases/download/7.1/ffmpeg" -O ffmpeg 25 | elif [ $CURL_EXISTS ]; then 26 | curl -o ffmpeg "https://github.com/XniceCraft/ffmpeg-colab/releases/download/7.1/ffmpeg" 27 | fi 28 | fi 29 | 30 | if [ -f "ffmpeg" ]; then 31 | echo "Moving new ffmpeg to /usr/bin" 32 | chmod +x ffmpeg 33 | if [ $(mv ffmpeg "/usr/bin/"; echo $?) != 0 ]; then 34 | echo "Failed move ffmpeg to /usr/bin" 35 | echo "Moving new ffmpeg to /usr/local/bin" 36 | if [ $(mv ffmpeg "/usr/local/bin/"; echo $?) != 0 ]; then 37 | echo "Installation failed. Please check your permission" 38 | exit 1 39 | fi 40 | fi 41 | echo "FFmpeg was successfully installed" 42 | fi 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FFmpeg 7.1 2 |
3 | 4 | 5 |
6 | FFmpeg 7.1 binary for Google Colab 7 | This FFmpeg depends on opengl. 8 | 9 | ### [=] Installation 10 | ``` 11 | !bash <(curl -s https://raw.githubusercontent.com/XniceCraft/ffmpeg-colab/master/install) 12 | ``` 13 | 14 | ### [=] External Library 15 | * ffnvcodec 11.1.5.3 16 | * libaom 3.11.0 17 | * libass 0.17.3 18 | * libbluray 1.3.4 19 | * libdav1d 1.5.0 20 | * libfdk-aac 2.0.3 21 | * libfontconfig 2.15.0 22 | * libfreetype 2.13.3 23 | * libfribidi 1.0.16 24 | * libgme 0.6.3 25 | * libkvazaar 2.3.1 26 | * libmp3lame 3.100~ (custom) 27 | * libopencore 0.1.6 28 | * libopenh264 2.3.1 29 | * libopenjpeg 2.5.3 30 | * libopus 1.5.2 31 | * libshine 3.1.1 32 | * libsoxr 0.1.3 33 | * libsrt 1.5. 34 | * libsvtav1 2.3.0 35 | * libtheora 1.1.1 36 | * libvidstab 1.1.0 37 | * libvmaf 2.3.1 38 | * libvorbis 1.3.7 39 | * libvpx 1.12.0 40 | * libx264 (see x264-stable branch) 41 | * libx265 4.1 42 | * libxvid 1.3.7 43 | * libzimg 3.0.5 44 | * openssl 1.1.1w 45 | * zlib 1.3.1 46 | 47 | NVENC and NVDEC are supported. 48 | 49 | ### [=] FFmpeg Configuration 50 | ``` 51 | configuration: --prefix=/home/ffmpeg-builder/release --pkg-config-flags=--static --extra-libs=-lm --disable-doc --disable-debug --disable-shared --disable-ffprobe --enable-static --enable-gpl --enable-version3 --enable-runtime-cpudetect --enable-avfilter --enable-filters --ld=g++ --enable-nvenc --enable-nvdec --enable-cuvid --toolchain=hardened --disable-stripping --enable-opengl --pkgconfigdir=/home/ffmpeg-builder/release/lib/pkgconfig --extra-cflags='-I/home/ffmpeg-builder/release/include -static -static-libstdc++ -static-libgcc ' --extra-ldflags='-L/home/ffmpeg-builder/release/lib -fstack-protector -Wl,--allow-multiple-definition -static-libstdc++ -static-libgcc ' --extra-cxxflags='-static -static-libstdc++ -static-libgcc ' --extra-ldexeflags='-static-libstdc++ -static-libgcc ' --extra-libs='-ldl -lrt -lpthread' --enable-ffnvcodec --enable-gmp --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libkvazaar --enable-libmp3lame --enable-libopus --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libshine --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-openssl --enable-zlib --enable-nonfree --extra-libs=-lpthread --enable-pthreads --extra-libs=-lgomp 52 | ``` 53 | 54 | ### [=] Builder Script 55 | https://github.com/XniceCraft/ffmpeg-builder 56 | 57 | ``` 58 | CFLAGS="-mtune=generic" python build.py --use-system-build-tools --use-nonfree-libs --static-ffmpeg --exclude-targets "ffmpeg-msys2-deps" --disable-ffplay --extra-ffmpeg-args="--enable-nvenc --enable-nvdec --enable-cuvid --toolchain=hardened --disable-stripping --enable-opengl " --build 59 | ``` 60 | 61 | ### [=] Credit 62 | * libaom 63 | * libass 64 | * libbluray 65 | * libdav1d 66 | * libfdk-aac 67 | * libfontconfig 68 | * libfreetype 69 | * libfribidi 70 | * libgme 71 | * libkvazaar 72 | * libmp3lame custom 73 | * libopencore 74 | * libopenh264 75 | * libopenjpeg 76 | * libopus 77 | * libshine 78 | * libsoxr 79 | * libsrt 80 | * libsvtav1 81 | * libtheora 82 | * libvidstab 83 | * libvmaf 84 | * libvorbis 85 | * libvpx 86 | * libx264 87 | * libx265 88 | * libxvid 89 | * libzimg 90 | * openssl 91 | * zlib 92 | --------------------------------------------------------------------------------