Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
0002-doc-Add-libsvt_hevc-encoder-docs.patch | H A D | 02-Jun-2021 | 5.3 KiB | 202 | 193 | |
README.md | H A D | 02-Jun-2021 | 2.7 KiB | 81 | 72 | |
master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch | H A D | 02-Jun-2021 | 24.7 KiB | 674 | 670 | |
n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch | H A D | 02-Jun-2021 | 24.7 KiB | 674 | 670 |
README.md
1# SVT-HEVC ffmpeg plugin installation 2 3These instructions build a version of ffmpeg with the SVT-HEVC plugin. The steps differ depending 4on whether using a Linux or Windows build machine. 5 6## For Linux: 7 81\. Build and install SVT-HEVC 9 10``` bash 11git clone https://github.com/OpenVisualCloud/SVT-HEVC 12cd SVT-HEVC/Build/linux 13./build.sh release 14cd Release 15make install 16export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib 17export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig 18``` 19## For Windows: 200\. Setup environment 21``` bash 22Install Visual Studio 2017 23Install msys2-x86_64 to C:\msys64 following instructions found on http://www.msys2.org/ 24Run "C:\msys64\mingw64.exe" to open a msys2 mingw-w64 shell. All subsequent build steps should be done in this shell. 25Execute "pacman -S --needed make mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-yasm mingw-w64-x86_64-SDL2 perl diffutils pkg-config git tar" in the console 26``` 271\. Build and install SVT-HEVC 28``` bash 29git clone https://github.com/OpenVisualCloud/SVT-HEVC 30``` 31Option 1: use msvc compiler 32``` bash 33cd SVT-HEVC/Build/windows 34./build.bat 2017 release 35cmake --install . --config Release 36``` 37Option 2: use mingw-w64 gcc 38``` bash 39mkdir release 40cd release 41cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:/svt-encoders -DBUILD_SHARED_LIBS=off 42make -j $(nproc) install 43cd ../.. 44``` 45The location c:/svt-encoders is used to store a package configuration for the SvtHevcEnc library. 46``` bash 47export PKG_CONFIG_PATH=/c/svt-encoders/lib/pkgconfig:$PKG_CONFIG_PATH 48``` 49This instruction will verify that the SvtHevcEnc library can be found when building ffmpeg 50``` bash 51pkg-config --print-errors SvtHevcEnc 52export PATH=$PATH:/c/svt-encoders/lib/ 53``` 54## For Both: 552\. Install FFmpeg with SVT-HEVC FFmpeg plugin 56``` bash 57git clone https://github.com/FFmpeg/FFmpeg ffmpeg 58cd ffmpeg 59 60# The patch n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch has been validated on n4.2/n4.3/n4.4 release tag 61git checkout n4.2 62or 63git checkout n4.3 64or 65git checkout n4.4 66 67git am ../SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch 68 69# If the above patch failed when you work on master branch or newer version of FFmpeg, 70# please try the patch for master branch: master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch 71git am ../SVT-HEVC/ffmpeg_plugin/master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch 72 73./configure --enable-libsvthevc 74make -j $(nproc) 75``` 763\. Verify that ffmpeg can encode media files using the SVT-HEVC plug-in 77``` bash 78./ffmpeg -i input.mp4 -c:v libsvt_hevc -rc 1 -b:v 10M -tune 0 -preset 9 -y test.265 79./ffmpeg -i input.mp4 -c:v libsvt_hevc -vframes 1000 -y test.mp4 80``` 81