@@ -6,8 +6,26 @@ FFmpeg is an open source project licensed under LGPL and GPL. See <https://www.f
66
77## 1. Build
88
9+ You can use the ./build.sh that will build the script for you automatically,
10+
11+ ``` bash
12+ apt-get install wget patch unzip
13+ # in the ecosystem/ffmpeg_plugin/ folder
14+ ./build.sh
15+ ```
16+
17+ The manual way of building is described below
18+
919### 1.1. Build openh264
1020
21+ Before building, check if openh264 is already installed:
22+
23+ ``` bash
24+ ldconfig -p | grep libopenh264
25+ ```
26+
27+ If the command outputs a path to ` libopenh264.so ` , openh264 is present and you can skip the build step below.
28+
1129``` bash
1230git clone https://github.com/cisco/openh264.git
1331cd openh264
@@ -18,27 +36,30 @@ sudo ldconfig
1836cd ../
1937```
2038
39+
2140### 1.2. Build FFmpeg with MTL patches
2241
2342> Note: ` $mtl_source_code ` should be pointed to top source code tree of Media Transport Library.
2443
2544``` bash
45+ . $mtl_source_code /versions.env
46+
2647git clone https://github.com/FFmpeg/FFmpeg.git
2748cd FFmpeg
28- git checkout release/7.0
49+ git checkout release/${FFMPEG_VERSION}
2950# apply the build patch
30- git am $mtl_source_code /ecosystem/ffmpeg_plugin/7.0 /* .patch
51+ git am $mtl_source_code /ecosystem/ffmpeg_plugin/${FFMPEG_VERSION} /* .patch
3152# copy the mtl in/out implementation code
3253cp $mtl_source_code /ecosystem/ffmpeg_plugin/mtl_* .c -rf libavdevice/
3354cp $mtl_source_code /ecosystem/ffmpeg_plugin/mtl_* .h -rf libavdevice/
3455# build with --enable-mtl, customize the option as your setup
3556./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl
36- make -j " $( nproc ) "
57+ make -j
3758sudo make install
3859sudo ldconfig
3960```
4061
41- > Note: For FFmpeg version 4.4 or 6.1, replace 7.0 with 4.4 or 6.1 respectively in above commands .
62+ > Note: For FFmpeg version 4.4 or 6.1, export ` FFMPEG_VERSION= 4.4` or 6.1.
4263
4364In order to build the FFmpeg in a non-default path, use ` --prefix="<path>" ` within the ` ./configure ` command to point to an empty installation folder.
4465
0 commit comments