Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit f2852e7

Browse files
Guo, Jianshengtianjunwork1480c1
authored
Update README in ffmpeg plugin (#566)
Signed-off-by: Guo Jiansheng <[email protected]> Co-authored-by: Jun <[email protected]> Co-authored-by: Christopher Degawa <[email protected]>
1 parent 39ba550 commit f2852e7

File tree

2 files changed

+73
-58
lines changed

2 files changed

+73
-58
lines changed

ffmpeg_plugin/README.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# SVT-HEVC ffmpeg plugin installation
2+
3+
These instructions build a version of ffmpeg with the SVT-HEVC plugin. The steps differ depending
4+
on whether using a Linux or Windows build machine.
5+
6+
## For Linux:
7+
8+
1\. Build and install SVT-HEVC
9+
10+
``` bash
11+
git clone https://github.com/OpenVisualCloud/SVT-HEVC
12+
cd SVT-HEVC/Build/linux
13+
./build.sh release
14+
cd release
15+
make install
16+
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
17+
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig
18+
```
19+
## For Windows:
20+
0\. Setup environment
21+
``` bash
22+
Install Visual Studio 2017
23+
Install msys2-x86_64 to C:\msys64 following instructions found on http://www.msys2.org/
24+
Run "C:\msys64\mingw64.exe" to open a msys2 mingw-w64 shell. All subsequent build steps should be done in this shell.
25+
Execute "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+
```
27+
1\. Build and install SVT-HEVC
28+
``` bash
29+
git clone https://github.com/OpenVisualCloud/SVT-HEVC
30+
```
31+
Option 1: use msvc compiler
32+
``` bash
33+
cd SVT-HEVC/Build/windows
34+
./build.bat 2017 release
35+
cmake --install . --config Release
36+
```
37+
Option 2: use mingw-w64 gcc
38+
``` bash
39+
mkdir release
40+
cd release
41+
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:/svt-encoders -DBUILD_SHARED_LIBS=off
42+
make -j $(nproc) install
43+
cd ../..
44+
```
45+
The location c:/svt-encoders is used to store a package configuration for the SvtHevcEnc library.
46+
``` bash
47+
export PKG_CONFIG_PATH=/c/svt-encoders/lib/pkgconfig:$PKG_CONFIG_PATH
48+
```
49+
This instruction will verify that the SvtHevcEnc library can be found when building ffmpeg
50+
``` bash
51+
pkg-config --print-errors SvtHevcEnc
52+
export PATH=$PATH:/c/svt-encoders/lib/
53+
```
54+
## For Both:
55+
2\. Install FFmpeg with SVT-HEVC FFmpeg plugin
56+
``` bash
57+
git clone https://github.com/FFmpeg/FFmpeg ffmpeg
58+
cd ffmpeg
59+
60+
# The patch have been validated on 4.2 and 4.3 release
61+
git checkout release/4.2
62+
or
63+
git checkout release/4.3
64+
65+
git am ../SVT-HEVC/ffmpeg_plugin/0001*.patch
66+
./configure --enable-libsvthevc
67+
make -j $(nproc)
68+
```
69+
3\. Verify that ffmpeg can encode media files using the SVT-HEVC plug-in
70+
``` bash
71+
./ffmpeg -i input.mp4 -c:v libsvt_hevc -rc 1 -b:v 10M -tune 0 -preset 9 -y test.265
72+
./ffmpeg -i input.mp4 -c:v libsvt_hevc -vframes 1000 -y test.mp4
73+
```

ffmpeg_plugin/README.txt

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)