Skip to content

Commit

Permalink
fix: use ffmpeg master as it is more stable than 6.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
BartSte committed Apr 17, 2024
1 parent a5c9bf9 commit 93c70b6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 45 deletions.
44 changes: 24 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
- [Using the configuration file](#using-the-configuration-file)
- [Set the logging level](#set-the-logging-level)
- [Development](#development)
- [Tarball](#tarball)
- [Test](#test)
- [Tarball](#tarball)
- [Debugging](#debugging)
- [License](#license)
- [Troubleshooting](#troubleshooting)
Expand Down Expand Up @@ -83,12 +83,11 @@ This creates a `snapshot-<version>` directory with the following structure:

```bash
snapshot-<version>
├── bin/
├── lib/
├── runtime/
└── snapshot
```

where `bin` and `lib` are directories that you should not touch. The `snapshot`
the `runtime` directory contains files you should not touch. The `snapshot`
script is the one that you should use to interact with the application. For
example:

Expand Down Expand Up @@ -413,22 +412,6 @@ If you want to contribute to this project, you should start by reading
source](#from-source). This section provides information about: the tarball, the
unit tests, and ways to debug the application.

### Tarball

Additional information about the stand-alone tarball is provided here.

- `snapshot` executable in the form of a bash script. This script:
- sets the `LD_LIBRARY_PATH` to the `lib` directory and runs the `snapshot`
binary.
- resolves the path to the script if it is referenced using a symlink.
- `bin` directory with the `snapshot` binary.
- `lib` directory with the shared libraries that the `snapshot` binary depends
on. In case the project is built with the `--shared` option, the `lib` folder
will also contain subdirectories with the libraries of the Qt plugins. The
`lib` directory does not include the standard `c/c++` libraries (`libc`,
`libstdc++`, `libm`, `libdbm`, `libpthread`) together with the dynamic linker
as they are assumed to be present on the system.

### Test

Googletest and QTest are used for building the unit tests and the end-to-end
Expand All @@ -446,6 +429,26 @@ run the following command:
ctest --test-dir ./build
```

### Tarball

Additional information about the stand-alone tarball is provided here.

- `snapshot` is an executable in the form of a bash script. This script:
- sets the `LD_LIBRARY_PATH` to the `lib` directory and runs the `snapshot`
binary.
- resolves the path to the script if it is referenced using a symlink.
- the `runtime` directory contains shared libraries and binaries that the
`snapshot` script depends on. In case the project is built with the `--shared`
option, the `runtime` folder will also contain subdirectories with the
libraries of the Qt plugins. The `runtime` directory does not include the
standard `c/c++` libraries (`libc`, `libstdc++`, `libm`, `libdbm`,
`libpthread`) together with the dynamic linker as they are assumed to be
present on the system.
- `snapshot_test` is an executable in the form of a bash script. This script is
only present when the project is built with the `cmake` option
`-DBUILD_TESTING=ON`. If so, when running the `snapshot_test` script, all
tests are executed.

### Debugging

You can use one of the following ways to run the application with a video stream:
Expand Down Expand Up @@ -543,3 +546,4 @@ very useful when you encounter issues with hardware acceleration:
- [Nvidia](https://wiki.archlinux.org/title/NVIDIA)
- [Nouveau](https://wiki.archlinux.org/title/Nouveau)
- [AMD](https://wiki.archlinux.org/title/AMDGPU)

28 changes: 3 additions & 25 deletions scripts/build-ffmpeg
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,9 @@ compile_nasm() {
}

compile_x264() {
local commit
commit="4815ccadb1890572f2bf8b9d9553d56f6c9122ad"
cd "$source_dir" &&
git -C x264 pull 2>/dev/null || git clone https://code.videolan.org/videolan/x264.git &&
cd x264 &&
git reset --hard $commit &&
PATH="$bin_dir:$PATH" PKG_CONFIG_PATH="$install_dir/lib/pkgconfig" ./configure --prefix="$install_dir" --bindir="$bin_dir" --enable-static --enable-pic &&
PATH="$bin_dir:$PATH" make &&
make install
Expand All @@ -96,53 +93,41 @@ compile_x265() {
}

compile_libvpx() {
local commit
commit="8630b183230e7d4b87f8535e8d5e458e96366117"
cd "$source_dir" &&
git -C libvpx pull 2>/dev/null || git clone https://chromium.googlesource.com/webm/libvpx.git &&
cd libvpx &&
git reset --hard $commit &&
PATH="$bin_dir:$PATH" ./configure --prefix="$install_dir" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm &&
PATH="$bin_dir:$PATH" make &&
make install
}

compile_fdk-aac() {
local commit
commit="716f4394641d53f0d79c9ddac3fa93b03a49f278"
cd "$source_dir" &&
PATH="$bin_dir:$PATH" &&
git -C fdk-aac pull 2>/dev/null || git clone https://github.com/mstorsjo/fdk-aac &&
cd fdk-aac &&
git reset --hard $commit &&
autoreconf -fiv &&
./configure --prefix="$install_dir" --disable-shared &&
make &&
make install
}

compile_libopus() {
local commit
commit="c85499757c148fede8604cffa12454206b6138ba"
cd "$source_dir" &&
PATH="$bin_dir:$PATH" &&
git -C opus pull 2>/dev/null || git clone https://github.com/xiph/opus.git &&
cd opus &&
git reset --hard $commit &&
./autogen.sh &&
./configure --prefix="$install_dir" --disable-shared &&
make &&
make install
}

compile_libdav1d() {
local commit
commit="a6878be7e07114f5a2915ad46300700f0db55197"
cd "$source_dir" &&
PATH="$bin_dir:$PATH" &&
git -C dav1d pull 2>/dev/null || git clone https://code.videolan.org/videolan/dav1d.git &&
cd dav1d &&
git reset --hard $commit &&
mkdir -p build &&
cd build &&
meson setup -Denable_tools=false -Denable_tests=false --default-library=static .. --prefix "$install_dir" --libdir="$install_dir/lib" &&
Expand All @@ -151,13 +136,10 @@ compile_libdav1d() {
}

compile_libaom() {
local commit
commit="f8c91a2080beb6a98c909435fb5937f82a8ef83f"
echo "Compiling libaom"
cd "$source_dir" &&
git -C aom pull 2>/dev/null || git clone https://aomedia.googlesource.com/aom &&
cd aom &&
git reset --hard $commit &&
cd - &&
mkdir -p aom_build &&
cd aom_build &&
Expand All @@ -167,13 +149,10 @@ compile_libaom() {
}

compile_libsvtav1() {
local commit
commit="3c701b39c86d86d9adb43eb0f59a6f7a9b299b88"
echo "Compiling libsvtav1"
cd "$source_dir" &&
git -C SVT-AV1 pull 2>/dev/null || git clone https://gitlab.com/AOMediaCodec/SVT-AV1.git &&
cd SVT-AV1 &&
git reset --hard $commit &&
mkdir -p build &&
cd build &&
PATH="$bin_dir:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$install_dir" -DCMAKE_BUILD_TYPE=Release -DBUILD_DEC=OFF -DBUILD_SHARED_LIBS=OFF .. &&
Expand All @@ -194,10 +173,9 @@ compile_libvmaf() {
}

compile_ffmpeg() {
local version file unpack_dir
version="6.1.1"
file="ffmpeg-$version.tar.bz2"
unpack_dir="ffmpeg-$version"
local file unpack_dir
file="ffmpeg-snapshot.tar.bz2"
unpack_dir="ffmpeg"
cd "$source_dir" &&
wget -O "$file" https://ffmpeg.org/releases/"$file" &&
tar xjvf "$file" &&
Expand Down

0 comments on commit 93c70b6

Please sign in to comment.