From 868b8bf61bca70a24874fb4a39dec09b6f3461d7 Mon Sep 17 00:00:00 2001 From: Andrew Lorimer Date: Wed, 31 Oct 2018 14:30:52 +1100 Subject: [PATCH] lazy flac to mp3 converter --- flactomp3.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 flactomp3.sh diff --git a/flactomp3.sh b/flactomp3.sh new file mode 100755 index 0000000..0837eb0 --- /dev/null +++ b/flactomp3.sh @@ -0,0 +1,13 @@ +#! /bin/bash + +# lazy wrapper for ffmpeg to convert flac to mp3 +# usage: flactomp3.sh [dir] +# all *.flac in [dir] or current directory are converted to mp3 if not already done + +if [ -z $1 ]; then + dir=$(pwd) +else + dir=$1 +fi + +for i in $dir/*.flac; do ffmpeg -n -i "$i" -ab 320k -map_metadata 0 -id3v2_version 3 "${i%.*}.mp3"; done \ No newline at end of file -- 2.43.2