diff --git a/Earthfile b/Earthfile index 8f55051..9ce5ca3 100644 --- a/Earthfile +++ b/Earthfile @@ -32,6 +32,50 @@ avsync-video: RUN ffmpeg -r $FPS -f concat -i /final-frames.txt -i track.wav -c:v libvpx-vp9 -pix_fmt yuva420p -shortest avsync.webm SAVE ARTIFACT avsync.webm +audio-channel-tracks: + FROM debian:bookworm + RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/* + RUN mkdir -p /output + COPY assets/audio/channels /channels + WORKDIR /channels + RUN mkdir -p /output/wav/stereo /output/wav/5.1 /output/wav/7.1 + RUN ffmpeg -i Left.wav -af "pan=stereo|FL=c0" /output/wav/stereo/Left.wav -hide_banner -loglevel error && \ + ffmpeg -i Right.wav -af "pan=stereo|FR=c0" /output/wav/stereo/Right.wav -hide_banner -loglevel error && \ + ffmpeg -i Center.wav -af "pan=stereo|FL=c0|FR=c0" /output/wav/stereo/Center.wav -hide_banner -loglevel error && \ + # 5.1 + ffmpeg -i Front_Left.wav -af "pan=5.1|FL=c0" /output/wav/5.1/Front_Left.wav -hide_banner -loglevel error && \ + ffmpeg -i Front_Right.wav -af "pan=5.1|FR=c0" /output/wav/5.1/Front_Right.wav -hide_banner -loglevel error && \ + ffmpeg -i Front_Center.wav -af "pan=5.1|FC=c0" /output/wav/5.1/Front_Center.wav -hide_banner -loglevel error && \ + ffmpeg -i Noise.wav -af "pan=5.1|LFE=c0" /output/wav/5.1/LFE_Noise.wav -hide_banner -loglevel error && \ + ffmpeg -i Rear_Left.wav -af "pan=5.1|BL=c0" /output/wav/5.1/Rear_Left.wav -hide_banner -loglevel error && \ + ffmpeg -i Rear_Right.wav -af "pan=5.1|BR=c0" /output/wav/5.1/Rear_Right.wav -hide_banner -loglevel error && \ + # 7.1 + ffmpeg -i Front_Left.wav -af "pan=7.1|FL=c0" /output/wav/7.1/Front_Left.wav -hide_banner -loglevel error && \ + ffmpeg -i Front_Right.wav -af "pan=7.1|FR=c0" /output/wav/7.1/Front_Right.wav -hide_banner -loglevel error && \ + ffmpeg -i Front_Center.wav -af "pan=7.1|FC=c0" /output/wav/7.1/Front_Center.wav -hide_banner -loglevel error && \ + ffmpeg -i Noise.wav -af "pan=7.1|LFE=c0" /output/wav/7.1/LFE_Noise.wav -hide_banner -loglevel error && \ + ffmpeg -i Side_Left.wav -af "pan=7.1|SL=c0" /output/wav/7.1/Side_Left.wav -hide_banner -loglevel error && \ + ffmpeg -i Side_Right.wav -af "pan=7.1|SR=c0" /output/wav/7.1/Side_Right.wav -hide_banner -loglevel error && \ + ffmpeg -i Rear_Left.wav -af "pan=7.1|BL=c0" /output/wav/7.1/Rear_Left.wav -hide_banner -loglevel error && \ + ffmpeg -i Rear_Right.wav -af "pan=7.1|BR=c0" /output/wav/7.1/Rear_Right.wav -hide_banner -loglevel error + SAVE ARTIFACT /output/wav/ + +audio-channel-tracks-ogg: + FROM +audio-channel-tracks + RUN mkdir -p /output/ogg/stereo /output/ogg/5.1 /output/ogg/7.1 + RUN for file in /output/wav/stereo/*.wav; do ffmpeg -i $file -c:a libvorbis /output/ogg/stereo/$(basename $file .wav).ogg -hide_banner -loglevel error; done && \ + for file in /output/wav/5.1/*.wav; do ffmpeg -i $file -c:a libvorbis /output/ogg/5.1/$(basename $file .wav).ogg -hide_banner -loglevel error; done && \ + for file in /output/wav/7.1/*.wav; do ffmpeg -i $file -c:a libvorbis /output/ogg/7.1/$(basename $file .wav).ogg -hide_banner -loglevel error; done + SAVE ARTIFACT /output/ogg + +audio-channel-tracks-mp3: + FROM +audio-channel-tracks + RUN mkdir -p /output/mp3/stereo /output/mp3/5.1 /output/mp3/7.1 + RUN for file in /output/wav/stereo/*.wav; do ffmpeg -i $file -c:a libmp3lame /output/mp3/stereo/$(basename $file .wav).mp3 -hide_banner -loglevel error; done && \ + for file in /output/wav/5.1/*.wav; do ffmpeg -i $file -c:a libmp3lame /output/mp3/5.1/$(basename $file .wav).mp3 -hide_banner -loglevel error; done && \ + for file in /output/wav/7.1/*.wav; do ffmpeg -i $file -c:a libmp3lame /output/mp3/7.1/$(basename $file .wav).mp3 -hide_banner -loglevel error; done + SAVE ARTIFACT /output/mp3 + site: RUN npm install -g pnpm COPY package.json pnpm-lock.yaml /site diff --git a/assets/audio/channels/Center.wav b/assets/audio/channels/Center.wav new file mode 100644 index 0000000..cb34f4d --- /dev/null +++ b/assets/audio/channels/Center.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfea04f9477037082c506bfbee3d564431bf5999f7be6380eb54d8e067ca8309 +size 61426 diff --git a/assets/audio/channels/Front_Center.wav b/assets/audio/channels/Front_Center.wav new file mode 100644 index 0000000..7f83b86 --- /dev/null +++ b/assets/audio/channels/Front_Center.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d61518bcd3f13b0c709a5298e939caf698b80d31d71d50475365ee0e5536cc9 +size 137134 diff --git a/assets/audio/channels/Front_Left.wav b/assets/audio/channels/Front_Left.wav new file mode 100644 index 0000000..2c8d439 --- /dev/null +++ b/assets/audio/channels/Front_Left.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f97e8458785da2f0aa0ec60bf9cc81520cbf80a4683e83eca9cb5f2958e9fef +size 142128 diff --git a/assets/audio/channels/Front_Right.wav b/assets/audio/channels/Front_Right.wav new file mode 100644 index 0000000..421d24d --- /dev/null +++ b/assets/audio/channels/Front_Right.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fdea4d7003f1f7d3e48d3521aaab0a112c4ac570b02ddf1813abacac3070f6f +size 146990 diff --git a/assets/audio/channels/Left.wav b/assets/audio/channels/Left.wav new file mode 100644 index 0000000..bfb4081 --- /dev/null +++ b/assets/audio/channels/Left.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54f730591f889e27ec139c70a58a66c9e404f1a55061ba70ed6f04064149e508 +size 71944 diff --git a/assets/audio/channels/Noise.wav b/assets/audio/channels/Noise.wav new file mode 100644 index 0000000..b274a11 --- /dev/null +++ b/assets/audio/channels/Noise.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d897df3862192ea078efc1dd8fdc4f51fae9e93d3ed4c15e049829b0386729e +size 135202 diff --git a/assets/audio/channels/Rear_Center.wav b/assets/audio/channels/Rear_Center.wav new file mode 100644 index 0000000..1287a27 --- /dev/null +++ b/assets/audio/channels/Rear_Center.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9343207e3298813fdc4d26b7948e15a38533c37a9f232c3eff809b565398b330 +size 130096 diff --git a/assets/audio/channels/Rear_Left.wav b/assets/audio/channels/Rear_Left.wav new file mode 100644 index 0000000..8e382dd --- /dev/null +++ b/assets/audio/channels/Rear_Left.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1679e0557701864d55b742a0abd3fe5f50d95b1bfcb55ffad4b597dcc7e3c7b8 +size 126064 diff --git a/assets/audio/channels/Rear_Right.wav b/assets/audio/channels/Rear_Right.wav new file mode 100644 index 0000000..12cc5d9 --- /dev/null +++ b/assets/audio/channels/Rear_Right.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12828d125f692faa75c7445d52125dcc2c36f82c4f7a3ef49b8ae6afd74ada9d +size 146480 diff --git a/assets/audio/channels/Right.wav b/assets/audio/channels/Right.wav new file mode 100644 index 0000000..c2211b9 --- /dev/null +++ b/assets/audio/channels/Right.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4833d72cb49530944e0d0ac880b48b3c7426e6ebf13b4f77e46d83a32bff8b33 +size 63812 diff --git a/assets/audio/channels/Side_Left.wav b/assets/audio/channels/Side_Left.wav new file mode 100644 index 0000000..10425e9 --- /dev/null +++ b/assets/audio/channels/Side_Left.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03dc7c641d7825417d2a261831715e945e95d87343fb037db910e7ce4f87a2a1 +size 134868 diff --git a/assets/audio/channels/Side_Right.wav b/assets/audio/channels/Side_Right.wav new file mode 100644 index 0000000..782d4f4 --- /dev/null +++ b/assets/audio/channels/Side_Right.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecdd0329945f355960796a56f8126d5080ed93fdd2437c7eaddbbbd56137d7e9 +size 129966