PySceneDetect icon indicating copy to clipboard operation
PySceneDetect copied to clipboard

Only perform detection within a region-of-interest

Open laphlaw opened this issue 4 years ago • 4 comments

My use case is to skip dead time in a sporting event, e.g. a basketball game. To do this, I thought I'd just analyze the section of the video frame that contains the scoreboard, identify the timestamps of 'dead time', and skip over those.

Is this possible with either the command line tool or the library?

laphlaw avatar Jan 18 '20 06:01 laphlaw

Hi @laphlaw;

Currently this is not implemented, but is definitely possible. Eventually I'd like to add motion detection capability to PySceneDetect, combining it with the other tool DVR-Scan (which performs what you mention, only returns frames that have some sort of motion). As such, #43 would be a required feature to be implemented before addressing this.

At that point I would need to figure out how to have a kind of filter/detector pipeline, but that should be possible. Will mark this as an enhancement for now and add it to the backlog, thanks for your suggestion.

Breakthrough avatar Mar 29 '20 16:03 Breakthrough

Note that DVR-Scan ( https://dvr-scan.readthedocs.io/en/latest/ ) supports this using the -roi argument.

Breakthrough avatar Sep 12 '20 18:09 Breakthrough

@laphlaw if I understand your use case you want to cut the input video and remove the game off times. Is that not kind of the opposite of what this repo is trying to achieve, which is detecting cuts already in the video, not generating them from the video ?

Tetsujinfr avatar Nov 01 '21 04:11 Tetsujinfr

After re-reading @Tetsujinfr's comment I think as worded the original post is requesting something entirely differently. I had intended this to support detection on a smaller subset of the input video, cropping out a particular region. As a workaround though the video can be pre-cropped.

Breakthrough avatar Nov 16 '22 02:11 Breakthrough