Post B4vVoYPTTEafOR8gAy by LilaHexe@fedi.lilahexe.top
 (DIR) More posts by LilaHexe@fedi.lilahexe.top
 (DIR) Post #B4vQLWGTrpgEZVGgqm by LilaHexe@fedi.lilahexe.top
       0 likes, 0 repeats
       
       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
       
 (DIR) Post #B4vQLWTx3kSJFHZRqa by domi@donotsta.re
       0 likes, 0 repeats
       
       @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
       
 (DIR) Post #B4vRuS1jiOvHWAamGW by LilaHexe@fedi.lilahexe.top
       0 likes, 0 repeats
       
       @domi yep that seems to work :Dhehehe uhhhhh any way to multi-thread it? 👀
       
 (DIR) Post #B4vRuSI2jly0KkDngO by domi@donotsta.re
       0 likes, 0 repeats
       
       @LilaHexe i would add echo before ffmpeg, and then | parallel at the endi’m like 45% sure this will just work, you have to check, i’m not good at GNU parallel XD
       
 (DIR) Post #B4vT9LpX8YDwb3YMD2 by LilaHexe@fedi.lilahexe.top
       1 likes, 0 repeats
       
       @domi lmao thanks <3
       
 (DIR) Post #B4vTzxjzQo0rEU2zRo by fogti@chaos.social
       0 likes, 0 repeats
       
       @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
       
 (DIR) Post #B4vTzxzaUoUQ0rLRlA by LilaHexe@fedi.lilahexe.top
       0 likes, 0 repeats
       
       @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!
       
 (DIR) Post #B4vTzyAvodZ0a2eVRQ by LilaHexe@fedi.lilahexe.top
       0 likes, 0 repeats
       
       @fogti @domi nooooo it doesn't transfer the album art ​:neocat_cry_loud:​
       
 (DIR) Post #B4vTzyJRJ0Mx0QdIhc by domi@donotsta.re
       0 likes, 0 repeats
       
       @LilaHexe @fogti i tested it and it worked for me…can you try -vcodec copy ?
       
 (DIR) Post #B4vUeSCTbSCJHggBKC by domi@donotsta.re
       0 likes, 0 repeats
       
       @LilaHexe @fogti sorry for the rollercoaster, dmi’s discount shell coding advice tends to end up like this on low-spoon days xD
       
 (DIR) Post #B4vUsLiUVQOhEJHPGK by LilaHexe@fedi.lilahexe.top
       0 likes, 0 repeats
       
       @domi @fogti no luck. picard shows the album art on the FLAC, but on the OPUS it needs to fetch it from the internet first :(
       
 (DIR) Post #B4vUsMJMILt74eWqjA by domi@donotsta.re
       0 likes, 0 repeats
       
       @LilaHexe @fogti oh, okay, mpv goofed me and i didn’t actually have it workingone moment please
       
 (DIR) Post #B4vVG2btC8yEvEUNQ8 by domi@donotsta.re
       0 likes, 0 repeats
       
       @LilaHexe @fogti okay, i found the issue:opus doesn’t allow for embedding album artwebm only allows certain formats (not a static JPG)mka works if you add -vcodec copy -map 0:v:0mka is matroska audio if you haven’t heard of it before
       
 (DIR) Post #B4vVSAvk5Pg0CZYqlk by domi@donotsta.re
       0 likes, 0 repeats
       
       @LilaHexe @fogti correction: -vcodec copy -map 0:v:0 -map 0:a:0, otherwise there’s no audiobut now i’m having weird slowdowns when playing those files… wth
       
 (DIR) Post #B4vVoYPTTEafOR8gAy by LilaHexe@fedi.lilahexe.top
       1 likes, 0 repeats
       
       @domi @fogti ok new plan, I'll convert it with the command you gave me, and just add the cover data back afterwards with picard 🥴
       
 (DIR) Post #B4vhSbaKBU2OJrVxo0 by _r@donotsta.re
       0 likes, 0 repeats
       
       @domi @LilaHexe @fogti ogg+opus absolutely allows for embedded album art. attached is an opus file containing music I made with the album art set to a dankpods screenshot (in png format, no clue if other formats do or don’t work). I set it in picard, and it shows for me in mpv and deadbeef.I don’t know anything about the rest tho, including how to set album art in ffmpeg, sorry
       
 (DIR) Post #B4vhSbqdCr578R8zDs by domi@donotsta.re
       0 likes, 0 repeats
       
       @_r @LilaHexe @fogti well, it didn’t work with ffmpeg and jpeg. please no bully.