Posted by: Roger
Converting FLAC to MP3 using ffmpeg - 02/04/2016 20:18
My FLAC collection's on my Synology NAS, and that has ffmpeg installed. So I'm just gonna leave this here:
Note: I've not actually tried it on the NAS, yet, but it seems to work OK on my Linux desktop. I'm going to play with the metadata settings next.
Code:
#!/bin/sh # Put this in 'flac2mp3', chmod +x source=$1 oldroot=$2 newroot=$3 scratch=${1%.flac}.mp3 dest=$newroot${scratch#$oldroot} mkdir -p "$(dirname "$dest")" ffmpeg -y -i "$source" -vn -acodec libmp3lame -q:a 2 "$dest"
Code:
find /volume1/flac -name '*.flac' -exec ./flac2mp3 {} /volume1/flac/ /volume1/music/ {} \;
Note: I've not actually tried it on the NAS, yet, but it seems to work OK on my Linux desktop. I'm going to play with the metadata settings next.