Building an automated platform that captures the best clips from Twitch, live.

They are created by streamers themselves or any twitch users.In order to stay engaged with my favorite streamers, I watch their clips on a daily basis.After using Twitch for four years, I realized that I was struggling to keep up with the constant stream of content created..Grafana, plugged to Influx was used to visualize the messages received from the IRC client in realtime.Raw chat velocity from top Twitch streamersThe picture above is a graph of all the live messages we receive from Twitch..Watching Twitch as our data is displayed, the vast majority of the spikes seems to be related to epic moments, but not all the time..We identified false positives among real positives that we need to take into account in our model.Section 2 — Defining A Modela — Model Evaluation & TestabilityAs an engineer, an observation is formalized and tested through models that we use to reflect physical events in our world.In this case, we formalize the given assumption:Given the evolution of the velocity of live messages through time, spikes in velocity can be an indicator of interesting moments on Twitch.I would like to point at the relative nature of “spikes” and “interesting” as it will be key in succeeding at detecting accurately an epic moment.b — Model LimitationsWe identified what could make our model viable..Let us address the limitations and pitfalls.Some streamers ask for the opinion of their audience, resulting in sudden spikes of number of messages..Given the fact that we have downsampled our data to ten seconds, that’s a hundred seconds window.Note : applying a moving average smoothing algorithm will most likely induce a gap in our representation..At that exact moment, we will trigger an alert and create a clip of what happened.To sum up:We have smoothed our signal using a moving average smoothing algorithm.We have found that the derivative is a good indicator of sudden changes.We have compared the two values to raise an alert when something happens.We applied a small correcting factor to ensure that we capture the very best clipsOur observations result in the following modelGiven the velocity of live messages, if its derivative goes over its moving average, we have an “epic” moment and will create a clip out of it.d — Model ValidationIt was time to do a reality check and see how my approach was performing on a complete session.. More details

Leave a Reply