NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #4188 most downloaded on PyPI
Video scene cut/shot detection program and Python library (bundles the opencv-python OpenCV variant and the scenedetect CLI).
Last release 2 months ago
22 Jul 2026
Ships fairly regularly
a new release about every 3 months
Most releases are documented
notes for 19 of 25 stable releases
1 version withdrawn
withdrawn after publishing
8 years old
30 releases · first in 2018
The Windows and Docker builds also override Pillow to 12.3.0 for upstream security fixes (moviepy#2553)
PySceneDetect 0.7.1 adds support for concatenating multiple videos, along with several stability and robustness fixes for the PyAV and OpenCV backends.
split-video has a new --expand flag: when scenes are detected within a time window (-s/-e), the first output clip is extended back to the start of the video and the last clip is extended forward to the end, so no footage outside the analysis window is dropped #115scenedetect.detect() now accepts a backend keyword argument ("opencv", "pyav", or "moviepy") similar to open_video. Defaults to "opencv", matching prior behavior.expand_scenes_to_bounds() helper in scenedetect.scene_manager to extend a scene list so the first scene starts at a given lower bound and the last scene ends at a given upper boundVideoStream now provides a public read-only decode_failures property reporting the number of frames that failed to decode and were skipped (defaults to 0; populated by the OpenCV and PyAV backends)VideoStreamConcat (scenedetect.backends.concat) which concatenates multiple videos into a single continuous stream with a monotonic PTS timeline; open_video() and detect() now accept a list of paths. VideoStreamConcat.map_span() maps spans of the global timeline back to per-source local timesVideoStreamAv) now skips corrupt frames during read() and continues decoding instead of failing, giving up only after 8 consecutive decode failures (matching the OpenCV backend's tolerance behavior)position 0, consistent with other backends and with seek()FrameTimecode objects that both carry exact presentation times (e.g. positions from VFR videos) and share the same frame rate are now performed exactly using pts and time_base instead of rounded frame numbers. Previously, distinct frames in VFR sections could compare equal or fail strict ordering when their times rounded to the same approximate frame number. Comparisons involving frame- or seconds-based timecodes, plain values (int/float/str), or differing frame rates are unchangedscenedetect and scenedetect-headless are unchanged: they continue to ship the full program (library + CLI) with opencv-python / opencv-python-headless respectively. Both packages provide the same scenedetect module (install or depend only one)docker run --rm -v "$(pwd):/files" ghcr.io/breakthrough/pyscenedetect -i /files/video.mp4 detect-adaptive split-video -o /files
One column per quarter.
Nothing published for this version
Care was taken to minimize changes for most common API uses, however more advanced use cases may run into breaking changes. Please review the Migratio…
PySceneDetect 0.7 is a major breaking release which overhauls how timestamps are handled. This allows PySceneDetect to properly process variable framerate (VFR) videos. A significant amount of technical debt has been addressed, including removal of deprecated or overly complicated APIs.
Care was taken to minimize changes for most common API uses, however more advanced use cases may run into breaking changes. Please review the Migration Guide when updating from v0.6. Minimum supported Python version is now Python 3.10.
0.6s) and timecodes (e.g. 00:00:00.600) #531save-fcp command allows exporting in Final Cut Pro format (FCP7/FCPX) #156save-qp command writes a QP file with scene boundary frame numbers, suitable for forcing keyframes at scene cuts in x264/x265 #448save-html command replaces the deprecated export-html; the prior command remains as an alias and emits a deprecation warning #518save-edl option --start-timecode/-s to providde a custom start timecode for generated EDLs, supports SMPTE HH:MM:SS:FF or 8-digit HHMMSSFF input #515save-otio output where frame values near integer boundaries (e.g. 90.00000000000001) were serialized with spurious precisionOSError in the MoviePy backend as it is susceptible to subprocess pipe races on slow or heavily loaded systems #496-f/--frame-rate (and the VideoStreamMoviePy(frame_rate=...) API), bringing it in line with the OpenCV and PyAV backendsdetect-threshold cut frame numbers are now backend-deterministic; previously the cut could differ by 1 frame between PyAV and OpenCV when the fade midpoint landed on a .5 rounding boundary (PyAV uses sub-microsecond PTS, OpenCV uses millisecond-truncated CAP_PROP_POS_MSEC)-d/--min-delta-hsv option from detect-adaptive command (use -c/--min-content-val instead)-f/--framerate to -f/--frame-rate as part of VFR overhaul (legacy --framerate form is preserved as a hidden alias but will be removed in v0.8)SCENEDETECT_DEBUG environment variable to control how exceptions and debugging are handled. Unhandled exceptions and Ctrl+C now produce a logger-formatted error message and exit cleanly with code 1 instead of dumping a raw Python traceback. Set SCENEDETECT_DEBUG=1 to ensure all exceptions are re-raised instead of being logged. In both cases, the program will exit with a non-zero exit code.write_scene_list_edl, write_scene_list_fcpx, write_scene_list_fcp7, and write_scene_list_otio to the scenedetect.output module so save-edl, save-fcp, and save-otio can be invoked directly from Python (previously CLI-only)write_scene_list_edl accepts an optional start_timecode parameter (SMPTE HH:MM:SS:FF or 8-digit HHMMSSFF) that is added to every event's source and record columns #515Timecode type to represent frame timings in terms of the video's source timebasetime_base and pts properties to FrameTimecode for more accurate timing informationVideoStream.positionVideoStream.frame_rate now returns Fraction instead of floatFraction values (e.g. Fraction(24000, 1001) instead of 23.976) to avoid float precision lossFrameTimecode.frame_num is now approximate for VFR video (based on PTS-derived time)frame_rate property (returns exact Fraction) as the canonical replacement for framerate (returns float) in FrameTimecode and VideoStream
time_base equals 1 / frame_rate for CFR sources #548frame_rate keyword argument to open_video() and the VideoStreamCv2, VideoCaptureAdapter, VideoStreamAv, and VideoStreamMoviePy constructors as the canonical replacement for framerate #548; accepts float | Fraction | None. The legacy framerate keyword is retained as a deprecated alias and is ignored when frame_rate is providedequal_frame_rate(other) method as the canonical replacement for equal_framerate(fps)opencv-python a requirement, add separate scenedetect-headless variant insteadframe_num parameter (int) with timecode (FrameTimecode) in SceneDetector interface #168:
SceneDetector.process_frame() and SceneDetector.post_process() (the post_process signature on the abstract base is now consistently typed as FrameTimecode to match its concrete-detector overrides; the prior int annotation did not reflect the actual runtime value)StatsManager.get_metrics(), StatsManager.set_metrics(), and StatsManager.metrics_exist() formally accept either FrameTimecode or int (the int form is retained for compatibility with the deprecated load_from_csv() path, which keys metrics by integer frame number)StatsManager.load_from_csv() and save_images() output_dir now accept os.PathLike (e.g. pathlib.Path) in addition to strSceneManager.detect_scenes() duration and end_time formally accept int (frames), float (seconds), str (timecode), or FrameTimecode - matching the documented and runtime-supported behaviorSceneDetector is now a Python abstract classSceneDetector instances can now assume they always have frame data to process when process_frame is calledSceneDetector.is_processing_required() methodSceneDetector.stats_manager_required property, no longer requiredSparseSceneDetector interfacemin_scene_len and save_images() frame_margin arguments now accept seconds (float) and timecode strings (e.g. "0.6s", "00:00:00.600") in addition to a frame count (int); these are evaluated using the source video's timing for correct behavior on VFR videos #531Module Reorganization:
scenedetect.scene_detector moved to scenedetect.detectorscenedetect.frame_timecode moved to scenedetect.commonscenedetect.scene_manager moved to scenedetect.output #463scenedetect.video_splitter moved to scenedetect.output.video #463frame_num, frame_rate, and seconds instead of getter methodsframe_num and frame_rate are now read-only properties (construct a new FrameTimecode to change them)FrameTimecode.previous_frame() methodwarnings module to emit runtime deprecation warnings, these features will be removed in v0.8framerate property and equal_framerate() method via docstring; the legacy forms will continue to work until v0.8 when they will be upgraded to DeprecationWarning before removal in v0.9scenedetect.video_manager, use the scenedetect.open_video() function insteadbase_timecode and video_manager from various functionsSceneManager.get_event_list() methodAdaptiveDetector.get_content_val() method (use StatsManager instead)AdaptiveDetector constructor arg min_delta_hsv (use min_content_val instead)advance parameter from VideoStream.read()SceneDetector.stats_manager_required property, no longer requiredSceneDetector is now a Python abstract classCtrl+C during scene detection in the bundled distribution now exits cleanly instead of surfacing the PyInstaller bootloader tracebackRe-release of the Python package that fixes dependency version pinning.
Re-release of the Python package that fixes dependency version pinning.
Fixes issues with importing EDL files into DaVinci Resolve and other editors, update ffmpeg.
Fixes issues with importing EDL files into DaVinci Resolve and other editors, update ffmpeg.
save-edl end timestamp being too short by 1 frame #516Minor update to fix issues with importing EDL files into DaVinci Resolve and other editors.
save-edl end timestamp being too short by 1 frame #516[general] The export-html command is now deprecated, use save-html instead
PySceneDetect v0.6.6 introduces new output formats, which improve compatibility with popular video editors (e.g. DaVinci Resolve).
save-otio command supports saving scenes in OTIO format #497save-edl command supports saving scenes in EDL format CMX 3600 #495split-video with -m/--mkvmerge option #473split-video command with -m/--mkvmerge optionsplit_video_mkvmerge()VideoStreamCv2 as workaround for opencv#26795export-html command is now deprecated, use save-html insteadNothing published for this version
Nothing published for this version
This release brings crop support, performance improvements to save-images, lots of bugfixes, and improved compatibility with MoviePy 2.0+.
This release brings crop support, performance improvements to save-images, lots of bugfixes, and improved compatibility with MoviePy 2.0+.
--crop option to scenedetect command and config file to crop video frames before scene detectioncrop property to SceneManager to crop video frames before scene detection--show flag to export-html command to launch browser after processing #442threading option to save-images/save_images() #456
export-html command now implicitly invokes save-images with default parameters
export-html command will always use the result of the save-images command that precedes itsave_to_csv now works with paths from pathlibsave_to_csv function now works correctly with paths from the pathlib modulecol_separator and row_separator args to write_scene_list function in scenedetect.scene_managerSyntaxWarning due to incorrect escaping #400ContentDetector crash when using callbacks #416 #420save-images/save_images() not working correctly with UTF-8 paths #450save-images/save_images() with OpenCV backend #455default-detector config optionMM:SS[.nnn] are now processed correctly #443AttributeError: module 'cv2' has no attribute 'Mat' #468Includes new histogram and perceptual hash based detectors (thanks @wjs018 and @ash2703), adds flash filter to content detector, and includes various
Includes new histogram and perceptual hash based detectors (thanks @wjs018 and @ash2703), adds flash filter to content detector, and includes various bugfixes. Below shows the scores of the new detectors normalized against detect-content for comparison on a difficult segment with 3 cuts:
<a href="https://raw.githubusercontent.com/Breakthrough/PySceneDetect/v0.6.4-release/website/pages/img/0.6.4-score-comparison.png"><img src="https://raw.githubusercontent.com/Breakthrough/PySceneDetect/v0.6.4-release/website/pages/img/0.6.4-score-comparison.png" width="480" alt="comparison of new detector scores"/></a>
Feedback on the new detection methods and their default values is most welcome. Thanks to everyone who contributed for their help and support!
detect-content / ContentDetector (enabled by default) #35 #53
--filter-mode option--filter-mode = merge (new default) merges consecutive scenes shorter than min-scene-len--filter-mode = suppress (previous default) disables generating new scenes until min-scene-len has passedsave-images filename customization: $TIMECODE, $FRAME_NUMBER, $TIMESTAMP_MS (thanks @Veldhoen0) #395--drop-short-scenesmin-scene-len when using detect-adaptive / AdaptiveDetector with large values of --frame-window-map 0 to -map 0:v:0 -map 0:a? -map 0:s? #392Deprecate FrameMetricRegistered and FrameMetricNotRegistered exceptions (no longer used)
In addition to some perfromance improvements with the load-scenes command, this release of PySceneDetect includes a significant amount of bugfixes. Thanks to everyone who contributed to the release, including those who filed bug reports and helped with debugging!
Program Changes:
save-images with --backend pyav #355--duration and --end for presentation time when specified as frame numbers #341--duration or --end are set #341load-scenes to be specified once, and disallow with other detect-* commands #347-s/--start being larger than -e/--end for the time commanddetect-adaptive not respecting --min-scene-len for the first scenelist-scenes command is specified #356[list-scenes] config file options:
display-scenes and display-cuts options to control outputcut-format to control formatting of cut points #349
frames, timecode, secondss suffix for setting timecode values in seconds is no longer required (values without decimal places are still interpreted as frame numbers)load-scenes now skips detection, generating output much faster #347 (thanks @wjs018 for the initial implementation)API Changes:
AttributeError thrown when accessing aspect_ratio on certain videos using VideoStreamAv #355SceneManager.detect_scenes warning when duration or end_time are specified as timecode strings #346FrameTimecode when rounding is enabled #354AdaptiveDetector not respecting min_scene_len for the first sceneoutput_dir argument to split_video_ffmpeg and split_video_mkvmerge functions to set output directory #298formatter argument to split_video_ffmpeg to allow formatting filenames via callback [#359](https://github.com/
Breakthrough/PySceneDetect/issues/359)frame_img argument to SceneDetector.process_frame() is now requiredTimecodeValue from scenedetect.frame_timecode (use typing.Union[int, float, str])MotionDetector and scenedetect.detectors.motion_detector module (will be reintroduced after SceneDetector interface is stable)scenedetect.stats_manager module improvements:
StatsManager.register_metrics() method no longer throws any exceptionsStatsManager.metric_keys property to query registered metric keysFrameMetricRegistered and FrameMetricNotRegistered exceptions (no longer used)FrameTimecode, the s suffix is now optional, and whitespace is ignored (note that values without decimal places are still interpreted as frame numbers)VideoCaptureAdapter in scenedetect.backends.opencv now attempts to report duration if knownIncludes new `load-scenes` command, ability to specify a default detector, PyAV 10 support, and several bugfixes. Minimum supported Python version is
Includes new load-scenes command, ability to specify a default detector, PyAV 10 support, and several bugfixes. Minimum supported Python version is now Python 3.7.
Command-Line Changes:
load-scenes command to load cuts from list-scenes CSV output #235detect-adaptive by default if a detector is not specified #329
default-detector option under [global]-d/--duration and -e/--end options of time command consuming one extra frame #307$VIDEO_NAME before creating output directory for -f/--filename option of split-video, now allows absolute pathsThresholdDetector (detect-threshold) metric delta_rgb metric to average_rgb-l/--logfile always produces debug logs now-a/--all flag from scenedetect version command, now prints all information by default (can still call scenedetect for version number alone)-h/--help options globally and for each commandall option from scenedetect help command (can now call scenedetect help for full reference)General:
ThresholdDetector, allows fade to white detection #143end_time always consuming one extra frame #307start_in_scene is True or the final scene contains a single frame #307_):
get_aspect_ratio function in scenedetect.backends.opencvmean_pixel_distance and estimated_kernel_size functions in scenedetect.detectors.content_detectorcompute_frame_average function in scenedetect.detectors.threshold_detectorscenedetect.cli and scenedetect.thirdparty modulescompute_downscale_factor in scenedetect.video_stream (use scenedetect.scene_manager.compute_downscale_factor instead)[other] Add -c/--min-content-val argument to detect-adaptive, deprecate -d/--min-delta-hsv
Adds edge detection capability for fast cuts, addresses outstanding bugs, and includes various enhancements.
Command-Line Changes:
moviepy backend wrapping the MoviePy package, uses ffmpeg binary on the system for video decodingdetect-content and detect-adaptive to improve accuracy in some cases, especially under lighting changes, see new -w/--weights option for more information
detect-adaptive -w 1.0 0.5 1.0 0.25-t/--threshold higher when increasing the edge weight (the last component) with detect-content, for example:
detect-content -w 1.0 0.5 1.0 0.25 -t 32detect-content are being investigated as well (e.g. motion compensation, flash suppression)detect-content option --frame-window has been changed from -w to -f to accomodate this change-map 0 has been added to the default arguments so other audio tracks are also included when present (#271)-a flag to version command to print more information about versions of dependencies/tools being used[global] option downscale-method and [save-images] option scale-method-c/--min-content-val argument to detect-adaptive, deprecate -d/--min-delta-hsvGeneral:
detect-adaptive over detect-contentVideoStreamMoviePy using the MoviePy packageContentDetector and AdaptiveDetector (#35)
1.0, 1.0, 1.0, 0.0 so there is no change in behaviorAdaptiveDetector no longer requires a StatsManager and can now be used with frame_skip (#283)scenedetect.detect() throwing TypeError when specifying stats_file_pathend_time was set (reported end time was always one extra frame)start_time, end_time, and start_in_scene arguments to scenedetect.detect() (#282)-map 0 option to default arguments of split_video_ffmpeg to include all audio tracks by default (#271)VideoCaptureAdapter to make existing cv2.VideoCapture objects compatible with a SceneManager (#276)
VideoStreamCv2SceneManager methods get_cut_list() and get_event_list() are deprecated, along with the base_timecode argumentbase_timecode argument of get_scenes_from_cuts() in scenedetect.stats_manager is deprecated (the signature of this function has been changed accordingly)AdaptiveDetector constructor parameter min_delta_hsv to `min_content_valcrf for split_video_ffmpeg has been changed from 21 to 22 to match command line defaultinterpolation property to SceneManager to allow setting method of frame downscaling, use linear interpolation by default (previously nearest neighbor)interpolation argument to save_images to allow setting image resize method (default remains bicubic)Nothing published for this version
Nothing published for this version
Nothing published for this version
PySceneDetect v0.6 is a major breaking change including better performance, configuration file support, and a more ergonomic API. The new minimum Pyth…
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.
Both the Windows installer and portable distributions now include signed executables. Many thanks to SignPath, AppVeyor, and AdvancedInstaller for their support.
Overview:
VideoManager (replaced with VideoStream), StatsManager, and save_images()
Command-Line Changes:
-c/--config, or create a scenedetect.cfg file in your user config folderffmpeg) and video editors (#265)--merge-last-scene option to merge last scene if shorter than --min-scene-len-b/--backend option to use a specific video decoding backend
opencv and pyavscenedetect help to see a list of backends available on the current systemsplit-video command:
detect-adaptive command:
--drop-short-scenes now works properly with detect-adaptivedetect-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 options-m/--min-scene-len optionsave-images command now works when -i/--input is an image sequences-i/--input may no longer be specified multiple times, if required use an external tool (e.g. ffmpeg, mkvmerge) to perform concatenation before processing-s/--stats no longer loads existing statistics and will overwrite any existing files-l/--logfile now respects -o/--output-v/--verbosity now takes precedence over -q/--quietAPI Changes:
detect() function performs scene detection on a video path, see example hereopen_video() function to handle video input, see example heresplit_video_ffmpeg() and split_video_mkvmerge() now take a single path as inputsave_images() no longer accepts downscale_factor
scale or height/width arguments to resize imagesVideoStream replaces VideoManager (#213)
VideoStreamCv2) and PyAV (VideoStreamAv)frame_number is 1-based whereas position is 0-based to align with PTS)test_time_invariants in tests/test_video_stream.py as a reference of specific behavioursSceneManager:
detect_scenes() now performs video decoding in a background thread, improving performance on most systemsSceneManager is now responsible for frame downscaling via the downscale/auto_downscale propertiesdetect_scenes() no longer shows a progress bar by default, set show_progress=True to restore the previous behaviourclear() now clears detectors, as they may be statefulget_scene_list() now returns an empty list if there are no detected cuts, specify start_in_scene=True for previous behavior (one scene spanning the entire input)StatsManager:
save_to_csv() now accepts a path or an open file handlebase_timecode argument has been removed from save_to_csv()load_from_csv() is now deprecated and will be removed in v1.0FrameTimecode:
previous_frame() generating negative frame numbers in some casesFrameTimecode objects can now perform arithmetic with formatted strings, e.g. 'HH:MM:SS.nnn'MAX_FPS_DELTA and MINIMUM_FRAMES_PER_SECOND_DELTA_FLOAT in scenedetect.frame_timecode into new MAX_FPS_DELTA constantvideo_manager parameter has been removed from the AdaptiveDetector constructorsplit_video_ffmpeg and split_video_mkvmerge function arguments have been renamed and defaults updated:
suppress_output is now show_output, default is Falsehide_progress is now show_progress, default is Falseblock_size argument has been removed from the ThresholdDetector constructorcalculate_frame_score method of ContentDetector has been renamed to _calculate_frame_score, use new module-level function of the same name insteadget_aspect_ratio has been removed from scenedetect.platform (use the aspect_ratio property of a VideoStream instead)av to run the scenedetect commandsave-images or split-video commandsdetect-threshold option -l/--add-last-scene cannot be disabledClick here to see CHANGELOG.md for v0.6-rc0.
This is a pre-release of the upcoming PySceneDetect v0.6.
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.
Overview:
VideoManager (replaced with VideoStream), StatsManager, and save_images()
Command-Line Changes:
v0.6-rc0:
--backend pyav no longer causes the application to occasionally hang once processing is completesave-images now supports image sequences-s/--stats is now only used to write stats files, previously would load existing contents if any
--backend opencv is now more robust to frame decode failures--merge-last-scene to merge final scene if it is shorter than --min-scene-len-s/--stats) and those provided by list-scenesffmpeg in all casesopencv
pyav backend, either specify -b pyav via the command line, or set backend = pyav under [global] in your config filev0.6-dev3:
pyav backend (the av package) will be used by defaultpyav backend now uses faster multithreaded decodingpyav backendv0.6-dev2:
-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 like ffmpeg to perform concatenation first)-l/--logfile now respects -o/--output-b/--backend option can be set to use a specific video backend
opencv (default) and pyav if the av package is installedscenedetect help to see a list of backends available on the current system-v/--verbosity now takes precedence over -q/--quietdetect-adaptive command:
--drop-short-scenes global option now works correctly with detect-adaptivedetect-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:
API Changes:
v0.6-rc0:
StatsManager:
load_from_csv method is now deprecated and will be removed in v1.0VideoStreamAv: Many fixes around threading_mode and documentation regarding application lockupsopen_video function from scenedetect.backends to scenedetect moduleFrameTimecode:
v0.6-dev3:
VideoStreamAv:
threading_mode, default is now to use multithreaded decodingframerateFrameTimecode:
FrameTimecode objects can now perform arithmetic with formatted strings, e.g. 'HH:MM:SS.nnn'StatsManager:
base_timecode argument has been removed from save_to_csv (it is no longer required)scenedetect.open_video, VideoStreamAv will now be used as the preferred backend instead of VideoStreamCv2v0.6-dev2:
detect function in scenedetect module that only has two required arguments: the path to a video (path) and a detector (detector), see example hereVideoStream replaces VideoManager and supports both OpenCV (VideoStreamCv2) and PyAV (VideoStreamAv) backends (#213)
frame_number is 1-based whereas position is 0-based to align with PTS)test_time_invariants in tests/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 the downscale and auto_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 (set show_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=TrueStatsManager:
load_from_csv/save_to_csv methods now accept a path or an open file handleFrameTimecode:
previous_frame method of FrameTimecode allowing a negative frame numbersave_images() no longer accepts downscale_factor, since there is already the ability to resize images via the scale or height/width argumentsscenedetect.video_splitter)MAX_FPS_DELTA and MINIMUM_FRAMES_PER_SECOND_DELTA_FLOAT in scenedetect.frame_timecode into new MAX_FPS_DELTA constantvideo_manager parameter has been removed from the AdaptiveDetector constructorsplit_video_ffmpeg and split_video_mkvmerge functions in scenedetect.video_splitter arguments have been renamed and defaults updated:
suppress_output is now show_output, default is Falsehide_progress is now show_progress, default is Falseblock_size argument has been removed from the ThresholdDetector constructorcalculate_frame_score method of ContentDetector has been renamed to _calculate_frame_score, use new module-level function of the same name insteadsave-images or split-video commands-l/--add-last-scene option in detect-threshold cannot be disabledClick here to see CHANGELOG.md for v0.6-dev3.
Click here to see CHANGELOG.md for v0.6-dev2.
Fixes crash when using detect-content or detect-adaptive with latest version of OpenCV (thanks @bilde2910). Does not affect the Windows distributions,
Fixes crash when using detect-content or detect-adaptive with latest version of OpenCV (thanks @bilde2910). Does not affect the Windows distributions, for the installer/portable version continue to download v0.5.6.
New detection algorithm: detect-adaptive which works similar to detect-content, but with reduced false negatives during fast camera movement (thanks @
detect-adaptive which works similar to detect-content, but with reduced false negatives during fast camera movement (thanks @scarwire and @wjs018)save-images can now be resized via the command linedetect-threshold-p/--min-percent option from detect-threshold-l/--luma-only to detect-content/detect-adaptive to only consider brightness channel (useful for greyscale videos)detect-adaptive (#153, thanks @scarwire and @wjs018)save-images command (scene_manager.save_images() function in the Python API) can now be scaled or resized (#160 and PR #203, thanks @wjs018)
-s/--scale (e.g. --scale 0.5 shrinks the height/width by half)-h/--height) and/or width (-w/--width), in pixels; if only one is specified, the aspect ratio of the original video is keptseek() on a VideoManager will now respect the end time if setsplit_video_ functions now return the exit code of invoking ffmpeg or mkvmerge (#209, thanks @AdrienLF)min_percent argument from ThresholdDetector as was not providing any performance benefit for the majority of use cases (#178)detect-threshold command now works properly with a statsfile (#211, thanks @jeremymeyers)TypeError exception when using non-PyPI OpenCV packages from certain Linux distributions (#220)-l/--add-last-scene option in detect-threshold cannot be disabledsave-images or split-video commands (in v0.6 save-images works with image sequences)One of the last major updates before transitioning to the new v1.0.x API
--min-scene-len/-m option is now global rather than per-detector--drop-short-scenes to go along with -msave-images command are now resized to match the display aspect ratio-s/--skip-cuts has been added to the list-scenes command to allow standardized processingsave-images is now accessible via the Python API through the save_images() function in scenedetect.scene_managersave-images command, renamed --image-frame-margin to --frame-margin, added short option -m, and increased the default value from 0 to 1 due to instances of the last frame of a video being occasionally missed (set -m 0 to restore original behaviour)Full changelog can be found here on Github.
save-images or split-video commands--min-scene-len/-m option is now global rather than per-detector--drop-short-scenes to go along with -msave-images command are now resized to match the display aspect ratio-s/--skip-cuts has been added to the list-scenes command to allow standardized processingsave-images is now accessible via the Python API through the save_images() function in scenedetect.scene_managersave-images command, renamed --image-frame-margin to --frame-margin, added short option -m, and increased the default value from 0 to 1 due to instances of the last frame of a video being occasionally missed (set -m 0 to restore original behaviour)save-images (#195)--image-frame-margin to --frame-margin in save-images command, added short option -m as aliassave-images command not saving the last frame by modifying seeking, as well as increasing default of --frame-margin from 0 to 1--min-scene-len a global option rather than per-detector (#131, thanks @tonycpsu)--drop-short-scenes option to remove all scenes smaller than --min-scene-len, instead of merging them-s/--skip-cuts option to list-scenes command to allow outputting a scene list CSV file as compliant with RFC 4180 (#136)include_cut_list to write_scene_list method in SceneManager to support #136StatsManager.load_from_csv() methodbase_timecode argument optional on the SceneManager methods get_scene_list(), get_cut_list(), and get_event_list() (#173)callback argument to the detect_scenes() method of SceneManager (#5, thanks @mhashim6)save_images() function to scenedetect.scene_manager module which exposes the same functionality as the CLI save-images command (#88)close_captures() and release_captures() functions from scenedetect.video_manager moduleTypeError: isinstance() arg 2 must be a type or tuple of types - as a workaround, install the Python OpenCV package by running pip install scenedetect[opencv] (#220)save-images or split-video commandsNothing published for this version
Support for Python 3.3 and 3.4 has been deprecated (see below)
time and save-images commandsdetect-threshold when using a small minimum percentdetect-threshold with a statsfilesave-images command under Python 2.7Full changelog can be found here on Github.
time and save-images commandsdetect-threshold when using a small minimum percentdetect-threshold with a statsfilesave-images command under Python 2.7detect-threshold crash when using statsfile (#122)save-images command under Python 2.7 (#174, thanks @santiagodemierre)time and save-images commands (#98 and PR #163 - thanks @obroomhall)detect-threshold performance when min-percent is less than 50%tqdm a regular requirement and not an extra (#180)Resolved long-standing bug where split-video command would duplicate certain frames at the beginning/end of the output
split-video command would duplicate certain frames at the beginning/end of the output (#93)aac codec when using split-video (it can be overriden in both the command line and Python interface)split-video command to further reduce instances of duplicated or off-by-one frame issues-l/--logfile argumentFull changelog can be found here on Github.
time and save-images command to take a long time to run. This will be resolved in the next release (see #98)save-images command causes PySceneDetect to crash under Python 2.7 (see #174)detect-threshold with a statsfile causes PySceneDetect to crash (see #122)ffmpeg or mkvmergesplit-video command would duplicate certain frames at the beginning/end of the output (#93)aac codec when using split-video (it can be overriden in both the command line and Python interface)split-video command to further reduce instances of duplicated or off-by-one frame issues-l/--logfile argumentffmpeg to reduce frequency of frames from next scene showing up at the end of the current one when split using ffmpeg (see #93, #159, and PR #166 - thank you everyone for your assistance, especially joshcoales, amvscenes, jelias, and typoman). If this still occurs, please provide any information you can by filing a new issue on Github.video_splitter module now has completed documentationsplit-video command due to timecode formatting-l/--logfile argument (see #169, thanks @typoman)time and save-images command to take a long time to run. This will be resolved in the next release (see #98)save-images command causes PySceneDetect to crash under Python 2.7 (see #174)detect-threshold with a statsfile causes PySceneDetect to crash (see #122)ffmpeg or mkvmergeMinor release including only additions and bugfixes (thanks to everyone who contributed to this release!). Changelog:
Minor release including only additions and bugfixes (thanks to everyone who contributed to this release!). Changelog:
--min-duration now accepts a timecode in addition to frame number (#128, thanks @tonycpsu)--image-frame-margin option to save-images command to ignore a number of frames at the start/end of a scene (#129, thanks @tonycpsu)--min-scene-len option was not respected by first scene (#105, thanks @charlesvestal)split-video command when using ffmpeg (#93, thanks @typoman)detect_scenes when frame_skip is larger than 0 (#126, thanks @twostarxx)minor re-release of v0.5.1, includes updated setup.py which returns OpenCV to an optional dependency
minor re-release of v0.5.1, includes updated setup.py which returns OpenCV to an optional dependency
to install from pip now with all dependencies:
pip install scenedetect[opencv,progress_bar]
to install only PySceneDetect: (separate OpenCV installation required)
pip install scenedetect
the release notes of v0.5.1 have been modified to include the prior command
no change to PySceneDetect program version
[feature] add get_duration method to VideoManager (#109, thanks @arianaa30)
This change was made to support platforms where the opencv-python package is unavailable, and to allow using a non-pip version of OpenCV (e.g. a binary install or building from source). See #73 for why the original fix was implemented, and #111 for details on what prompted this re-release.
pip install scenedetect[opencv,progress_bar]pip install scenedetect (separate OpenCV installation required)get_duration method to VideoManager (#109, thanks @arianaa30)[feature] Add new export-html command to the CLI (thanks @wjs018)
export-html command to the CLI (thanks @wjs018)pip install scenedetect[opencv,progress_bar], all dependencies will be installed.There is now a manual published at manual.scenedetect.com. See the main project page for details on installing dependencies.
You can install via pip:
pip install scenedetect
There is now a manual published at manual.scenedetect.com. See the main project page for details on installing dependencies.
The Windows build should be released within a week or so.
Your coding agent can read these notes before it upgrades. Set up the MCP server →