Breakthrough / DVR-Scan

:vhs: Tool for extracting scenes with motion from videos (e.g. security camera or DVR footage). Written in Python, uses OpenCV.
http://www.dvr-scan.com/
Other
362 stars 47 forks source link

add a command option so that when globbing, only process files of a particular FPS #102

Closed millerthegorilla closed 1 year ago

millerthegorilla commented 1 year ago

Description of Problem & Solution currently when globbing, some files are at 10pfs and others are at 20fps. Currently the first appended video sets the correct framerate for processing, and this is reflected in an error message as mp4s are appended, something along the lines of 'warning, framerate wrong' (dvr-scan is in the middle of an overnight scan, and I don't want to risk interrupting it, by processing the same directory for the correct error). It would be nice if I could add a commandline option when globbing so that files could only be appended if they match the framerate specified to the command option. Something like

dvr-scan -f 10 -i ./**/* -o ../output

Media Examples: Where possible, provide videos/images demonstrating the problem at hand or issue you would like to solve (even YouTube links are fine).

Proposed Implementation: It would be nice if I could add a commandline option when globbing so that files could only be appended if they match the framerate specified to the command option. Something like

dvr-scan -f 10 -i ./**/* -o ../output

Alternative Solutions: a bash for loop to find files that are at 10fps using ffprobe, and then running dvr-scan on them.

FPS=10
for file in $(find . -type f -name "*mp4"); do   if [[ $(ffprobe $file 2>&1| grep ",* fps" | cut -d "," -f 5 | cut -d " " -f 2) == $FPS ]]; then     dvr-scan -bb --threshold 1.5 -i $file -d ../output/ ; fi; done
Breakthrough commented 1 year ago

Hi @millerthegorilla;

Firstly, thank you for the well thought out proposal. Unfortunately I must reject this feature request for the following reasons:

Thank you for the feature request. Please feel free to continue the discussion if you disagree, or if something in the future changes to warrant revisiting this.