-
Notifications
You must be signed in to change notification settings - Fork 474
Description
Problem/Use Case
A detector must be specified currently for scenedetect to perform any actions on the input. Ideally this should not be the case - a default detector should be chosen if one is omitted, and the user should be able to set it in the config file.
Solutions
Allow commands of the form:
scenedetect -i video.mp4 split-video
The default will be detect-adaptive, but the user should also have a config file option with the name of the detector to use, e.g. in the config file:
[global]
default-detector = detect-threshold
One particular issue I ran into when trying to fix this by handling this in the controller is that some erroneous commands still result in the input being processed, e.g.:
scenedetect -i video.mp4 load-scenes -i doesnotexist.csv
Scene detection proceeds due to the current design, and the error doesn't get printed until after detection was done and the video was split. The command should not run at all if any subcommand has an error when processing options, or an unrecognized subcommand is provided.