I think it's probably better to store segments of 10 seconds each for a script like this. A KPM meter on twitch usually refers to not whole-stream session but rather current time session.
Ya its very ambiguous what exactly the start time *should* be on a script like this.