[SOLVED] Using multiple threads to speed up conversions
Posted: Wed Nov 04, 2020 2:24 pm
When converting lots of files (specially if we need more than one output format), it can be useful to split the task to more than one thread, so that multi core processors can be used efficiently.
To check that i tried to convert about 200 files from .wav 48 KHz stereo to mono Alaw 8 KHz format, and only one thread was used i think. Doing it with FFMPEG was a faster because it was using a settable number of threads (Multi-File setting setting available in FFMPEG Batch).
It's probably not possible to use multi-threading if the conversion utility are not designed for this (sox cannot do it if i'm right), but what is probably doable is to run multiple instances of them, for example one for each output file format, and /or split the input file list so that it can be directed to more than one instance of the converter utility.
To check that i tried to convert about 200 files from .wav 48 KHz stereo to mono Alaw 8 KHz format, and only one thread was used i think. Doing it with FFMPEG was a faster because it was using a settable number of threads (Multi-File setting setting available in FFMPEG Batch).
It's probably not possible to use multi-threading if the conversion utility are not designed for this (sox cannot do it if i'm right), but what is probably doable is to run multiple instances of them, for example one for each output file format, and /or split the input file list so that it can be directed to more than one instance of the converter utility.