Multithreading plx

Anything you think is missing, or needs enhancement, goes here.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
esamo
Posts: 8
Joined: Thu Jul 30, 2015 7:27 am
Operating System: Windows 10

Multithreading plx

Post by esamo » Sat Jul 29, 2017 4:22 pm

None the following uses more than one CPU core, which would otherwise improve Audacity greatly:
- effect: noise reduction,
- effect: normalize,
- export to MP3.

Piotr Grochowski
Posts: 155
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: Multithreading plx

Post by Piotr Grochowski » Sun Jul 30, 2017 8:41 am

Audacity can't export to MP3. Ask LAME developers.

esamo
Posts: 8
Joined: Thu Jul 30, 2015 7:27 am
Operating System: Windows 10

Re: Multithreading plx

Post by esamo » Sun Jul 30, 2017 8:44 am

Audacity already exports to MP3 via LAME lib. It could easily split the job into pieces and feed the pieces to the lib instead of one big chunk for one processor. The same solution for applying effects.

steve
Site Admin
Posts: 47319
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: Multithreading plx

Post by steve » Sun Jul 30, 2017 9:44 am

Multi-threading LAME is problematic because the "Bit Reservoir" requires that LAME runs as a single thread. Disabling the Bit Reservoir negatively affect encoding quality.
There was a project a few years ago (https://hydrogenaud.io/index.php/topic,73790.0.html) that claimed to provide multithreading without disabling the bit reservoir (using exactly the same encoding algorithm as the single threaded LAME), but links to that project now appear to be dead.

Splitting the track into parts then concatenating the parts after encoding is also problematic because it creates non-standard files. That can be fixed by a second pass of processing to fix the stream errors, but then you've probably lost more time than you've saved.

In the case of Export Multiple, encoding could be made considerably faster by processing multiple files simultaneously (running multiple instances of LAME). The audio player and transcoder "Foobar2000" already does this.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 47319
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: Multithreading plx

Post by steve » Sun Jul 30, 2017 9:47 am

For effect processing, a multi-threading strategy that has been considered by Audacity's developers is to process stereo tracks as two threads, one per channel. Currently there are no developers working on this, though I think there's a good chance that this approach could be taken at some future time.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply