From 4d63db8029af0bb8ea4a5f2edc29ab7a23bd7e40 Mon Sep 17 00:00:00 2001 From: cypress Date: Tue, 21 May 2024 19:29:09 -0700 Subject: [PATCH] Use ffmpeg to auto-encode tracks as 8bit .wav for web deployment --- .github/workflows/webgl-update.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/webgl-update.yml b/.github/workflows/webgl-update.yml index 2853d09..05b37c4 100644 --- a/.github/workflows/webgl-update.yml +++ b/.github/workflows/webgl-update.yml @@ -16,7 +16,7 @@ jobs: - name: Get apt ready run: | apt update - apt install -y zip unzip wget curl git jq bash + apt install -y zip unzip wget curl git jq bash ffmpeg - name: Download assets run: | git config --global --add safe.directory $GITHUB_WORKSPACE @@ -33,7 +33,10 @@ jobs: unzip -q pc-nzp-assets.zip -d tmp/ unzip -q fte-nzp-qc.zip -d tmp/nzp/ mv build-version.txt tmp/nzp/version.txt - cd tmp/nzp/ + cd tmp/nzp/tracks + find . -name '*.ogg' -exec bash -c 'ffmpeg -i $1 -acodec pcm_u8 -ar 16000 ${1%.*}.wav' -- {} \; + rm *.ogg + cd ../ zip -r ../../nzp/game.pk3 ./* - name: Replace WebAssembly files run: | @@ -55,5 +58,3 @@ jobs: branch: main commit_user_name: Awesome NZ:P Updater Bot commit_user_email: nope@example.org - -