Release Notes
Adds edge detection capability for fast cuts, addresses outstanding bugs, and includes various enhancements.
Changelog
Command-Line Changes:
- [feature] Add
moviepybackend wrapping the MoviePy package, usesffmpegbinary on the system for video decoding - [feature] Edge detection can now be enabled with
detect-contentanddetect-adaptiveto improve accuracy in some cases, especially under lighting changes, see new-w/--weightsoption for more information- A good starting point is to place 100% weight on the change in a frame's hue, 50% on saturation change, 100% on luma (brightness) change, and 25% on change in edges, with a threshold of 32:
detect-adaptive -w 1.0 0.5 1.0 0.25 - Edge differences are typically larger than other components, so you may need to increase
-t/--thresholdhigher when increasing the edge weight (the last component) withdetect-content, for example:
detect-content -w 1.0 0.5 1.0 0.25 -t 32 - May be enabled by default in the future once it has been more thoroughly tested, further improvements for
detect-contentare being investigated as well (e.g. motion compensation, flash suppression) - Short-form of
detect-contentoption--frame-windowhas been changed from-wto-fto accomodate this change
- A good starting point is to place 100% weight on the change in a frame's hue, 50% on saturation change, 100% on luma (brightness) change, and 25% on change in edges, with a threshold of 32:
- [enhancement] Progress bar now displays number of detections while processing, no longer conflicts with log message output
- [enhancement] When using ffmpeg to split videos,
-map 0has been added to the default arguments so other audio tracks are also included when present (#271) - [enhancement] Add
-aflag toversioncommand to print more information about versions of dependencies/tools being used - [enhancement] The resizing method used used for frame downscaling or resizing can now be set using a config file, see
[global]optiondownscale-methodand[save-images]optionscale-method - [other] Linear interpolation is now used as the default downscaling method (previously was nearest neighbor) for improved edge detection accuracy
- [other] Add
-c/--min-content-valargument todetect-adaptive, deprecate-d/--min-delta-hsv
General:
- [general] Recommend
detect-adaptiveoverdetect-content - [feature] Add new experimental backend
VideoStreamMoviePyusing the MoviePy package - [feature] Add edge detection to
ContentDetectorandAdaptiveDetector(#35)- Add ability to specify content score weights of hue, saturation, luma, and edge differences between frames
- Default remains as
1.0, 1.0, 1.0, 0.0so there is no change in behavior - Kernel size used for improving edge overlap can also be customized
- [feature]
AdaptiveDetectorno longer requires aStatsManagerand can now be used withframe_skip(#283) - [bugfix] Fix
scenedetect.detect()throwingTypeErrorwhen specifyingstats_file_path - [bugfix] Fix off-by-one error in end event timecode when
end_timewas set (reported end time was always one extra frame) - [bugfix] Fix a named argument that was incorrect (#299)
- [enhancement] Add optional
start_time,end_time, andstart_in_scenearguments toscenedetect.detect()(#282) - [enhancement] Add
-map 0option to default arguments ofsplit_video_ffmpegto include all audio tracks by default (#271) - [docs] Add example for using a callback (#273)
- [enhancement] Add new
VideoCaptureAdapterto make existingcv2.VideoCaptureobjects compatible with aSceneManager(#276)- Primary use case is for handling input devices/webcams and gstreamer pipes, see updated examples
- Files, image sequences, and network streams/URLs should continue to use
VideoStreamCv2
- [api] The
SceneManagermethodsget_cut_list()andget_event_list()are deprecated, along with thebase_timecodeargument - [api] The
base_timecodeargument ofget_scenes_from_cuts()inscenedetect.stats_manageris deprecated (the signature of this function has been changed accordingly) - [api] Rename
AdaptiveDetectorconstructor parametermin_delta_hsvto `min_content_val - [general] The default
crfforsplit_video_ffmpeghas been changed from 21 to 22 to match command line default - [enhancement] Add
interpolationproperty toSceneManagerto allow setting method of frame downscaling, use linear interpolation by default (previously nearest neighbor) - [enhancement] Add
interpolationargument tosave_imagesto allow setting image resize method (default remains bicubic)