Repository navigation
Releases
PySceneDetect v0.7.3
PySceneDetect 0.7.3 adds scene-length based image export to save-images, a close() method and context manager support for VideoStream, and fixes several timing bugs: PyAV frame timing for videos without presentation timestamps, save-edl timecode drift at NTSC frame rates, OTIO source durations, and the last scene of variable framerate videos. Windows distributions ship updated dependencies.
CLI Changes
- [feature] Add
-i/--intervaltosave-imagesto save images based on the length of each scene: one image perDURATION, with--min-images/--max-imagesto limit the number of images per scene, e.g.save-images -i 2s --max-images 10(interval/min-images/max-imagesin the config file, andinterval/min_images/max_imagesinsave_images()) #280 - [cli]
--helpnow prints[default: ...]and[setting: ...]values as they are written in a config file (merge,fcpx,yes/noinstead ofMode.MERGE,FcpFormat.FCPX,True/on), the[backend-pyav]threading-modeconfig value is now validated, and thescenedetect.cfgtemplate matches the real config keys and defaults (verbosity,downscale,default-detector,fade-bias,start-timecode, OTIOname, and removed stalefilter-mode/luma-onlyentries) #589 - [bugfix]
$VIDEO_NAMEis now derived from the path component of URL inputs, ignoring the query string and fragment (e.g.https://host/clip.mp4?token=1.2->clip). URLs with no path use the host. Previously the query string leaked into output filenames, which fails on Windows. #197 - [bugfix] OTIO exports use the full source duration when provided, including from the CLI, instead of declaring a fixed 1,980-frame duration. The available range remains unspecified when the duration is unknown. Scene source ranges are unchanged. #580
- [bugfix] The OpenCV backend keeps
positionon the last frame after reaching the end of a VFR video, so the last scene no longer ends early (or before it starts) #561 - [bugfix]
save-html --no-imagesnow writes to the global-o/--outputdirectory instead of the working directory #583 - [bugfix]
split-videowith-onow logs the output folder instead of repeating the filename template #595 - [bugfix] Allow
-d/--downscaleon the CLI anddownscalein the config file to be set to0for automatic downscaling - [bugfix]
save-edltimecodes now count frames at the nominal rate (24, 30, or 60 per timecode second for 23.976, 29.97, or 59.94 fps) as required for non-drop-frame timecode, instead of being derived from wall-clock seconds. Previously the EDL drifted by roughly 3.6 seconds per hour at these rates.--start-timecodeis parsed the same way, so-s 01:00:00:00now starts the first event at01:00:00:00. Non-standard rates (e.g. the average rate of a VFR video) are unchanged. Thanks to @Cassian433 for the detailed report #593
API Changes
- [feature]
VideoStreamhas a newclose()method to release the file handles and decoders a video holds, and can be used as a context manager (with open_video(path) as video:) to close it automatically. Callingclose()more than once has no effect. Once an OpenCV, PyAV, MoviePy or concatenated stream is closed,read(),seek()andreset()raiseValueError, while properties describing the video (path,name,frame_rate,duration,frame_size,aspect_ratio) remain available. The default implementation does nothing, so existingVideoStreamsubclasses are unaffected, andVideoCaptureAdapterleaves the caller'sVideoCaptureopen #568 - [api]
VideoStream.seek()now documents that the stream position is undefined after aSeekErroris raised, andreset()must be called before reading further - [bugfix]
VideoStreamConcatno longer keeps its input videos open when they can't be concatenated (e.g. mismatched resolutions), and now closes each input explicitly once it is no longer needed instead of relying on garbage collection #568 - [bugfix]
write_scene_list()now starts the cut list row withTimecode List:when nocut_listis passed, as it does when one is passed and aswrite_scene_list_html()does - [bugfix] Fix
pyavbackend timing for videos that lack presentation timestamps (e.g. AVI files, elementary H.264 streams), which could lead to frame positions being out of order or stuck at zero and shifting cuts by one or more frames (#590, PyAV#933, PyAV#2478)- Videos are now opened with FFmpeg's
genptsflag disabled. - Each frame will use the exact presentation timestamp, but if it is unavailable we now fall back to the decode timestamp to be consistent with the
opencvbackend. - A frame with neither timestamp is placed one frame period after the previous frame (as the
moviepybackend does for every frame). - A one-time warning is emitted if timestamps are still detected going backwards.
VideoStreamAv.seek()now raisesSeekErroron streams that cannot be seeked (e.g. elementary streams without timestamps) instead of a backend-specific exception.VideoStreamAv.seek()now falls back to reading from the start when the demuxer lands on a frame without a timestamp past the target, andseek(0)always re-opens the video, fixing wrong positions after seeking in some MPEG-TS files.
- Videos are now opened with FFmpeg's
Packaging
- [general] Updates to Windows distributions:
- av 19.0.1 -> 19.0.2
- click 8.5.0 -> 8.5.1
- imageio-ffmpeg 0.6.0 -> 0.8.1
- pillow 12.3.0 -> 13.0.0
- platformdirs 4.13.0 -> 4.14.5
Downloads
- Windows:
PySceneDetect-0.7.3-win64.msi(installer) orPySceneDetect-0.7.3-win64.zip(portable); both signed, checksums inSHA256SUMSandPySceneDetect-0.7.3-win64.manifest.json - Python:
pip install scenedetect==0.7.3(orscenedetect-headless); wheels and sdists attached - Full changelog: https://www.scenedetect.com/changelog/
Thanks to @nikhiljangid120, @sungbin1015, @qwist1233-cpu, @vishal-tambi, @Rober1208, @ChandraChaan and @MuhammadBilalKhan267 for their contributions to this release.
PySceneDetect v0.7.2
Release Notes
PySceneDetect 0.7.2 ships improved defaults for the histogram and perceptual hash detectors, adds PyAV 19 support, and fixes several timing and output bugs. Default output of detect-hist and detect-hash will change in this release due to improved default values.
CLI Changes
- [improvement]
HistogramDetector(detect-hist) defaultthresholdchanged from 0.05 to 0.20 and defaultbinsfrom 256 to 128, calibrated from the benchmarks. Output for this detector will change if you are not setting both parameters explicitly. #559- Use
detect-hist -t 0.05 -b 256orHistogramDetector(threshold=0.05, bins=256)to restore the previous behavior.
- Use
- [improvement]
HashDetector(detect-hash) defaultthresholdchanged from 0.395 to 0.35 and defaultsizefrom 16 to 8, calibrated from the benchmarks. Output for this detector will change if you are not setting both parameters explicitly. #559- Use
detect-hash -t 0.395 -s 16orHashDetector(threshold=0.395, size=16)to restore the previous behavior.
- Use
- [improvement]
detect-thresholdnow ignores fade-outs shorter than0.1sby default. Use--min-out-length 0to restore the previous behavior. The API default remains0#278 - [feature] Added
save-keyframescommand to export detected cuts using# keyframe format v1for Aegisub-compatible tools #534. Frame numbers are currently approximate for VFR input #569 - [feature] Add
--min-out-length/min_out_lengthtodetect-threshold/ThresholdDetector, which requires that fades stay below the threshold for the given duration #278 - [general]
-f,--frame-rate, and--framerateare now aliases of the same CLI option, and all forms appear in help and documentation. If multiple forms are given, the last value is used #548 - [bugfix] Progress bar now reaches 100% when processing variable framerate (VFR) videos, with both the OpenCV and PyAV backends #561
- [bugfix] Fix
AdaptiveDetector/detect-adaptiveemitting scenes shorter thanmin_scene_lenwhenwindow_widthis large, by applying the minimum-length check to the emitted (target) frame instead of the current frame #408
API Changes
- [api] Legacy
framerateargument aliases inFrameTimecode,open_video(), and the video backends now emit aDeprecationWarning; useframe_rateinstead. When both forms are provided,frame_ratetakes precedence #548 - [api]
write_scene_list()now also accepts a path (strorpathlib.Path) as the first argument in addition to an open file handle; paths are opened and closed automatically #523 - [api] Scene-list output functions for EDL, FCPXML, FCP7 XML, and OTIO now accept an open text file handle, a string path, or a
pathlib.Path; paths are opened and closed automatically #567 - [bugfix]
ThresholdDetector/detect-thresholdwith methodCEILINGnow classifies the first frame with theCEILINGrule instead of theFLOORrule, which anchored a leading fade one frame late and could emit a spurious cut at the first frame (thanks @MuhammadBilalKhan267) - [bugfix] Fix
min_scene_lengiven in frames dropping cuts that are exactlymin_scene_lenframes apart at NTSC framerates (e.g. 29.97 fps), by comparing frame counts instead of converting to seconds #577 - [bugfix] Fix
TypeErrorwhen opening videos with thepyavbackend on PyAV 19.0 or newer (PyAV 19 is now supported) - [bugfix] Fix
pyavbackend duration calculation fallback - [bugfix] Fix
pyavbackend not releasing the file handle it opened when the stream is garbage collected, which emitted aResourceWarningunderpython -X dev#568 - [bugfix] Work around an intermittent segfault on exit with the OpenCV backend on Windows when opening PNG image sequences with
opencv-python4.14 or 5.0 (upstream: opencv/opencv#30017) #575
Packaging
- [general] The Windows distribution now bundles PyAV 19 and FFmpeg 9.0
- [general] The
scenedetect-corepackage introduced in 0.7.1 has been discontinued, and its only release (0.7.1) yanked from PyPI. Existingscenedetect-coreinstalls keep working but will not receive updates. Install eitherscenedetectorscenedetect-headless. #558
PySceneDetect v0.7.1
Release Notes
PySceneDetect 0.7.1 adds support for concatenating multiple videos, along with several stability and robustness fixes for the PyAV and OpenCV backends.
CLI Changes
- [feature]
split-videohas a new--expandflag: 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 #115
API Changes
- [feature]
scenedetect.detect()now accepts abackendkeyword argument ("opencv","pyav", or"moviepy") similar toopen_video. Defaults to"opencv", matching prior behavior. - [feature] Add
expand_scenes_to_bounds()helper inscenedetect.scene_managerto extend a scene list so the first scene starts at a given lower bound and the last scene ends at a given upper bound - [feature]
VideoStreamnow provides a public read-onlydecode_failuresproperty reporting the number of frames that failed to decode and were skipped (defaults to 0; populated by the OpenCV and PyAV backends) - [feature] Add
VideoStreamConcat(scenedetect.backends.concat) which concatenates multiple videos into a single continuous stream with a monotonic PTS timeline;open_video()anddetect()now accept a list of paths.VideoStreamConcat.map_span()maps spans of the global timeline back to per-source local times - [bugfix] The PyAV backend (
VideoStreamAv) now skips corrupt frames duringread()and continues decoding instead of failing, giving up only after 8 consecutive decode failures (matching the OpenCV backend's tolerance behavior) - [bugfix] The PyAV backend now normalizes presentation times by the stream start time, so files with a delayed start (e.g. from edit lists) report the first frame at
position0, consistent with other backends and withseek() - [bugfix] Comparisons between two
FrameTimecodeobjects that both carry exact presentation times (e.g. positions from VFR videos) and share the same frame rate are now performed exactly usingptsandtime_baseinstead 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 unchanged - [bugfix] Fix image sequence inputs when using OpenCV 5.0
Packaging
- [general]
scenedetectandscenedetect-headlessare unchanged: they continue to ship the full program (library + CLI) withopencv-python/opencv-python-headlessrespectively. Both packages provide the samescenedetectmodule (install or depend only one) - [feature] Official Docker images are now published to the GitHub Container Registry with the full CLI, all backends, and external tools (ffmpeg, mkvmerge) included, thanks @FNGarvin #537
- Example usage (process a video in the current directory):
docker run --rm -v "$(pwd):/files" ghcr.io/breakthrough/pyscenedetect -i /files/video.mp4 detect-adaptive split-video -o /files- [general] The Windows distribution now bundles OpenCV 5.0, PyAV 18, and FFmpeg 8.1.2. The Windows and Docker builds also override Pillow to 12.3.0 for upstream security fixes (moviepy#2553)
General
- [general] Benchmark results are now published on the website (scenedetect.com/benchmarks), including accuracy at default settings and parameter sweep curves for each detector
PySceneDetect v0.7
Release Notes
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.
CLI Changes
- [feature] VFR videos are handled correctly by the OpenCV and PyAV backends, and should work correctly with default parameters
- [feature] All CLI options which used to accept frame numbers only now accept seconds (e.g.
0.6s) and timecodes (e.g.00:00:00.600) #531 - [feature] New
save-fcpcommand allows exporting in Final Cut Pro format (FCP7/FCPX) #156 - [feature] New
save-qpcommand writes a QP file with scene boundary frame numbers, suitable for forcing keyframes at scene cuts in x264/x265 #448 - [feature] New
save-htmlcommand replaces the deprecatedexport-html; the prior command remains as an alias and emits a deprecation warning #518 - [feature] Add
save-edloption--start-timecode/-sto providde a custom start timecode for generated EDLs, supports SMPTEHH:MM:SS:FFor 8-digitHHMMSSFFinput #515 - [bugfix] Fix floating-point precision error in
save-otiooutput where frame values near integer boundaries (e.g.90.00000000000001) were serialized with spurious precision - [bugfix] Add mitigation for transient
OSErrorin the MoviePy backend as it is susceptible to subprocess pipe races on slow or heavily loaded systems #496 - [feature] The MoviePy backend now supports overriding the source frame rate via
-f/--frame-rate(and theVideoStreamMoviePy(frame_rate=...)API), bringing it in line with the OpenCV and PyAV backends - [bugfix]
detect-thresholdcut 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.5rounding boundary (PyAV uses sub-microsecond PTS, OpenCV uses millisecond-truncatedCAP_PROP_POS_MSEC) - [breaking] Remove deprecated
-d/--min-delta-hsvoption fromdetect-adaptivecommand (use-c/--min-content-valinstead) - [breaking] Rename
-f/--framerateto-f/--frame-rateas part of VFR overhaul (legacy--framerateform is preserved as a hidden alias but will be removed in v0.8) - [general] Support
SCENEDETECT_DEBUGenvironment variable to control how exceptions and debugging are handled. Unhandled exceptions andCtrl+Cnow produce a logger-formatted error message and exit cleanly with code 1 instead of dumping a raw Python traceback. SetSCENEDETECT_DEBUG=1to ensure all exceptions are re-raised instead of being logged. In both cases, the program will exit with a non-zero exit code.
API Changes
VFR & Timestamp Overhaul:
- Add
write_scene_list_edl,write_scene_list_fcpx,write_scene_list_fcp7, andwrite_scene_list_otioto thescenedetect.outputmodule sosave-edl,save-fcp, andsave-otiocan be invoked directly from Python (previously CLI-only) write_scene_list_edlaccepts an optionalstart_timecodeparameter (SMPTEHH:MM:SS:FFor 8-digitHHMMSSFF) that is added to every event's source and record columns #515- Add new
Timecodetype to represent frame timings in terms of the video's source timebase - Add
time_baseandptsproperties toFrameTimecodefor more accurate timing information - All backends (PyAV, OpenCV, MoviePy) now return PTS-backed timestamps from
VideoStream.position VideoStream.frame_ratenow returnsFractioninstead offloat- Framerates are now stored as rational
Fractionvalues (e.g.Fraction(24000, 1001)instead of23.976) to avoid float precision loss - Common NTSC rates (23.976, 29.97, 59.94) are automatically detected from float values
FrameTimecode.frame_numis now approximate for VFR video (based on PTS-derived time)- Add
frame_rateproperty (returns exactFraction) as the canonical replacement forframerate(returnsfloat) inFrameTimecodeandVideoStream- For CFR sources, both properties represent the same rate, i.e.
time_baseequals1 / frame_ratefor CFR sources #548
- For CFR sources, both properties represent the same rate, i.e.
- Add
frame_ratekeyword argument toopen_video()and theVideoStreamCv2,VideoCaptureAdapter,VideoStreamAv, andVideoStreamMoviePyconstructors as the canonical replacement forframerate#548; acceptsfloat | Fraction | None. The legacyframeratekeyword is retained as a deprecated alias and is ignored whenframe_rateis provided - Add
equal_frame_rate(other)method as the canonical replacement forequal_framerate(fps)
General:
- Type hints: audit and overhaul: first-party code is now clean with Pyright basic mode, migrated deprecated type hints to comply with PEP 585
- Code quality: expand static analysis rules, audit and cleanup existing suppressions
- Packaging: modernized to comply with PEP 621, make
opencv-pythona requirement, add separatescenedetect-headlessvariant instead
Detector Interface:
- Replace
frame_numparameter (int) withtimecode(FrameTimecode) inSceneDetectorinterface #168:- The detector interface:
SceneDetector.process_frame()andSceneDetector.post_process()(thepost_processsignature on the abstract base is now consistently typed asFrameTimecodeto match its concrete-detector overrides; the priorintannotation did not reflect the actual runtime value) - Statistics:
StatsManager.get_metrics(),StatsManager.set_metrics(), andStatsManager.metrics_exist()formally accept eitherFrameTimecodeorint(theintform is retained for compatibility with the deprecatedload_from_csv()path, which keys metrics by integer frame number)
- The detector interface:
StatsManager.load_from_csv()andsave_images()output_dirnow acceptos.PathLike(e.g.pathlib.Path) in addition tostrSceneManager.detect_scenes()durationandend_timeformally acceptint(frames),float(seconds),str(timecode), orFrameTimecode- matching the documented and runtime-supported behaviorSceneDetectoris now a Python abstract classSceneDetectorinstances can now assume they always have frame data to process whenprocess_frameis called- Remove
SceneDetector.is_processing_required()method - Remove
SceneDetector.stats_manager_requiredproperty, no longer required - Remove deprecated
SparseSceneDetectorinterface - Detector
min_scene_lenandsave_images()frame_marginarguments 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 #531
Module Reorganization:
scenedetect.scene_detectormoved toscenedetect.detectorscenedetect.frame_timecodemoved toscenedetect.common- Image/HTML/CSV export in
scenedetect.scene_managermoved toscenedetect.output#463 scenedetect.video_splittermoved toscenedetect.output.video#463
FrameTimecode:
- Add properties to access
frame_num,frame_rate, andsecondsinstead of getter methods frame_numandframe_rateare now read-only properties (construct a newFrameTimecodeto change them)- Remove
FrameTimecode.previous_frame()method - Deprecated functionality preserved from v0.6 now uses the
warningsmodule to emit runtime deprecation warnings, these features will be removed in v0.8 - Soft-deprecate
framerateproperty andequal_framerate()method via docstring; the legacy forms will continue to work until v0.8 when they will be upgraded toDeprecationWarningbefore removal in v0.9
Removals:
- Remove deprecated module
scenedetect.video_manager, use thescenedetect.open_video()function instead - Remove deprecated parameters
base_timecodeandvideo_managerfrom various functions - Remove deprecated
SceneManager.get_event_list()method - Remove deprecated
AdaptiveDetector.get_content_val()method (useStatsManagerinstead) - Remove deprecated
AdaptiveDetectorconstructor argmin_delta_hsv(usemin_content_valinstead) - Remove
advanceparameter fromVideoStream.read() - Remove
SceneDetector.stats_manager_requiredproperty, no longer required SceneDetectoris now a Python abstract class
Windows Distribution
- [general] Updates to Windows distributions:
- av 14.2.0 -> 17.0.1
- click 8.1.8 -> 8.2.1
- imageio-ffmpeg 0.6.0
- moviepy 2.1.2 -> 2.2.1
- numpy 2.2.3 -> 2.4.4
- opencv-python-headless 4.11.0.86 -> 4.13.0.92
- platformdirs 4.3.6 -> 4.9.6
- tqdm...
PySceneDetect v0.6.7
Release Notes
Fixes issues with importing EDL files into DaVinci Resolve and other editors, update ffmpeg.
Changelog
- [bugfix] Fix
save-edlend timestamp being too short by 1 frame #516 - [general] Updates to Windows distributions:
- ffmpeg 7.1 -> 8.0
v0.6.7.1 (PyPI only, no code changes) - 2025-09-24
- [dist] Fix version pinning to prevent incompatibility with third-party dependencies #521
PySceneDetect v0.6.6
Release Notes
PySceneDetect v0.6.6 introduces new output formats, which improve compatibility with popular video editors (e.g. DaVinci Resolve).
Changelog
- [feature] New
save-otiocommand supports saving scenes in OTIO format #497 - [feature] New
save-edlcommand supports saving scenes in EDL format CMX 3600 #495 - [bugfix] Fix incorrect help entries for short-form arguments which suggested invalid syntax #493
- [bugfix] Fix crash when using
split-videowith-m/--mkvmergeoption #473 - [bugfix] Fix incorrect default filename template for
split-videocommand with-m/--mkvmergeoption - [bugfix] Fix inconsistent filenames when using
split_video_mkvmerge() - [bugfix] Ensure auto-rotation is always enabled for
VideoStreamCv2as workaround for opencv#26795 - [general] The
export-htmlcommand is now deprecated, usesave-htmlinstead - [general] Updates to Windows distributions:
- av 13.1.0 -> 14.2.0
- click 8.1.7 -> 8.1.8
- imageio-ffmpeg 0.5.1 -> 0.6.0
- moviepy 2.1.1 -> 2.1.2
- numpy 2.1.3 -> 2.2.3
- opencv-python 4.10.0.84 -> 4.11.0.86
New Contributors
PySceneDetect v0.6.5
Release Notes
This release brings crop support, performance improvements to save-images, lots of bugfixes, and improved compatibility with MoviePy 2.0+.
Changelog
- [feature] Add ability to crop input video before processing #302 #449
- [cli] Add
--cropoption toscenedetectcommand and config file to crop video frames before scene detection - [api] Add
cropproperty toSceneManagerto crop video frames before scene detection
- [cli] Add
- [feature] Add ability to configure CSV separators for rows/columns in config file #423
- [feature] Add new
--showflag toexport-htmlcommand to launch browser after processing #442 - [improvement] Add new
threadingoption tosave-images/save_images()#456- Enabled by default, offloads image encoding and disk IO to separate threads
- Improves performance by up to 50% in some cases
- [improvement] The
export-htmlcommand now implicitly invokessave-imageswith default parameters- The output of the
export-htmlcommand will always use the result of thesave-imagescommand that precedes it
- The output of the
- [improvement]
save_to_csvnow works with paths frompathlib - [api] The
save_to_csvfunction now works correctly with paths from thepathlibmodule - [api] Add
col_separatorandrow_separatorargs towrite_scene_listfunction inscenedetect.scene_manager - [api] The MoviePy backend now works with MoviePy 2.0+
- [bugfix] Fix
SyntaxWarningdue to incorrect escaping #400 - [bugfix] Fix
ContentDetectorcrash when using callbacks #416 #420 - [bugfix] Fix
save-images/save_images()not working correctly with UTF-8 paths #450 - [bugfix] Fix crash when using
save-images/save_images()with OpenCV backend #455 - [bugfix] Fix new detectors not working with
default-detectorconfig option - [general] Timecodes of the form
MM:SS[.nnn]are now processed correctly #443 - [general] Updates to Windows distributions:
- The MoviePy backend is now included with Windows distributions
- Bundled Python interpreter is now Python 3.13
- Updated PyAV 10 -> 13.1.0 and OpenCV 4.10.0.82 -> 4.10.0.84
Python Distribution Changes
- v0.6.5.1 - Fix compatibility issues with PyAV 14+ #466
- v0.6.5.2 - Fix for
AttributeError: module 'cv2' has no attribute 'Mat'#468
New Contributors
PySceneDetect v0.6.4
Release Notes
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:
Feedback on the new detection methods and their default values is most welcome. Thanks to everyone who contributed for their help and support!
Changelog
- [feature] New detectors:
- [feature] Add flash suppression filter for
detect-content/ContentDetector(enabled by default) #35 #53- Reduces number of cuts generated during strobing or flashing effects
- Can be configured using
--filter-modeoption --filter-mode = merge(new default) merges consecutive scenes shorter thanmin-scene-len--filter-mode = suppress(previous default) disables generating new scenes untilmin-scene-lenhas passed
- [feature] Add more templates for
save-imagesfilename customization:$TIMECODE,$FRAME_NUMBER,$TIMESTAMP_MS(thanks @Veldhoen0) #395 - [bugfix] Remove extraneous console output when using
--drop-short-scenes - [bugfix] Fix scene lengths being smaller than
min-scene-lenwhen usingdetect-adaptive/AdaptiveDetectorwith large values of--frame-window - [bugfix] Fix crash when decoded frames have incorrect resolution and log error instead #319
- [bugfix] Update default ffmpeg stream mapping from
-map 0to-map 0:v:0 -map 0:a? -map 0:s?#392
PySceneDetect v0.6.3
Release Notes
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:
- [bugfix] Fix crash for some WebM videos when using
save-imageswith--backend pyav#355 - [bugfix] Correct
--durationand--endfor presentation time when specified as frame numbers #341 - [bugfix] Progress bar now has correct frame accounting when
--durationor--endare set #341 - [bugfix] Only allow
load-scenesto be specified once, and disallow with otherdetect-*commands #347 - [bugfix] Disallow
-s/--startbeing larger than-e/--endfor thetimecommand - [bugfix] Fix
detect-adaptivenot respecting--min-scene-lenfor the first scene - [general] Comma-separated timecode list is now only printed when the
list-scenescommand is specified #356 - [general] Several changes to
[list-scenes]config file options:- Add
display-scenesanddisplay-cutsoptions to control output - Add
cut-formatto control formatting of cut points #349- Valid values:
frames,timecode,seconds
- Valid values:
- Add
- [general] Increase progress bar indent to improve visibility and visual alignment
- [improvement] The
ssuffix for setting timecode values in seconds is no longer required (values without decimal places are still interpreted as frame numbers) - [improvement]
load-scenesnow skips detection, generating output much faster #347 (thanks @wjs018 for the initial implementation)
API Changes:
- [bugfix] Fix
AttributeErrorthrown when accessingaspect_ratioon certain videos usingVideoStreamAv#355 - [bugfix] Fix circular imports due to partially initialized module for some development environments #350
- [bugfix] Fix
SceneManager.detect_sceneswarning whendurationorend_timeare specified as timecode strings #346 - [bugfix] Ensure correct string conversion behavior for
FrameTimecodewhen rounding is enabled #354 - [bugfix] Fix
AdaptiveDetectornot respectingmin_scene_lenfor the first scene - [feature] Add
output_dirargument tosplit_video_ffmpegandsplit_video_mkvmergefunctions to set output directory #298 - [feature] Add
formatterargument tosplit_video_ffmpegto allow formatting filenames via callback [#359](https://github.com/
/issues/359) - [general] The
frame_imgargument toSceneDetector.process_frame()is now required - [general] Remove
TimecodeValuefromscenedetect.frame_timecode(usetyping.Union[int, float, str]) - [general] Remove
MotionDetectorandscenedetect.detectors.motion_detectormodule (will be reintroduced afterSceneDetectorinterface is stable) - [improvement]
scenedetect.stats_managermodule improvements:- The
StatsManager.register_metrics()method no longer throws any exceptions - Add
StatsManager.metric_keysproperty to query registered metric keys - Deprecate
FrameMetricRegisteredandFrameMetricNotRegisteredexceptions (no longer used)
- The
- [improvement] When converting strings representing seconds to
FrameTimecode, thessuffix is now optional, and whitespace is ignored (note that values without decimal places are still interpreted as frame numbers) - [improvement] The
VideoCaptureAdapterinscenedetect.backends.opencvnow attempts to report duration if known
PySceneDetect v0.6.2
Release Notes
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:
- [feature] Add
load-scenescommand to load cuts fromlist-scenesCSV output #235 - [feature] Use
detect-adaptiveby default if a detector is not specified #329- Default detector can be set by config file with the
default-detectoroption under[global]
- Default detector can be set by config file with the
- [bugfix] Fix
-d/--durationand-e/--endoptions oftimecommand consuming one extra frame #307 - [bugfix] Fix incorrect end timecode for final scene when last frame of video is a new scene #307
- [bugfix] Expand
$VIDEO_NAMEbefore creating output directory for-f/--filenameoption ofsplit-video, now allows absolute paths - [general] Rename
ThresholdDetector(detect-threshold) metricdelta_rgbmetric toaverage_rgb - [general]
-l/--logfilealways produces debug logs now - [general] Remove
-a/--allflag fromscenedetect versioncommand, now prints all information by default (can still callscenedetectfor version number alone) - [general] Add
-h/--helpoptions globally and for each command - [general] Remove
alloption fromscenedetect helpcommand (can now callscenedetect helpfor full reference)
General:
- [feature] Add ability to specify method (floor/ceiling) when creating
ThresholdDetector, allows fade to white detection #143 - [general] Minimum supported Python version is now Python 3.7
- [general] Add support for PyAV 10.0 #292
- [general] Use platformdirs package instead of appdirs #309
- [bugfix] Fix
end_timealways consuming one extra frame #307 - [bugfix] Fix incorrect end timecode for last scene when
start_in_sceneisTrueor the final scene contains a single frame #307 - [bugfix] Fix MoviePy read next frame #320
- [bugfix] Template replacement when generating output now allows lower-case letters to be used as separators in addition to other characters
- [api] Make some public functions/methods private (prefixed with
_):get_aspect_ratiofunction inscenedetect.backends.opencvmean_pixel_distanceandestimated_kernel_sizefunctions inscenedetect.detectors.content_detectorcompute_frame_averagefunction inscenedetect.detectors.threshold_detectorscenedetect.cliandscenedetect.thirdpartymodules
- [api] Remove
compute_downscale_factorinscenedetect.video_stream(usescenedetect.scene_manager.compute_downscale_factorinstead) - [dist] Updated dependencies in Windows distributions: ffmpeg 6.0, PyAV 10, OpenCV 4.8, removed mkvmerge
Project Updates
- Website and documentation is now hosted on Github Pages, documentation can be found at scenedetect.com/docs
- Windows and Linux builds are now done on Github Actions, add OSX builds as well
- Build matrix has been updated to support Python 3.7 through 3.11 for all operating systems for Python distributions
- Windows portable builds have been moved to Github Actions, signed builds/installer is still done on Appveyor
- Windows distributions no longer include mkvmerge (can still download for Windows here)
