Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 1020 Bytes

README.md

File metadata and controls

14 lines (9 loc) · 1020 Bytes

SAMBAL (video tempo detection)

This repo is kernel of an attept to build out a way to detect tempo / bpm from video clips. (Haven't you ever wanted to automagicallly score your movies? This would help towards that.) This code parses video and builds an optical flow using openCV Farneback algorithm for dense optical flow. Then we calculate the angle between the movement vectors to extract a way of representing motion to infer beats and tempo using Ryan Faircloth's visual tempo detection algorithm.

For example, when run on the following video, we infer the tempo as 128bpm. Overlay some dance music with the same bpm, and huzzah!

OfficeDance

This is just a quick implementation to quickly explore the problem and prototype a solution. Obvious next steps are CNN or LSTM based on these timeseries representations of movement.

How to run

python run.py media/office_dance_vid.mp4