Inspiration
As students (and also part-time workers), it is difficult for us to be able to watch full length games (European/American Football) and manage our studies, work on assignments, and our jobs as well. We were inspired to make this automatic highlights generator seeing the popularity of short-length media as well as acknowledging how applicable it is in our lives.
What it does
It is an application that creates highlights from a full length soccer game picking out key moments from the game based on parameters we have defined.
How we built it
We created algorithms that studied the audio intensity of the file as well as ones that parsed the subtitle SRT files and extracted key moments from these based on certain keywords and audio decibel levels. We created hashmaps to store time-stamps and the related audio + the subtitles and created a max heap priority queue based on the given information that let us decide on the top moments from the game.
Challenges we ran into
We really had to contemplate what kind of data structure we wanted to use for this. We finally decided that we wanted to use a hashmap that would store timestamp serial numbers as well as a new class that we created called Clip which had information about a particular time interval.
We also had to figure out how to prioritize the events of the game. For this, we assigned a priority to each time interval based on keywords and audio thresholds. We then used a max heap priority queue to help us pick out the top moments from the game.
Lastly, we used MoviePy to combine the clips of the relevant time intervals and create the highlights.
Accomplishments that we're proud of
We had to spend a lot of time splicing the audio file, use an appropriate sampling rate, find the amplitude (and therefore the intensity) from the correct time intervals and then assigning a priority to the audio clip as well. This took a good few hours and our efforts paid off.
Text recognition in the SRT file was also a tedious task as it was extremely difficult to extract the SRT file from the game. This process took us quite some but we were able to make it work.
What we learned
We learned a lot about the process of automation during this. We learned much about working with audio files, how to splice them, extract data from them, and also using this data to further produce results.
What's next for Automated Highlights Generator (AHG)
We could also make it compatible for livestreams as this would enable us to analyze the chat and make highlights from the full length game as soon as the game is over. We can also optimize our code better to study the audio files faster as it certainly takes some time to analyze a 90-minute audio file from a full length game.
Log in or sign up for Devpost to join the conversation.