Well, this is embarrassing. There should be an image here. Great picture, too!
Video Keyword Auto-Cuts

Overview

On YouTube you see “Supercuts” where every occurrence of a fictional character from a TV show or movie saying his catchphrase, (say, “wubba-lubba-dub-dub”) is compressed into a single compilation. We were particularly inspired by this one:

Rather than doing this by hand, we propose searching for the time-ranges when those phrases occur.

Then our code returns a new video with only those phrases. All other phrases are “cropped out”.

Our Team

  • Ollie O'Donnell
  • Zach Zeleznick

The Program

main.py, when run, takes an .mp4 video and its corresponding .srt file and performs one of the following three functions:

  1. Phrase: Captures the entire phrase in which the word(s) occur.
  2. Word: Tightens the bounds to include just the word(s).
  3. Speech: Combines 1 occurrence of each given word to create a "fake speech".

It then outputs the resultant "supercut" video to /out/FILENAME.mp4

Example Source Video

1. Phrase Slicing

Consider the example of calling python main.py --phrase 1 america.

In this case we have chosen the input files to be 1.mp4 and 1.srt. The video happens to be Obama's address about the recent terrorist attacks in San Bernardino.

We could have chosen to include phrases that include any of arbitrarily large set of words. For example, python main.py --phrase 1 code is good would return all clips that include at least one of the three words. However we find the result to be more fun when we choose one particular word - in this case, "America".

2. Word Slicing

Here we call python main.py --word 1 america.

To isolate the words we used heuristic methods to ascertain when exactly Obama says the word "America" during the phrase. By doing so we can create a possibly more interesting supercut by eliminating the context and focusing on the way that the words are spoken.

3. Fake Speech

Once we have clips of individual words, we are able to compose sentences that the people in the video never actually said.

Much like letters made from magazine clippings, it's not exactly convincing but a novel way to communicate nonetheless.

We now call python main.py --speech 1 american ideals are stronger than violence.