Skip to content

Commit

Permalink
Update for shadPS4 repo and add ljpeg encoder.
Browse files Browse the repository at this point in the history
  • Loading branch information
squidbus committed Nov 28, 2024
1 parent 7f58d78 commit 5022882
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ jobs:
(cd ${{ matrix.vcpkg-root }} && git checkout f6a5d4e8eb7476b8d7fc12a56dff300c1c986131)
(cd ${{ matrix.vcpkg-root }} && git apply --ignore-space-change --ignore-whitespace --3way ${{ github.workspace }}/ffmpeg.patch)
- name: Bootstrap vcpkg (windows-latest)
run: |
(cd ${{ matrix.vcpkg-root }} && .\bootstrap-vcpkg.bat)
if: matrix.os == 'windows-latest'

- name: Build ffmpeg
run: |
vcpkg ${{ matrix.extra-args }} install ffmpeg[avcodec,avfilter,avdevice,avformat,swresample,swscale]:${{ matrix.arch }}-${{ matrix.triplet }}
Expand Down Expand Up @@ -129,6 +134,6 @@ jobs:
ls -al artifacts/
wget -c https://github.com/tcnksm/ghr/releases/download/v0.14.0/ghr_v0.14.0_linux_amd64.tar.gz
tar xfv ghr_v0.14.0_linux_amd64.tar.gz
ghr_v0.14.0_linux_amd64/ghr -u Vita3K -r ffmpeg-core -n 'Automatic FFmpeg CI builds (${{ env.COMMIT_SHORT_SHA }})' -b "$(printf "Corresponding commit: ${{ github.sha }}")" ${{ env.COMMIT_SHORT_SHA }} artifacts/
ghr_v0.14.0_linux_amd64/ghr -u shadps4-emu -r ext-ffmpeg-core -n 'Automatic FFmpeg CI builds (${{ env.COMMIT_SHORT_SHA }})' -b "$(printf "Corresponding commit: ${{ github.sha }}")" ${{ env.COMMIT_SHORT_SHA }} artifacts/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ execute_process(
# Download prebuilt ffmpeg
if(NOT EXISTS "${CMAKE_BINARY_DIR}/external/ffmpeg.zip")
message(STATUS "Downloading FFMPEG prebuilts...")
file(DOWNLOAD https://github.com/Vita3K/ffmpeg-core/releases/download/${FFMPEG_GIT_SHA}/${FFMPEG_PREBUILTS_NAME}
file(DOWNLOAD https://github.com/shadps4-emu/ext-ffmpeg-core/releases/download/${FFMPEG_GIT_SHA}/${FFMPEG_PREBUILTS_NAME}
"${CMAKE_BINARY_DIR}/external/ffmpeg.zip" SHOW_PROGRESS
STATUS FILE_STATUS)
list(GET FILE_STATUS 0 STATUS_CODE)
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## FFmpeg builtins

This repository contains the ffmpeg builtins for Vita3K - shadowps4 and the CI to build them using vcpkg and github action.
This repository contains the FFmpeg builtins for shadPS4 and the CI to build them using vcpkg and GitHub actions.

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.
4 changes: 2 additions & 2 deletions ffmpeg.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ index 35bac875b..b16d9cb64 100644
-set(OPTIONS "--enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect")
+set(OPTIONS "--enable-pic --disable-doc --enable-runtime-cpudetect --disable-autodetect")
+
+# Only enable what is used by Vita3K
+# Only enable what is used by shadPS4
+string(APPEND OPTIONS " --disable-everything")
+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")
+string(APPEND OPTIONS " --enable-decoder=mov --enable-decoder=h264 --enable-decoder=mpeg4 --enable-decoder=mpeg2video --enable-decoder=mjpeg --enable-decoder=mjpegb")
+string(APPEND OPTIONS " --enable-encoder=pcm_s16le")
+string(APPEND OPTIONS " --enable-encoder=ffv1 --enable-encoder=mpeg4 --enable-encoder=mjpeg")
+string(APPEND OPTIONS " --enable-encoder=ffv1 --enable-encoder=mpeg4 --enable-encoder=ljpeg --enable-encoder=mjpeg")
+string(APPEND OPTIONS " --enable-muxer=avi")
+string(APPEND OPTIONS " --enable-demuxer=h264 --enable-demuxer=m4v --enable-demuxer=mp3 --enable-demuxer=mpegvideo --enable-demuxer=mpegps --enable-demuxer=mjpeg --enable-demuxer=mov --enable-demuxer=avi --enable-demuxer=aac --enable-demuxer=pmp --enable-demuxer=oma --enable-demuxer=pcm_s16le --enable-demuxer=pcm_s8 --enable-demuxer=wav")
+string(APPEND OPTIONS " --enable-parser=h264 --enable-parser=mpeg4video --enable-parser=mpegaudio --enable-parser=mpegvideo --enable-parser=mjpeg --enable-parser=aac --enable-parser=aac_latm")
Expand Down

0 comments on commit 5022882

Please sign in to comment.