By design MP3 encoding process is a single threaded process, which means the speed at which the MP3 conversion happens strictly depends on the processor speed of a single core. That means even if you had 16 core computer running at 4GHz processor speeds, you could only utilize 1 [email protected] per MP3 encoding process.
If you had multiple MP3 conversion tasks, running them in parallel would let you make the maximum usage out of a multi threaded computer.
But in a scenario, where you have a really long audio file that you would want to convert to MP3 you could do one of 2 things.
1. Split and run parallel processes
This could mean that you split the audio file into multiple smaller chunks which doesn’t take much time and then run conversions in parallel.
After all the files are successfully converted into mp3 we can then merge all the converted mp3s into a single final mp3 file.
All of this can achieved using ffmpeg
Below I have listed the basic commands to get each step done
Split audio file
ffmpeg -i input.m4a -map 0 -f segment -segment_time 60 -reset_timestamps 1 -c copy "$output%03d.m4a
Convert media file to MP3
ffmpeg -i input1.m4a -c:v copy -c:a libmp3lame -q:a 4 output1.mp3
Join MP3 files
ffmpeg -i "concat:output1.mp3|output2.mp3" -acodec copy output.mp3
2. Native Multithreaded encoding
This can be achieved using the SuperFast multithreading technology developed by enzo.
Download the appropriate binary for your OS from https://github.com/enzo1982/freac/releases
Multithreaded MP3 Lame conversion
freaccmd input.m4a --superfast -o output.mp3