calaldees / KaraKara

Karaoke Event System - Attendees can view and queue tracks from their mobile phones
https://karakara.uk
GNU General Public License v3.0
28 stars 9 forks source link

processmedia3 #137

Closed shish closed 1 year ago

shish commented 1 year ago

I spent a few days trying to add threading into processmedia2 and gave up as I kept running into caching and stateful-ness issues; so now I'm trying a version that has minimal caching and no state. No unit tests yet, but everything else seems to work:

Practical benefits:

Notes for code review:

shish commented 1 year ago

While trying to make sure this generates exactly-compatible outputs with pm2, I found a bug - PM2 generates the output filename based on the hash of the input media, not the input file -- ie, the filename for the generated subtitles is based on the input video. So when the input video changes, the subtitles are re-encoded; but when the input subtitles are changed, output subtitles are left alone... That explains why I was having trouble getting it to recognise my subtitle typo fixes >_<