# generate the full output filename for conversion # ignore this, it strips only if it exists # some subdirs in my collection even have a flac subdir, you might # count the dirs, add two, then you're good. ![]() # this might be able to be super short with sed and complex one-liner, # my music folders, remote is the source, local the target dirįor i in $(find $remote -type f -iname '*.flac' ) # file, during runtime collisions should not become an issueĪnd the worker script like this: #!/bin/bash # not all 4 processes will want to start with the same # sleeping time can be shorter, this is just so, that My script to spin up the 4 instances, one for each core, is like this: #!/bin/bash I am open for any suggestions from your side, but so far it works for me. I am by no means a bash hacker, but I managed it, as my first bash script with the given demands, and maybe someone will benefit. My first runs were with the ffmpeg bin and the exact same options. ![]() Just replace the command avconv with ffmpeg. Oh, and yes, I see, I didn't use ffmpeg in that case, because my OSMC didn't provide packages for ffmpeg, only avconv, but since you're already here, I guess you know, it's "basically" the same - at least for the most important part. I took everything I found here (and maybe on some other sites) and created a small tool to not only create mp3s of flacs recursively, but also preserve relative paths to create them elsewhere with multithread support.
0 Comments
Leave a Reply. |