Release Notes
Adds edge detection capability for fast cuts, addresses outstanding bugs, and includes various enhancements.
Changelog
Command-Line Changes:
- [feature] Add
moviepy
backend wrapping the MoviePy package, usesffmpeg
binary on the system for video decoding - [feature] Edge detection can now be enabled with
detect-content
anddetect-adaptive
to improve accuracy in some cases, especially under lighting changes, see new-w
/--weights
option 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
/--threshold
higher 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-content
are being investigated as well (e.g. motion compensation, flash suppression) - Short-form of
detect-content
option--frame-window
has been changed from-w
to-f
to 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 0
has been added to the default arguments so other audio tracks are also included when present (#271) - [enhancement] Add
-a
flag toversion
command 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-method
and[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-val
argument todetect-adaptive
, deprecate-d
/--min-delta-hsv
General:
- [general] Recommend
detect-adaptive
overdetect-content
- [feature] Add new experimental backend
VideoStreamMoviePy
using the MoviePy package - [feature] Add edge detection to
ContentDetector
andAdaptiveDetector
(#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.0
so there is no change in behavior - Kernel size used for improving edge overlap can also be customized
- [feature]
AdaptiveDetector
no longer requires aStatsManager
and can now be used withframe_skip
(#283) - [bugfix] Fix
scenedetect.detect()
throwingTypeError
when specifyingstats_file_path
- [bugfix] Fix off-by-one error in end event timecode when
end_time
was 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_scene
arguments toscenedetect.detect()
(#282) - [enhancement] Add
-map 0
option to default arguments ofsplit_video_ffmpeg
to include all audio tracks by default (#271) - [docs] Add example for using a callback (#273)
- [enhancement] Add new
VideoCaptureAdapter
to make existingcv2.VideoCapture
objects 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
SceneManager
methodsget_cut_list()
andget_event_list()
are deprecated, along with thebase_timecode
argument - [api] The
base_timecode
argument ofget_scenes_from_cuts()
inscenedetect.stats_manager
is deprecated (the signature of this function has been changed accordingly) - [api] Rename
AdaptiveDetector
constructor parametermin_delta_hsv
to `min_content_val - [general] The default
crf
forsplit_video_ffmpeg
has been changed from 21 to 22 to match command line default - [enhancement] Add
interpolation
property toSceneManager
to allow setting method of frame downscaling, use linear interpolation by default (previously nearest neighbor) - [enhancement] Add
interpolation
argument tosave_images
to allow setting image resize method (default remains bicubic)