I want to convert a bunch of FLAC files to OPUS, keeping the folder structure and all metadata (including the cover art). Does anyone know the best way to do that? All the finished scripts I found don't fulfill all of those requirements.

Needs to be something for Linux

@LilaHexe every time I do this I whip out a custom ffmpeg invocation… probably something like this could work (didn’t test, use with caution)

find '.' -name '*.flac' -type f -exec ffmpeg -i {} -acodec libopus -b:a 192k {}.opus \;

and then another pass to rename all .flac.opus files into .opus

@domi yep that seems to work :D

hehehe uhhhhh any way to multi-thread it?
👀

@LilaHexe i would add echo before ffmpeg, and then | parallel at the end

i’m like 45% sure this will just work, you have to check, i’m not good at GNU parallel XD

@domi @LilaHexe using `find '.' -name '*.flac' -type f -print0 | parallel -0 ffmpeg -i {} -acodec libopus -b:a 192k {}.opus`
should be more robust in regards to newlines in file names, but otherwise perform the same stuff
@fogti @domi lmao, I shit you not, I got it working with something very similar about 20 seconds ago. But mine involved saving the find results to a file, cuz I couldn't figure out how to pass it to parallel. Thanks!
@fogti @domi nooooo it doesn't transfer the album art ​​

@LilaHexe @fogti i tested it and it worked for me…

can you try -vcodec copy ?

@LilaHexe @fogti sorry for the rollercoaster, dmi’s discount shell coding advice tends to end up like this on low-spoon days xD