Recent Releases of scenedetect
scenedetect - 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
- Python
Published by Breakthrough 6 months ago
scenedetect - 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
- @awkrail made their first contribution in https://github.com/Breakthrough/PySceneDetect/pull/480 (and many more since!)
- Python
Published by Breakthrough 12 months ago
scenedetect - 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
New Contributors
- @Janscode made their first contribution in https://github.com/Breakthrough/PySceneDetect/pull/438
- Python
Published by Breakthrough about 1 year ago
scenedetect - 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
- Python
Published by Breakthrough over 1 year ago
scenedetect - 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 - [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)
- [general] Remove
- [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
- Python
Published by Breakthrough almost 2 years ago
scenedetect - 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)
- Python
Published by Breakthrough over 2 years ago
scenedetect - PySceneDetect v0.6.1
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 `mincontentval - [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)
- Python
Published by Breakthrough about 3 years ago
scenedetect - PySceneDetect v0.6
Release Notes
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.
Changelog
Overview:
- Major performance improvements on multicore systems
- Configuration file support via command line option or user settings folder
- Support for multiple video backends, PyAV is now supported in addition to OpenCV
- Breaking API changes to
VideoManager(replaced withVideoStream),StatsManager, andsave_images()- See the Migration Guide for details on how to update from v0.5.x
- A backwards compatibility layer has been added to prevent most applications from breaking, will be removed in a future release
- Support for Python 2.7 has been dropped, minimum supported Python version is 3.6
- Support for OpenCV 2.x has been dropped, minimum OpenCV version is 3.x
- Windows binaries are now signed, thanks SignPath.io (certificate by SignPath Foundation)
Command-Line Changes:
- Configuration files are now supported, see documentation for details
- Can specify config file path with
-c/--config, or create ascenedetect.cfgfile in your user config folder
- Can specify config file path with
- Frame numbers are now 1-based, aligning with most other tools (e.g.
ffmpeg) and video editors (#265) - Start/end frame numbers of adjacent scenes no longer overlap (#264)
- End/duration timecodes still include the frame's presentation time
- Add
--merge-last-sceneoption to merge last scene if shorter than--min-scene-len - Add
-b/--backendoption to use a specific video decoding backend- Supported backends are
opencvandpyav - Run
scenedetect helpto see a list of backends available on the current system - Both backends are included with Windows builds
- Supported backends are
split-videocommand:detect-adaptivecommand:--drop-short-scenesnow works properly withdetect-adaptive
detect-contentcommand:- Default threshold
-t/--thresholdlowered to 27 to be more sensitive to shot changes (#246) - Add override for global
-m/--min-scene-lenoption
- Default threshold
detect-thresholdcommand:- Remove
-p/--min-percentand-b/--block-sizeoptions - Add override for global
-m/--min-scene-lenoption
- Remove
save-imagescommand now works when-i/--inputis an image sequences- Default backend (OpenCV) is more robust to video decoder failures
-i/--inputmay no longer be specified multiple times, if required use an external tool (e.g.ffmpeg,mkvmerge) to perform concatenation before processing-s/--statsno longer loads existing statistics and will overwrite any existing files-l/--logfilenow respects-o/--output-v/--verbositynow takes precedence over-q/--quiet
API Changes:
- New
detect()function performs scene detection on a video path, see example here - New
open_video()function to handle video input, see example here split_video_ffmpeg()andsplit_video_mkvmerge()now take a single path as inputsave_images()no longer acceptsdownscale_factor- Use
scaleorheight/widtharguments to resize images
- Use
- New
VideoStreamreplacesVideoManager(#213)- Supports both OpenCV (
VideoStreamCv2) and PyAV (VideoStreamAv) - Improves video seeking invariants, especially around defining what frames 0 and 1 mean for different time properties (
frame_numberis 1-based whereaspositionis 0-based to align with PTS) - See
test_time_invariantsintests/test_video_stream.pyas a reference of specific behaviours
- Supports both OpenCV (
- Changes to
SceneManager:detect_scenes()now performs video decoding in a background thread, improving performance on most systemsSceneManageris now responsible for frame downscaling via thedownscale/auto_downscalepropertiesdetect_scenes()no longer shows a progress bar by default, setshow_progress=Trueto 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, specifystart_in_scene=Truefor previous behavior (one scene spanning the entire input)
- Changes to
StatsManager:save_to_csv()now accepts a path or an open file handlebase_timecodeargument has been removed fromsave_to_csv()load_from_csv()is now deprecated and will be removed in v1.0
- Changes to
FrameTimecode:- Use rounding instead of truncation when calculating frame numbers to fix incorrect round-trip conversions and improve accuracy (#268)
- Fix
previous_frame()generating negative frame numbers in some cases FrameTimecodeobjects can now perform arithmetic with formatted strings, e.g.'HH:MM:SS.nnn'
- Merged constants
MAX_FPS_DELTAandMINIMUM_FRAMES_PER_SECOND_DELTA_FLOATinscenedetect.frame_timecodeinto newMAX_FPS_DELTAconstant video_managerparameter has been removed from theAdaptiveDetectorconstructorsplit_video_ffmpegandsplit_video_mkvmergefunction arguments have been renamed and defaults updated:suppress_outputis nowshow_output, default isFalsehide_progressis nowshow_progress, default isFalse
block_sizeargument has been removed from theThresholdDetectorconstructorcalculate_frame_scoremethod ofContentDetectorhas been renamed to_calculate_frame_score, use new module-level function of the same name insteadget_aspect_ratiohas been removed fromscenedetect.platform(use theaspect_ratioproperty of aVideoStreaminstead)- Backwards compatibility with v0.5 to avoid breaking most applications on release while still allowing performance improvements
Python Distribution Changes
- v0.6.0.3 - Fix missing package description
- v0.6.0.2 - Improve error messaging when OpenCV is not installed
- v0.6.0.1 - Fix original v0.6 release requiring
avto run thescenedetectcommand
Known Issues
- URL inputs are not supported by the
save-imagesorsplit-videocommands - Variable framerate videos (VFR) are not fully supported, and will yield incorrect timestamps (#168)
- The
detect-thresholdoption-l/--add-last-scenecannot be disabled - Due to a switch from EXE to MSI for the Windows installer, you may have to uninstall older versions first before installing v0.6
- Python
Published by Breakthrough over 3 years ago
scenedetect - PySceneDetect v0.6-rc0
Click here to see CHANGELOG.md for v0.6-rc0.
- Python
Published by Breakthrough almost 4 years ago
scenedetect - PySceneDetect v0.6-dev3
Click here to see CHANGELOG.md for v0.6-dev3.
- Python
Published by Breakthrough almost 4 years ago
scenedetect - PySceneDetect v0.6-dev2
Click here to see CHANGELOG.md for v0.6-dev2.
- Python
Published by Breakthrough almost 4 years ago
scenedetect - PySceneDetect v0.5.6.1
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.
- Python
Published by Breakthrough over 4 years ago
scenedetect - PySceneDetect v0.5.6
Release Notes
- New detection algorithm:
detect-adaptivewhich works similar todetect-content, but with reduced false negatives during fast camera movement (thanks @scarwire and @wjs018) - Images generated by
save-imagescan now be resized via the command line - Statsfiles now work properly with
detect-threshold - Removed the
-p/--min-percentoption fromdetect-threshold - Add new option
-l/--luma-onlytodetect-content/detect-adaptiveto only consider brightness channel (useful for greyscale videos)
Changelog
- [feature] New adaptive content detector algorithm
detect-adaptive(#153, thanks @scarwire and @wjs018) - [feature] Images generated with the
save-imagescommand (scene_manager.save_images()function in the Python API) can now be scaled or resized (#160 and PR #203, thanks @wjs018)- Images can be resized by a constant scaling factory using
-s/--scale(e.g.--scale 0.5shrinks the height/width by half) - Images can be resized to a specified height (
-h/--height) and/or width (-w/--width), in pixels; if only one is specified, the aspect ratio of the original video is kept
- Images can be resized by a constant scaling factory using
- [api] Calling
seek()on aVideoManagerwill now respect the end time if set - [api] The
split_video_functions now return the exit code of invokingffmpegormkvmerge(#209, thanks @AdrienLF) - [api] Removed the
min_percentargument fromThresholdDetectoras was not providing any performance benefit for the majority of use cases (#178) - [bugfix] The
detect-thresholdcommand now works properly with a statsfile (#211, thanks @jeremymeyers) - [bugfix] Fixed crash due to unhandled
TypeErrorexception when using non-PyPI OpenCV packages from certain Linux distributions (#220) - [bugfix] A warning is now displayed for videos which may not be decoded correctly, esp. VP9 (#86, thanks @wjs018)
- [api] A named logger is now used for both API and CLI logging instead of the root logger (#205)
Known Issues
- Variable framerate videos (VFR) are not fully supported, and will yield incorrect timestamps (#168)
- The
-l/--add-last-sceneoption indetect-thresholdcannot be disabled - Image sequences or URL inputs are not supported by the
save-imagesorsplit-videocommands (in v0.6save-imagesworks with image sequences) - Due to the use of truncation for frame number calculation, FrameTimecode objects may be off-by-one when constructed using a float value (#268, fixed in v0.6)
- Python
Published by Breakthrough over 4 years ago
scenedetect - PySceneDetect v0.5.5
Release Notes
- One of the last major updates before transitioning to the new v1.0.x API
- The
--min-scene-len/-moption is now global rather than per-detector - There is a new global option
--drop-short-scenesto go along with-m - Removed first row from statsfiles so it is a valid CSV file
- The progress bar now correctly resizes when the terminal is resized
- Image sequences and URLs are now supported for input via the CLI/API
- Images exported using the
save-imagescommand are now resized to match the display aspect ratio - A new flag
-s/--skip-cutshas been added to thelist-scenescommand to allow standardized processing - The functionality of
save-imagesis now accessible via the Python API through thesave_images()function inscenedetect.scene_manager - Under the
save-imagescommand, renamed--image-frame-marginto--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 0to restore original behaviour)
Changelog
Full changelog can be found here on Github.
Known Issues
- Image sequences or URL inputs are not supported by the
save-imagesorsplit-videocommands - Variable framerate videos (VFR) are not fully supported, and will yield incorrect timestamps (#168)
- Python
Published by Breakthrough about 5 years ago
scenedetect - PySceneDetect v0.5.4
Release Notes
- Improved performance when using
timeandsave-imagescommands - Improved performance of
detect-thresholdwhen using a small minimum percent - Fix crash when using
detect-thresholdwith a statsfile - Fix crash when using
save-imagescommand under Python 2.7 - Support for Python 3.3 and 3.4 has been deprecated (see below)
- Version number on PyPI for this release is v0.5.4.1
Changelog
Full changelog can be found here on Github.
Known Issues
- Variable framerate videos are not supported properly currently (#168), a warning may be added in the next release to indicate when a VFR video is detected, until this can be properly resolved (#168)
- In certain cases, video files which will not load will fail silently, with PySceneDetect reporting that it processed 0 frames. Better error handling/messaging is planned for these cases as part of #179
- Python
Published by Breakthrough over 5 years ago
scenedetect - PySceneDetect v0.5.3
Release Notes
- Resolved long-standing bug where
split-videocommand would duplicate certain frames at the beginning/end of the output (#93) - This was determined to be caused by copying (instead of re-encoding) the audio track, causing extra frames to be brought in when the audio samples did not line up on a frame boundary (thank you @joshcoales for your assistance)
- Default behavior is to now re-encode audio tracks using the
aaccodec when usingsplit-video(it can be overriden in both the command line and Python interface) - Improved timestamp accuracy when using
split-videocommand to further reduce instances of duplicated or off-by-one frame issues - Fixed application crash when using the
-l/--logfileargument
Changelog
Full changelog can be found here on Github.
Known Issues
- Seeking through long videos is inefficient, causing the
timeandsave-imagescommand to take a long time to run. This will be resolved in the next release (see #98) - The
save-imagescommand causes PySceneDetect to crash under Python 2.7 (see #174) - Using
detect-thresholdwith a statsfile causes PySceneDetect to crash (see #122) - Variable framerate videos are not supported properly currently (#168), a warning may be added in the next release to indicate when a VFR video is detected, until this can be properly resolved (#168)
- Videos with multiple audio tracks may not work correctly, see this comment on #179 for a workaround using
ffmpegormkvmerge
- Python
Published by Breakthrough over 5 years ago
scenedetect - PySceneDetect v0.5.2
Minor release including only additions and bugfixes (thanks to everyone who contributed to this release!). Changelog:
- [enhancement]
--min-durationnow accepts a timecode in addition to frame number (#128, thanks @tonycpsu) - [feature] Add
--image-frame-marginoption tosave-imagescommand to ignore a number of frames at the start/end of a scene (#129, thanks @tonycpsu) - [bugfix]
--min-scene-lenoption was not respected by first scene (#105, thanks @charlesvestal) - [bugfix] Splitting videos with an analyzed duration only splits within analyzed area (#106, thanks @charlesvestal)
- [bugfix] Improper start timecode applied to the
split-videocommand when usingffmpeg(#93, thanks @typoman) - [bugfix] Added links and filename sanitation to html output (#139 and #140, thanks @wsj018)
- [bugfix] UnboundLocalError in
detect_sceneswhenframe_skipis larger than 0 (#126, thanks @twostarxx)
- Python
Published by Breakthrough almost 6 years ago
scenedetect - PySceneDetect v0.5.1.1
- 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 scenedetectthe release notes of v0.5.1 have been modified to include the prior command
no change to PySceneDetect program version
[feature] add
get_durationmethod 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.
- Python
Published by Breakthrough over 6 years ago
scenedetect - PySceneDetect v0.5.1
- [feature] Add new
export-htmlcommand to the CLI (thanks @wjs018) - [bugfix] VideoManager read function failed on multiple videos (thanks @ivan23kor)
- [bugfix] Fix crash when no scenes are detected (#79, thanks @raj6996)
- [bugfix] Fixed OpenCV not getting installed due to missing dependency (#73)
- [enhance] When no scenes are detected, the whole video is now returned instead of nothing (thanks @piercus)
- Removed Windows installer due to binary packages now being available, and to streamline the release process (see #102 for more information). When you type
pip install scenedetect[opencv,progress_bar], all dependencies will be installed.
- Python
Published by Breakthrough over 6 years ago
scenedetect - PySceneDetect v0.5
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.
Changelog
- major release, includes stable Python API with examples and updated documentation
- numerous changes to command-line interface with addition of sub-commands (see the new manual for updated usage information)
- [feature] videos are now split using ffmpeg by default, resulting in frame-perfect cuts (can still use mkvmerge by specifying the -c/--copy argument to the split-video command)
- [enhance] image filename numbers are now consistent with those of split video scenes (PR #39, thanks @e271828-)
- [enhance] 5-10% improvement in processing performance due to reduced memory copy operations (PR #40, thanks @elcombato)
- [enhance] updated exception handling to raise proper standard exceptions (PR #37, thanks @talkain)
- several fixes to the documentation, including improper dates and outdated CLI arguments (PR #26 and #, thanks @elcombato, and @colelawrence)
- numerous other PRs and issues/bug reports that have been fixed - there are too many to list individually here, so I want to extend a big thank you to everyone who contributed to making this release better
- [enhance] add Sphinx-generated API documentation (available at: http://manual.scenedetect.com)
- [project] move from BSD 2-clause to 3-clause license
- Python
Published by Breakthrough over 7 years ago
scenedetect - PySceneDetect v0.5-beta-1
Updated beta release, only bugfixes to API, several modifications/changes to CLI commands. Summary of major API changes:
- Modify definition of end timecode returned by
scenedetect.SceneManager.get_scene_list()method fromN, whereNis the last frame shown in the scene, toN+1. This now means that the end timecode/frame equals the start timecode/frame of the next adjacent scene. Also note that this is also the definition expected from the external tools used to export video when specifying thesplit-videocommand, improving compatibility with third-party tools. - If the
frame_skipoption is specified to be greater than 0 when using ascenedetect.SceneManager, it is now explicitly disallowed to use ascenedetect.StatsManagerwith theSceneManager. If quicker processing speed is required, users should set thedownscale_factorviaset_downscale_factor(downscale_factor=None). If nodownscale_factoris passed (i.e.downscale_factorisNone), the downscale factor will be computed automatically based on the resolution of the source material, which provides a balance of performance and accuracy for most videos. - Removed unnecessary
new_timeargument fromFrameTimecodeobject, and modify second argumentfpsso it can also be aFrameTimecodeobject from which the framerate is copied, allowing creation of new timecodes from existing ones to follow a much more intuitive syntax.
Summary of major CLI changes from v0.5-beta:
- Fix erroneous output given by default
split-videomode. The new default mode forsplit-videois what-p/--preciseused to be, but somewhat faster, with an additional-h/--high-qualityflag to increase output video quality at expense of time, thus the default mode forsplit-videois slower than it used to be, but significantly more accurate in terms of where output videos are split - The
split-videoflag-m/--mkvmergehas been changed to-c/--copyto better indicate what is happening, and requires mkvmerge, which produces output files significantly faster, but at the expense of frame-perfect accuracy when splitting. - Fix erroneous output given by
split-video -c/--copy. - Changed
split-videooption-f/--ffmpeg-argsto-a/--override-argsto prevent conflicts with new options - Add
split-videooption-o/--output DIRto specify output directory as well as-f/--filename NAMEto specify output filename, which allows the use of the macros$VIDEO_NAMEand$SCENE_NUMBERinNAME
Several updates to other commands as well; use the help command to list all available commands, and the help [command] command to view the options/flags for a particular command (or alternatively help all to show the entire PySceneDetect help/reference manual). Also fixed setup.py (thanks @ishandutta2007).
- Python
Published by Breakthrough over 7 years ago
scenedetect - PySceneDetect v0.5-beta
Beta release of PySceneDetect v0.5 with significantly refactored API and CLI. Users are encouraged to upgrade to the v0.5-beta as soon as possible. The release of v0.5 will break existing scripts/programs; both the command-line interface and Python API have changed significantly to support future development.
Try scenedetect help or scenedetect help all to get started. See the updated README.md for updated quickstart information.
When the final version of v0.5 is released, beta users can upgrade seamlessly. The final release distribution of PySceneDetect v0.5 will be made available some time this month, including source/binary distributions.
This is a source-only distribution, and can only be run locally via the scenedetect.py script. To install the beta, download v0.5-beta-1 or newer (via setup.py install - the version will show up as v0.5-dev). Requires ffmpeg or mkvmerge to enable support for the split-video command.
Includes unit tests using pytest (to run, type pytest -v).
- Python
Published by Breakthrough over 7 years ago
scenedetect - PySceneDetect v0.4
This latest release includes integrated video splitting via mkvmerge if installed on the system (included with Windows builds). Note, this update changes the behaviour of the -o / --output option. Overview of changes:
- specifying -o OUTPUT_FILE.mkv will now automatically split the input video, generating a new video clip for each detected scene in sequence, starting with OUTPUT_FILE-001.mkv
- CSV file output is now specified with the -co / --csv-output option (note, used to be -o in versions of PySceneDetect < 0.4)
The specific components distributed with the Windows binaries are Python 3.4.4, OpenCV 3.1.0, Numpy 1.11.2, and mkvmerge 9.7.1.
- Python
Published by Breakthrough about 9 years ago
scenedetect - PySceneDetect v0.3.6
This release includes some performance improvements, internal application structure changes, and a new lightweight installer for Windows that doesn't require an existing Python environment (a portable version is also available). The recommended installation method for Linux and Mac users is to download the source distribution and run sudo setup.py install in the location of the extracted files (once you have installed the prerequisite OpenCV and Numpy packages for Python).
- [enhance] speed improvement when using --frameskip option
- [internal] moved application state and shared objects to a consistent interface (the SceneManager object) to greatly reduce the number of required arguments for certain API functions
- [enhance] added installer for Windows builds (64-bit only currently)
The specific components distributed with the Windows binaries are Python 3.4.4, OpenCV 3.1.0, and Numpy 1.11.2.
- Python
Published by Breakthrough about 9 years ago
scenedetect - PySceneDetect v0.3.5
This release includes some minor bug-fixes, as well as includes a portable build for 64-bit Windows users that don't want to install a Python environment (download PySceneDetect-XYZ-win64.zip and run scenedetect.exe from a command prompt; note you may need to add the folder to your %PATH% variable manually.).
- [enhance] initial release of portable build for Windows (64-bit only), including all dependencies
- [bugfix] fix unrelated exception thrown when video could not be loaded
- [internal] fix variable name typo in API documentation
The specific components distributed with the Windows binaries are Python 3.4.4, OpenCV 3.1.0, and Numpy 1.11.2.
- Python
Published by Breakthrough over 9 years ago
scenedetect - PySceneDetect v0.3.4
This release improves the performance of content detection mode, adds a new command line option for selecting fade bias (threshold mode only), and includes various other improvements. List of changes included:
- [enhance] added scene length, in seconds, to output file (-o) for easier integration with ffmpeg/libav
- [enhance] improved performance of content detection mode by caching intermediate HSV frames in memory (approx. 2x faster)
- [enhance] show timecode values in terminal when using extended output (-l)
- [feature] add fade bias option (-fb / --fade-bias) to command line (threshold mode only)
- Python
Published by Breakthrough about 10 years ago
scenedetect - PySceneDetect v0.3.3
This release marks the first stable release, includes several bugfixes, and is now available on PyPI. Changes:
- [bugfix] scenes are now written correctly to specified output file when using -o flag (fixes #11)
- [bugfix] fix indexing exception when using multiple scene detectors and outputting statistics
- [internal] distribute package on PyPI, version move from beta to stable
- [internal] add function to convert frame number to formatted timecode
- [internal] move file and statistic output to Python csv module
- Python
Published by Breakthrough about 10 years ago
scenedetect - PySceneDetect v0.3.2 [beta]
This release adds image preview generation and duration (start/stop time) setting via four new command-line arguments (click here to view some examples):
- [feature] added -si / --save-images flag to enable saving the first and last frames of each detected scene as an image, saved in the current working directory with the original video filename as the output prefix
- [feature] added command line options for setting start and end times for processing (-st and -et)
- [feature] added command line option to specify maximum duration to process (-dt, overrides -et)
- Python
Published by Breakthrough about 10 years ago
scenedetect - PySceneDetect v0.3.1 [beta]
New release with two new command line options - down sampling and frame skipping - both focused on performance/efficiency.
- [feature] added downscaling/subsampling option (-df / --downscale_factor) to improve performance on higher resolution videos
- [feature] added frameskip option (-fs / --frame_skip) to improve performance on high framerate videos, at expense of frame accuracy and possible inaccurate scene cut prediction
- [enhance] added setup.py to allow for one-line installation (just run python setup.py install after downloading and extracting PySceneDetect)
- [internal] additional API functions to remove requirement on passing OpenCV video objects, and allow just a file path instead
- Python
Published by Breakthrough about 10 years ago
scenedetect - PySceneDetect v0.3 [beta]
The first major release of PySceneDetect, including all major features and functions. See the new USAGE.md file for helpful tips on how to use the new detection modes, and for optimal threshold values to try.
Changes from CHANGELOG.md include:
- major release, includes improved detection algorithms and complete internal code refactor
- [feature] content-aware scene detection using HSV-colourspace based algorithm (use -d content)
- [enhance] added CLI flags to allow user changes to more algorithm properties
- [internal] re-implemented threshold-based scene detection algorithm under new interface
- [internal] major code refactor including standard detection algorithm interface and API
- Python
Published by Breakthrough about 10 years ago
scenedetect - PySceneDetect v0.2.4 [alpha]
Bugfix with OpenCV version checking code - from the previous release, v0.2.3-alpha - for older versions of OpenCV (2.4 and older) on certain Linux distributions.
- Python
Published by Breakthrough about 10 years ago
scenedetect - PySceneDetect v0.2.3 [alpha]
Bugfix so PySceneDetect works with the latest version of the OpenCV (3.0.0+) Python module while retaining compatibility with older versions. Note that although OpenCV is now at version 3, the Python module is still referenced as cv2.
- Python
Published by Breakthrough over 10 years ago
scenedetect - PySceneDetect v0.2.2 [alpha]
Added statistics/analysis mode (-s) to generate a frame-by-frame analysis of a video (useful for finding appropriate values for scene detection parameters, and in preparation for content/adaptive detection methods), and bugfix for improper conversion of timecodes.
- Python
Published by Breakthrough over 11 years ago
scenedetect - PySceneDetect v0.2.1 [alpha]
Added proper timecode formatting (in form HH:MM:SS.nnnnn), as well as generating a single comma-separated list in the output for easier importing into external tools (like mkvmerge).
- Python
Published by Breakthrough over 11 years ago
scenedetect - PySceneDetect v0.2 [alpha]
PySceneDetect now shows a list of scenes in the terminal (you can specify a .CSV file to write to by specifying the -o / --output argument) by interpolating the timecodes/frame numbers between pairs of fades out and in.
- Python
Published by Breakthrough over 11 years ago
scenedetect - PySceneDetect v0.1 [alpha]
Initial release of PySceneDetect. Includes threshold-based fade in/out detection for video files, currently displaying the result to the terminal.
- Python
Published by Breakthrough over 11 years ago
