From 9b2111dc01a17bebce1143934e50fffabbf112f2 Mon Sep 17 00:00:00 2001 From: nmzik Date: Wed, 16 Sep 2026 09:37:20 +0200 Subject: [PATCH] Bundle FFmpeg --- .github/workflows/build.yml | 6 ------ .gitmodules | 2 +- 3rdparty/CMakeLists.txt | 7 ------- 3rdparty/ffmpeg-core | 2 +- README.md | 8 ++++---- 5 files changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 170712e6..7f479eb6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -304,15 +304,9 @@ jobs: clang \ glslang-tools \ libasound2-dev \ - libavcodec-dev \ - libavfilter-dev \ - libavformat-dev \ - libavutil-dev \ libdbus-1-dev \ libgl1-mesa-dev \ libpulse-dev \ - libswresample-dev \ - libswscale-dev \ libudev-dev \ libwayland-dev \ libx11-dev \ diff --git a/.gitmodules b/.gitmodules index 960ba8a1..f7d27d54 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,7 +22,7 @@ url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git [submodule "3rdparty/ffmpeg-core"] path = 3rdparty/ffmpeg-core - url = https://github.com/shadps4-emu/ext-ffmpeg-core.git + url = https://github.com/KytyPS5/ext-ffmpeg-core.git shallow = true [submodule "3rdparty/fmt"] path = 3rdparty/fmt diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 34e5a106..636687c8 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -88,13 +88,6 @@ set(SPDLOG_FMT_EXTERNAL ON CACHE BOOL "" FORCE) set(SPDLOG_NO_EXCEPTIONS ON CACHE BOOL "" FORCE) add_subdirectory(spdlog EXCLUDE_FROM_ALL) -if (NOT TARGET FFmpeg::ffmpeg AND CMAKE_SYSTEM_NAME STREQUAL "Linux") - find_package(PkgConfig REQUIRED) - pkg_check_modules(FFMPEG REQUIRED IMPORTED_TARGET GLOBAL - libavformat libavcodec libswscale libavutil libavfilter libswresample) - add_library(FFmpeg::ffmpeg ALIAS PkgConfig::FFMPEG) -endif() - if (NOT TARGET FFmpeg::ffmpeg) # On macOS the target arch is driven by CMAKE_OSX_ARCHITECTURES, not the host # CMAKE_SYSTEM_PROCESSOR (which reports arm64 even for an x86_64/Rosetta build). diff --git a/3rdparty/ffmpeg-core b/3rdparty/ffmpeg-core index 94dde08c..9ac4cfd1 160000 --- a/3rdparty/ffmpeg-core +++ b/3rdparty/ffmpeg-core @@ -1 +1 @@ -Subproject commit 94dde08c8a9e4271a93a2a7e4159e9fb05d30c0a +Subproject commit 9ac4cfd195f192ed8b08566f49c28dbb48d08341 diff --git a/README.md b/README.md index 82e0b458..b7ec678b 100644 --- a/README.md +++ b/README.md @@ -165,14 +165,13 @@ The finished application and its runtime dependencies will be placed in ### Building on Linux -Install the toolchain, system FFmpeg, and the libraries the bundled SDL2 needs. Without the audio, Wayland and +Install the toolchain and the libraries the bundled SDL2 needs. Without the audio, Wayland and udev development packages SDL2 quietly configures itself without those backends, and the resulting build has no working sound and no gamepad hotplug: ```bash sudo apt-get install --no-install-recommends \ clang lld ninja-build cmake git glslang-tools pkg-config \ - libavformat-dev libavcodec-dev libswscale-dev libavutil-dev libavfilter-dev libswresample-dev \ libgl1-mesa-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev \ libxi-dev libxrandr-dev libxss-dev libxkbcommon-dev \ libasound2-dev libpulse-dev libudev-dev libdbus-1-dev libwayland-dev wayland-protocols @@ -193,8 +192,9 @@ cmake --install _Build/linux --prefix _Build/linux/install ``` The install step copies the Qt libraries and plugins next to the binaries, so -`_Build/linux/install` runs without a matching system Qt. The emulator still requires -the system FFmpeg runtime libraries matching those used to build it. +`_Build/linux/install` runs without a matching system Qt. FFmpeg is linked statically +from the pinned [KytyPS5 FFmpeg core](https://github.com/KytyPS5/ext-ffmpeg-core) +release, including VP9 and WebM support. System FFmpeg packages are not required. As on Windows, the MSVC compiler is not used; Clang is required. `cl.exe` is rejected at configure time.