Skip to content

Instantly share code, notes, and snippets.

@mmai
Created January 18, 2021 14:08
Show Gist options
  • Save mmai/c49e1c89e30f1516166f03ea38e0a1e8 to your computer and use it in GitHub Desktop.
Save mmai/c49e1c89e30f1516166f03ea38e0a1e8 to your computer and use it in GitHub Desktop.
cd "$1"
mkdir -p flacs
for flac in *.flac
do
out=`echo $flac | sed s/.flac/.ogg/`
ffmpeg -i "$flac" -map_metadata 0 "$out"
mv "$flac" flacs
done
cd -
# Search for folders containing .flac files and execute this script :
# fd -e flac | awk -F'/' 'BEGIN {OFS = FS} {$NF=""; print "~/softs_/flac2ogg.sh \""$0"\""}' |sort -u |grep -v flacs > todo.sh && sh ./todo.sh && rm ./todo.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment