Skip to content

Instantly share code, notes, and snippets.

@nickferrando
Last active May 11, 2020 17:41
Show Gist options
  • Save nickferrando/01089f72aa6855ef5a6598037b28e72b to your computer and use it in GitHub Desktop.
Save nickferrando/01089f72aa6855ef5a6598037b28e72b to your computer and use it in GitHub Desktop.
WAV to Multiple Audio Formats with EBU R128 Loudness Normalization
#!/bin/bash
#Convert input files in .WAV format to multiple destinations
#AIFF, Mp3 @64Kbps, Mp3 @128Kbps, AAC @192k and FLAC format.
#It will also copy the metadata informations, where they exists.
mkdir aiff mp3-64 mp3-128 aac-192 flac
for i in *.wav; do ffmpeg -i "$i" -nostdin -map_metadata:s:a 0:s:a -af loudnorm "./aiff/${i%.*}.aiff" -b:a 64k "./mp3-64/${i%.*}.mp3" -b:a 128k "./mp3-128/${i%.*}.m$
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment