Created
July 5, 2017 01:37
-
-
Save gpollo/3bd340c002257a3bfd210f57bfae56e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -f "concatenate.raw" ]]; then | |
rm "concatenate.raw" | |
fi | |
find ./ -type f -iname "*.flac" | sort | while read FILE; do | |
printf "$FILE\n" | |
ffmpeg -y -i "$FILE" -f s16le -acodec pcm_s16le - >> "concatenate.raw" 2> log < /dev/null | |
if [[ $? -ne 0 ]]; then | |
cat log | |
exit 1 | |
fi | |
printf "Status: $?\n" | |
done | |
ffmpeg -y -f s16le -ar 44.1k -ac 2 -i "concatenate.raw" "final.flac" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment