Zend certified PHP/Magento developer

How does one remove black frames from a video automatically?

I have a large collection of recordings where the recording was off but the video file keeps going recording a black screen for hours.

Is there an automated way to remove all black frames?

When I search for this concept on Google, all I find is people removing black frames in space around the video. What I’m looking for is a way to remove black frames in time.