
AMD VCN uses a different surface alignment compared to other GPUs for encoding, which required an upstream fix in Mesa, libva, FFmpeg, and the VCN firmware. This commit adds the FFmpeg patches to the flatpak build of OBS which is currently using FFmpeg version n7.1, however the patches were applied upstream after that release. libva API version 1.21 or higher is also required, which is satisfied by using KDE runtime 6.8. The incorrect 1920x1088 HEVC output resolution (instead of 1920x1080) resulted in streaming disconnects for Twitch Enhanced Broadcsating Linux users. Local file recording when using AMD VAAPI HEVC also outputs 1088 instead of 1080. This commit fixes both cases. Please refer to [1], [2], and [3] for context. The patches are taken from [2]. Note that the fix is applicable to flatpak builds only. Standalone and Debian package builds depend on the host library versions and will still have the problem until a version of FFmpeg with the fix is used. [1]: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=11222 [2]: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13168 [3]: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10985
build-aux
folder
This folder contains:
- Various formatting scripts:
run-clang-format
which formats C/C++/ObjC/ObjC++ filesrun-gersemi
which formats CMake filesrun-swift-format
which formats Swift filesformat-manifest.py
which formats Flatpak manifest JSON files
- The Flatpak manifest used to build OBS Studio
- Files used for Steam packaging
Formatting scripts
run-clang-format
This script allows to check the formatting and/or format of C/C++/ObjC/ObjC++ files and requires ZSH and a specific version of clang-format
.
If the script does not find the latter it will return the required version, we provide clang-format
Homebrew formulas in our homebrew-tools repo.
Example of use:
./build-aux/run-clang-format
run-gersemi
This script allows to check the formatting and/or format of the CMake files and requires ZSH and gersemi
Python package.
Example of use:
./build-aux/run-gersemi
run-swift-format
This script allows to check the formatting and/or format of the Swift files and requires ZSH and swift-format
.
Example of use:
./build-aux/run-swift-format
format-manifest.py
This script allows to check the formatting and/or format of the Flatpak manifest and its modules.
Example of use:
python3 ./build-aux/format-manifest.py com.obsproject.Studio.json
OBS Studio Flatpak Manifest
The manifest is composed of multiple files:
- The main manifest
com.obsproject.Studio.json
- The
modules
folder which contains OBS Studio dependencies modules
Manifest modules
Modules are ordered/dispatched in numbered categories following a short list of rules:
- A module must not depend on another module from the same category, so a module can only depend on modules from lower numbered categories.
- A module without dependencies must be placed in the highest numbered category in use, excluding categories meant for specific types of dependency.
Actual categories:
99-
: CEF90-
: Headers-only libraries that are dependencies of only OBS Studio50-
: Modules that are dependencies of only OBS Studio40-
: Modules that are dependencies of the50-
category30-
: FFmpeg20-
: Modules that are dependencies of FFmpeg10-
: Modules that are dependencies of the20-
category