Skip to content

Instantly share code, notes, and snippets.

@nickferrando
Last active May 9, 2020 20:59
Show Gist options
  • Save nickferrando/cc08043d300247eb133925e5e94e7001 to your computer and use it in GitHub Desktop.
Save nickferrando/cc08043d300247eb133925e5e94e7001 to your computer and use it in GitHub Desktop.
FFMPEG WAV to FLAC Batch Formula [Ubuntu]
#!/bin/bash
#This script creates a new folder named "processed" in the working directory,
#then finds every file with .WAV extension and convert it to FLAC (Free Lossless Audio Codec).
#It also copy the metadata informations associated with the input (where they exists) to the output.
mkdir processed
for i in *.wav
do ffmpeg -i "$i" -nostdin -map_metadata:s:a 0:s:a -c:a flac "./processed/${i%.*}.flac"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment