OK, admittedly not the best project name for my MHD2014 Boston hack.
I was inspired by the video that broke a few days previously - someone took Taylor Swift's "Shake it Off" and synchronized it to an 80s Aerobic video.
There have been multiple takedown-reposts of the video, so I'm not going to bother to try and link directly to it. The original poster did some nice editing of the video, and it worked really well.
I used the Echonest Remix tools to analyze the original audio from the video (~75bpm) and the Taylor Swift song (~160bpm). The audio replacement worked because the new song's tempo was an even multiple of the source audio.
That got me thinking about matching songs and videos that did not have matching tempos. By using ffmpeg to stretch or shrink the video, this is possible.
"Origin of Love" had a lower BPM than the original video soundtrack, so my script originally slowed down the video. I added a parameter that allowed me to run the BPM at a multiple -- this version matches the video to 2x the song's BPM.
The tool can take any video as input, but I only expect it to work well with video that's strongly defined by a beat. Naturally, music videos work great, but exercise and athletic videos also work really well.
I had a great weekend. It was a ton of fun hanging out with the other participants and seeing their awesome hacks on Sunday.
If you are interested, the code's available on github.
Published on November 10, 2014 by Brian Fife.