Skip to content

Commit 03f1f53

Browse files
committed
Update ffmpeg to 7.1.1
1 parent c07a8a0 commit 03f1f53

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+5938
-3414
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
run: |
8080
(cd ${{ matrix.vcpkg-root }} && git fetch origin)
8181
(cd ${{ matrix.vcpkg-root }} && git reset --hard)
82-
(cd ${{ matrix.vcpkg-root }} && git checkout f6a5d4e8eb7476b8d7fc12a56dff300c1c986131)
82+
(cd ${{ matrix.vcpkg-root }} && git checkout tags/2025.03.19)
8383
(cd ${{ matrix.vcpkg-root }} && git apply --ignore-space-change --ignore-whitespace --3way ${{ github.workspace }}/ffmpeg.patch)
8484
8585
- name: Build ffmpeg
@@ -97,7 +97,7 @@ jobs:
9797
- uses: actions/upload-artifact@v4
9898
with:
9999
name: ffmpeg-${{ matrix.build }}-${{ matrix.arch }}
100-
path: ${{ matrix.vcpkg-root }}/packages/ffmpeg_${{ matrix.arch }}-${{ matrix.triplet }}/lib
100+
path: ${{ matrix.vcpkg-root }}/packages/ffmpeg_${{ matrix.arch }}-${{ matrix.triplet }}
101101
if: ${{ always() }}
102102

103103
create-release:

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ if(NOT EXISTS "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg.zip")
5252
endif()
5353
endif()
5454

55-
if(NOT EXISTS "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib")
56-
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib")
55+
if(NOT EXISTS "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg")
56+
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg")
5757
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg.zip"
58-
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib")
58+
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg")
5959
endif()
6060

6161
set(LIB_PREFIX "lib")

Readme.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
## FFmpeg builtins
22

3-
This repository contains the ffmpeg builtins for Vita3K and the CI to build them using vcpkg and github action.
3+
This repository contains the ffmpeg builtins for RPCS3 and the CI to build them using vcpkg and github action.
44

55
The Windows version is built using clang-cl, this is done so that inline assembly optimisations (which are not supported by MSVC) can be enabled.
6+
7+
How to update:
8+
- checkout https://github.com/microsoft/vcpkg to any directory (you only need it to create a ffmpeg.patch)
9+
- reset the vcpkg branch/HEAD to the latest tag
10+
- replace vcpkg commit/tag in .github/workflows/build.yml with the latest tag
11+
- manually apply the changes found in the current ffmpeg.patch as well as any new changes to the vcpkg/ports/ffmpeg/portfile.cmake
12+
- create new patch
13+
git diff > ffmpeg.patch
14+
- replace our ffmpeg.patch with the new ffmpeg.patch
15+
- push the two files changes to master (ffmpeg.patch and build.yml)
16+
- wait for and download the new release in github actions
17+
- replace new lib and include contents in our submodule

ffmpeg.patch

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake
2-
index 35bac875b..b16d9cb64 100644
2+
index e536d1a449..09ccc915e4 100644
33
--- a/ports/ffmpeg/portfile.cmake
44
+++ b/ports/ffmpeg/portfile.cmake
5-
@@ -42,7 +42,20 @@ else()
6-
set(LIB_PATH_VAR "LIBRARY_PATH")
5+
@@ -29,7 +29,20 @@ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQU
6+
vcpkg_add_to_path("${NASM_EXE_PATH}")
77
endif()
88

99
-set(OPTIONS "--enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect")
1010
+set(OPTIONS "--enable-pic --disable-doc --enable-runtime-cpudetect --disable-autodetect")
1111
+
12-
+# Only enable what is used by Vita3K
12+
+# Only enable what is used by RPCS3
1313
+string(APPEND OPTIONS " --disable-everything")
1414
+string(APPEND OPTIONS " --enable-decoder=aac --enable-decoder=aac_latm --enable-decoder=atrac3 --enable-decoder=atrac3p --enable-decoder=atrac9 --enable-decoder=mp3 --enable-decoder=pcm_s16le --enable-decoder=pcm_s8")
1515
+string(APPEND OPTIONS " --enable-decoder=mov --enable-decoder=h264 --enable-decoder=mpeg4 --enable-decoder=mpeg2video --enable-decoder=mjpeg --enable-decoder=mjpegb")
@@ -22,9 +22,9 @@ index 35bac875b..b16d9cb64 100644
2222
+string(APPEND OPTIONS " --enable-bsf=mjpeg2jpeg")
2323
+string(APPEND OPTIONS " --enable-indev=dshow")
2424

25-
if(VCPKG_TARGET_IS_WINDOWS)
26-
vcpkg_acquire_msys(MSYS_ROOT PACKAGES automake1.16)
27-
@@ -80,7 +93,7 @@ endif()
25+
if(VCPKG_TARGET_IS_MINGW)
26+
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
27+
@@ -61,7 +74,7 @@ endif()
2828
vcpkg_cmake_get_vars(cmake_vars_file)
2929
include("${cmake_vars_file}")
3030
if(VCPKG_DETECTED_MSVC)
@@ -33,14 +33,14 @@ index 35bac875b..b16d9cb64 100644
3333
set(OPTIONS "--toolchain=msvc ${OPTIONS}")
3434
# This is required because ffmpeg depends upon optimizations to link correctly
3535
string(APPEND VCPKG_COMBINED_C_FLAGS_DEBUG " -O2")
36-
@@ -574,6 +587,11 @@ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
36+
@@ -713,6 +726,11 @@ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
3737
# We use response files here as the only known way to handle spaces in paths
3838
set(crsp "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/cflags.rsp")
3939
string(REGEX REPLACE "-arch [A-Za-z0-9_]+" "" VCPKG_COMBINED_C_FLAGS_RELEASE_SANITIZED "${VCPKG_COMBINED_C_FLAGS_RELEASE}")
4040
+ if(VCPKG_TARGET_IS_OSX)
41-
+ # macosx-version-min version is set with current macOS version. So replace them to 11.0
41+
+ # macosx-version-min version is set with current macOS version. So replace them to 14.0
4242
+ string(REGEX REPLACE "-mmacosx-version-min=[0-9]+.[0-9]+" "" VCPKG_COMBINED_C_FLAGS_RELEASE_SANITIZED "${VCPKG_COMBINED_C_FLAGS_RELEASE_SANITIZED}")
43-
+ string(APPEND VCPKG_COMBINED_C_FLAGS_RELEASE_SANITIZED " -mmacosx-version-min=11.0")
43+
+ string(APPEND VCPKG_COMBINED_C_FLAGS_RELEASE_SANITIZED " -mmacosx-version-min=14.0")
4444
+ endif()
4545
file(WRITE "${crsp}" "${VCPKG_COMBINED_C_FLAGS_RELEASE_SANITIZED}")
4646
set(ldrsp "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/ldflags.rsp")

0 commit comments

Comments
 (0)