From c06273269e848ed43aa45ff837b9bdc45879d48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sat, 24 Feb 2024 22:58:41 +0100 Subject: [PATCH] feat: trim channel test tracks --- Earthfile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Earthfile b/Earthfile index 85a6ccf..ba35b23 100644 --- a/Earthfile +++ b/Earthfile @@ -44,9 +44,13 @@ avsync-video-components: RUN pnpm av:render:audio -i beep.wav -o /var/tmp/track.wav --repeats $CYCLES SAVE ARTIFACT /var/tmp/track.wav -avsync-video: +aux-media: FROM debian:bookworm - RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/* + RUN apt-get update && apt-get install -y ffmpeg sox && rm -rf /var/lib/apt/lists/* + +avsync-video: + FROM +aux-media + RUN apt-get update && apt-get install -y ffmpeg sox && rm -rf /var/lib/apt/lists/* COPY +avsync-video-components/track.wav /track.wav COPY +avsync-video-components/frames /frames RUN find frames -type f | sort | xargs -I {} sh -c 'echo "file {}" >> /frames.txt' @@ -57,11 +61,12 @@ avsync-video: 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 + FROM +aux-media + RUN mkdir -p /input /output + COPY assets/audio/channels /raw + WORKDIR /raw + RUN for file in *.wav; do sox $file /input/$file silence 1 0.1 0.1% reverse silence 1 0.1 0.1% reverse; done + WORKDIR /input 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 && \