Skip to content

Commit 12a21e3

Browse files
Docs: Adjust the docs to run with build script
Point users to use the build script to build the ffmpeg plugin instead of manually building it. Use the versions for ffmpeg from versions.env
1 parent eefdbc3 commit 12a21e3

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

ecosystem/ffmpeg_plugin/README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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
1230
git clone https://github.com/cisco/openh264.git
1331
cd openh264
@@ -18,27 +36,30 @@ sudo ldconfig
1836
cd ../
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+
2647
git clone https://github.com/FFmpeg/FFmpeg.git
2748
cd 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
3253
cp $mtl_source_code/ecosystem/ffmpeg_plugin/mtl_*.c -rf libavdevice/
3354
cp $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
3758
sudo make install
3859
sudo 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
4364
In 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

Comments
 (0)