dxing97 / subs2cia

Condensed Immersive Audiovisual media generator from subtitles for language learning
MIT License
89 stars 10 forks source link

Ideas on Improving Slow SRS command #30

Open kanjieater opened 1 year ago

kanjieater commented 1 year ago

I'm using audiobooks with synchronized texts, so this sometimes uses large files. The current 6hr .m4b file is only around 150mbs. It is ~57k bitrate for audio quality.

The srs command has been running two hours to process this. The things I noticed immediately are:

I'm happy to break these out into other options. If there's one of these I could contribute on just let me know.

kanjieater commented 1 year ago

I went ahead and implemented all 3. I can't say it's in a state you would want to merge it back in, as I broke whatever the flac demuxing part was doing in favor of not writing an extra file, and just sticking with the source input. I also am ignoring all the things like bitrate, normalize, and to_mono. You could reenable them, but I figured it would be faster for splitting files to do it this way.

So this is really only focused on the srs command. But the results are astounding.

On my i9-13900ks, 32 core (obviously a bit of an edge case)

1st run, defaults 6hr m4b audiobook 165mins, 800mb of audio

2nd run, Bitrate changes & minimizing re-encode step resulted in 105mins, 86mb

3rd run, parallelize across core count 6mins

Final result 6mins, 86mb

You can check it out here. https://github.com/kanjieater/subs2cia

Feel free to reincorporate anything I may have commented out - I think this is good enough for my use case now.