Multi-threaded Opus and AAC encoding, call for ABX 2017-09-03 19:46:17 Hi all,Loosely based on the original idea of LAME MT to run multiple codec instances in parallel on chunks of consecutive frames, I built multi-threaded Opus, FAAC and Core Audio (iTunes) codec drivers for fre:ac to explorer the feasibility of this approach.My reason for this is that for the usual approach of encoding multiple tracks in parallel, you need to have multiple tracks to encode in the first place. It does not help when encoding to a single output file and is inefficient when there are less tracks to convert than CPU threads available.Today I published the results of my work in a blog article and made the first public preview release for everyone to try out. It would be great if everyone could have a look at it and try out the preview.Speed-wise I get 440x realtime for Opus and 375x for Core Audio LC-AAC encoding @128kbps on an i7-5820K. That's roughly a 5x speed-up over single threaded encoding.My implementation takes overlapping chunks of audio frames and feeds them to a number of codec instances. It then takes the encoded audio packets from the codecs and writes them to the output stream in the correct order, throwing away the overlapping frames. Some overlap is necessary to avoid distortions at chunk boundaries due to inter-frame processing in the codecs.This works great for Opus and AAC as they have constant frame lengths and straight forward frame packing. I plan to roll-out this technology to LAME later, which will be more challenging because of MP3 frame packing, but should theoretically be possible. For Ogg Vorbis, though, I think this is not feasible because of variable frame lengths.As this is a new approach, it needs testing. It would be great if some of you could take the time to try and ABX the output of the multi-threaded encoders vs. the regular ones. I already did my own tests of course and did not find any issues with the current implementation.Please tell me what you think! I'm open to your opinions, suggestions and maybe even further ideas on this.Thanks in advance for you help!