Convert FLAC files to OGG Vorbis
Solution 1
You can use a graphical converter like soundconverter. However, since you need to add it to the ogg
collection, I believe you might be looking for some command line solutions. You can probably try,
ffmpeg -i musicfile.flac musicfile.ogg
Or even,
find . -name "*flac" -exec oggenc -q 7 {} \;
Once, you have identified an efficient way for file conversion, doing a rsync based on difference of files would be the next step to go.
Sources
Solution 2
Try this bash script:
EXT=flac
for file in *.${EXT}; do
if [ ! -e ${file%.flac}.ogg ]; then
ffmpeg -i ${file} -qscale:a 6 ${file%.flac}.ogg
fi
done
Solution 3
I use acxi, which does basically exactly what the op wants. Syncs flac directories to ogg (or mp3 or opus) directories, including copying over whatever other files I want, like jpg, txt, png, etc.
Simple perl script, with configurations, options, etc.
Related videos on Youtube
landroni
Updated on September 18, 2022Comments
-
landroni almost 2 years
Are there any Linux tools for transcoding and syncing music directories?
I encode my music to FLAC, which I keep on an external hard drive. Some time ago I transcoded this collection to OGG Vorbis, in a different directory. Since then I have added to the FLAC collection. I am looking for a tool that scans my main (FLAC) collection and transcodes any new additions into the smaller (Vorbis) collection.
What I have in mind is something that worked like Unison or Rsync (but was able to ignore the fact that the files are in different formats) but also transcoded during the copy process.
Are there any tools that do something like this?
-
Admin about 10 yearsI use a python program to walk over the tree of MP3 file to move any FLAC files out (since Picard puts FLAC and MP3) togehter, then walk the FLAC tree and convert them if the target MP3 does not exists (FLAC to temporary WAV to LAME), while preserving the ID3 tags that are in the FLAC file. The script is relatively simple, but I couldn't find anything that did all of that automatically from the commandline.
-
-
Raphael over 7 yearsSee here for how to retain ID3 tags.
-
Anthon almost 7 yearsThis does transcodes all files, not just the new ones added (which is what the OP asked)
-
Anthon almost 7 years@xhienne I don't understand your reference to downvoting, what are you referring to? This post is not downvoted. I just reviewed this answer from the review queue and commented, and that is not the same as downvoting.
-
xhienne almost 7 yearsSorry Anthon, it was downvoted at the time I wrote this and I believed it was your vote. The downvote has gone since
-
brettv almost 7 yearsI've changed the script to only convert flac files which don't already have an ogg equivalent
-
grifferz about 6 yearsYou'll need to enclose all variables in quotes to correctly handle files with spaces in their names.