A while ago, I came across an interesting looking topic on Super User, titled “Detect video chapter breaks from black screen or no sound in video”. At the time, I had just started working with the Python-OpenCV bindings, and thought I could craft up something fairly effective and fast.
Sure enough, I had a working prototype, and thought others might be interested in such a program… So I present to you: PySceneDetect, a threshold-based video scene detector, written in Python using OpenCV 2.
I plan on expanding the program further to allow for better handling of input/output, as well as the ability to add your own scene detection algorithms. Using Python and OpenCV for this sort of thing seems very useful, since OpenCV uses FFmpeg to decode video (thus supporting a wide variety of formats), and Python makes it easy to realize algorithms with the SciPy/NumPy packages (both of which are used by the OpenCV-Python implementation).
I’m working on finalizing everything, and hope to have a release by the end of the weekend (I happen to be competing in the IEEEXtreme programming competition starting this evening, so I should have some time to finish it up on Sunday morning).