zelda3 icon indicating copy to clipboard operation
zelda3 copied to clipboard

Improve encode_opus.py

Open alisonjenkins opened this issue 2 years ago • 1 comments

  • Thread the encoding so that it can make use of multiple CPU threads to encode the clips in parallel for a massive speedup.

  • Fix the formatting of the script using the black Python code formatter.

  • Delete some unused variables and libraries.

Description

Improves the encode_opus.py script so that it takes less time to reencode the audio files.

Has it convert all of the pcm files instead of just 48-115.

Cleans up the code and formats it using the black code formatter.

Will this Pull Request break anything?

No this Python script is not used as part of the C code.

Suggested Testing Steps

Create a msu folder in the repo root and put the pcm files from a MSU pack into that directory, run the script. It should then reencode the audio clips using multiple CPU cores and take much less time to reencode than the previous version of the script.

alisonjenkins avatar Feb 04 '23 09:02 alisonjenkins

Why not have a different pull request for reformatting the file? Reviewing is impossible otherwise.

JoseAmador95 avatar Feb 07 '23 17:02 JoseAmador95