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 && \