PySceneDetect v0.6-dev2 #261
Breakthrough
announced in
News
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Release Notes
This is a pre-release of the upcoming PySceneDetect v0.6. You can grab it from
pip
:PySceneDetect v0.6 is a major breaking change including better performance, configuration file support, and a more ergonomic API. The new minimum Python version is now 3.6. See the Migration Guide for information on how to port existing applications to the new API. Most users will see performance improvements after updating, and changes to the command-line are not expected to break most workflows.
The main goals of v0.6 are reliability and performance. To achieve this required several breaking changes. The video input API was refactored, and many technical debt items were addressed. This should help the eventual transition to the first planned stable release (v1.0) where the goal is an improved scene detection API.
Changelog
Overview:
VideoManager
(replaced withVideoStream
),StatsManager
, andsave_images()
Command-Line Changes:
-c
/--config
or from a user config folder (see documentation for details)-i
/--input
may no longer be specified multiple times (use an external tool likeffmpeg
to perform concatenation first)-l
/--logfile
now respects-o
/--output
-b
/--backend
option can be set to use a specific video backendopencv
(default) andpyav
if theav
package is installedscenedetect help
to see a list of backends available on the current system-v
/--verbosity
now takes precedence over-q
/--quiet
detect-adaptive
command:--drop-short-scenes
global option now works correctly withdetect-adaptive
detect-content
command:-t
/--threshold
lowered to 27 to be more sensitive to shot changes (#246)-m
/--min-scene-len
optiondetect-threshold
command:-p
/--min-percent
and-b
/--block-size
have been removed-m
/--min-scene-len
optionsplit-video
command:-a
has been changed to--args
(from--override-args
)-c
/--copy
now usesffmpeg
instead ofmkvmerge
-m
/--mkvmerge
flag can be set to usemkvmerge
instead offfmpeg
API Changes:
VideoStream
replacesVideoManager
and supports both OpenCV (VideoStreamCv2
) and PyAV (VideoStreamAv
) backends (#213)frame_number
is 1-based whereasposition
is 0-based to align with PTS)test_time_invariants
intests/test_video_stream.py
as a reference for specific behaviours of these properties, and a test video detailing visually what is expectedSceneManager
:SceneManager
is now responsible for frame downscaling (see thedownscale
andauto_downscale
properties)detect_scenes()
now performs video decoding in a background thread which greatly improves performance in many casesclear()
now also clears anydetect_scenes()
no longer displays a progress bar by default (setshow_progress=True
to restore the previous behaviour)detectors, as detectors are statefulget_scene_list()
now returns an empty list if there are no detected cuts (previously one scene with the duration of the video was returned)start_in_scene=True
detect
function inscenedetect
module that only has two required arguments: the path to a video (path
) and a detector (detector
)save_images()
no longer accepts downscale_factor, since there is already the ability to resize images via thescale
orheight
/width
argumentsStatsManager
load/save methods now accept a path or an open file handlescenedetect.video_splitter
)previous_frame
method ofFrameTimecode
allowing a negative frame numberMAX_FPS_DELTA
andMINIMUM_FRAMES_PER_SECOND_DELTA_FLOAT
inscenedetect.frame_timecode
into newMAX_FPS_DELTA
constantvideo_manager
parameter has been removed from theAdaptiveDetector
constructorsplit_video_ffmpeg
andsplit_video_mkvmerge
functions inscenedetect.video_splitter
arguments have been renamed and defaults updated:suppress_output
is nowshow_output
, default isFalse
hide_progress
is nowshow_progress
, default isFalse
block_size
argument has been removed from theThresholdDetector
constructorcalculate_frame_score
method ofContentDetector
has been renamed to_calculate_frame_score
, use new module-level function of the same name insteadKnown Issues
save-images
orsplit-video
commands-l
/--add-last-scene
option indetect-threshold
cannot be disabledThis discussion was created from the release PySceneDetect v0.6-dev2.
Beta Was this translation helpful? Give feedback.
All reactions