4 ms·
You might be better served with gnu parallel - #create the directory structure first find . -type f -name '*.flac' |ionice -c3 parallel -j1 'mkdir -p $tran
by WhatIsDukkha 7y ago
You might be better served with gnu parallel -
#create the directory structure first
find . -type f -name '*.flac' |ionice -c3 parallel -j1 'mkdir -p $transcodes{//}' &&
#now the encodes
find . -type f -name '*.flac' |ionice -c3 parallel -j4 "ffmpeg -n -v 0 -i {} -c:a libopus -b:a 128k $transcodes{.}.opus"
Note the {.} which would actually only grab the basename.
- MachineMartin 7y agoThe ' should be " in first example. Otherwise $transcodes is not expanded.
- WhatIsDukkha 7y agoActually no, I'm handing that line to parallel which in turn will do the expansion when it invokes.