diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml index 21f8679f..ed50d736 100644 --- a/.github/workflows/release-test.yml +++ b/.github/workflows/release-test.yml @@ -84,7 +84,10 @@ jobs: run: | python -m pip install --upgrade pip pip install .[dev] - pip install opentimelineio pillow psutil pytest + # TODO(https://github.com/AcademySoftwareFoundation/OpenTimelineIO/issues/1968): + # Remove the marker when OpenTimelineIO has wheels for Python 3.14. The source build + # fails on Windows. The OTIO release test skips if the package is not installed. + pip install "opentimelineio; python_version < '3.14'" pillow psutil pytest - name: Run release tests run: pytest -m release -vv --ignore=tests/release/test_long_video_stress.py diff --git a/README.md b/README.md index 74cbe6aa..496afba8 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ---------------------------------------------------------- -### Latest Release: v0.7.3 (November 8, 2026) +### Latest Release: v0.7.4 (December 5, 2026) **Website**: [scenedetect.com](https://www.scenedetect.com) diff --git a/appveyor.yml b/appveyor.yml index 68a676e1..08e26ac3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -25,20 +25,20 @@ skip_non_tags: true environment: matrix: - - PYTHON: "C:\\Python313-x64" + - PYTHON: "C:\\Python314-x64" # Encrypted AdvancedInstaller License ai_license_secret: secure: QRCPoNYF1nqgXDn7pHgBzg== ai_license_salt: secure: +Gy+SRk8JUsaM+5pMEKITiJxdLilrxHpkKlrZzR3C9DPwdgYLGxt5sJn6uXuAJg7e6JsKHcT7tRks/HcSKkHPw== - ffmpeg_version: "9.0.2" + ffmpeg_version: "9.1" # SignPath Config for Code Signing deploy: - provider: Webhook url: https://app.signpath.io/API/v1/f2efa44c-5b5c-45f2-b44f-8f9dde708313/Integrations/AppVeyor?ProjectSlug=PySceneDetect&SigningPolicySlug=release-signing authorization: - secure: FBgWCaxCCKOqc2spYf5NGWSNUGLbT5WeuC5U0k4Of1Ids9n51YWxhGlMyzLbdNBFe64RUcOSzk/N3emlQzbsJg== + secure: UQKnauO592YaPnm8aAH/Zm8FitBBQwrpYbpus8VuCFRUV1eVqLyit1jy0cbzFqmnXt7BE5x9zxyakX+KcoDZdw== on: APPVEYOR_REPO_TAG: true # keep casing this way for Linux builds where variables are case-sensitive diff --git a/docs/LATEST_VERSION b/docs/LATEST_VERSION index f38fc539..0a1ffad4 100644 --- a/docs/LATEST_VERSION +++ b/docs/LATEST_VERSION @@ -1 +1 @@ -0.7.3 +0.7.4 diff --git a/packaging/windows/installer/PySceneDetect.aip b/packaging/windows/installer/PySceneDetect.aip index 03192d37..f96a6c1d 100644 --- a/packaging/windows/installer/PySceneDetect.aip +++ b/packaging/windows/installer/PySceneDetect.aip @@ -1,5 +1,5 @@ - + @@ -23,10 +23,10 @@ - + - + @@ -159,7 +159,7 @@ - + @@ -291,7 +291,7 @@ - + @@ -1743,7 +1743,7 @@ - + @@ -1766,10 +1766,7 @@ - - - @@ -1788,7 +1785,6 @@ - @@ -1833,18 +1829,11 @@ - - - - - - - @@ -2072,20 +2061,11 @@ - + - - - - - - - - - - + diff --git a/packaging/windows/requirements.txt b/packaging/windows/requirements.txt index 5620b360..7b9a0106 100644 --- a/packaging/windows/requirements.txt +++ b/packaging/windows/requirements.txt @@ -3,11 +3,11 @@ # (see https://github.com/Zulko/moviepy/issues/2553). av==19.0.2 click==8.5.1 -imageio-ffmpeg==0.8.1 +imageio-ffmpeg==0.8.2 moviepy==2.2.1 -opencv-python-headless==5.0.0.93 -numpy==2.5.4 -platformdirs==4.14.5 +opencv-python-headless==5.1.0.95 +numpy==2.5.5 +platformdirs==4.14.9 tqdm==4.70.1 # Build-only and test-only requirements. diff --git a/scenedetect/__init__.py b/scenedetect/__init__.py index 83064851..caa08071 100644 --- a/scenedetect/__init__.py +++ b/scenedetect/__init__.py @@ -80,7 +80,7 @@ # Used for module identification and when printing version & about info # (e.g. calling `scenedetect version` or `scenedetect about`). -__version__ = "0.7.4-dev0" +__version__ = "0.7.4" init_logger() logger = getLogger("pyscenedetect") diff --git a/website/build.py b/website/build.py index 76e968b9..6a2a7b93 100644 --- a/website/build.py +++ b/website/build.py @@ -47,7 +47,7 @@ SITE_URL = "https://www.scenedetect.com" REPO_URL = "https://github.com/Breakthrough/PySceneDetect" PYPI_URL = "https://pypi.org/project/scenedetect/" -DEFAULT_RELEASE_DATE = "November 8, 2026" +DEFAULT_RELEASE_DATE = "December 5, 2026" DEFAULT_DESCRIPTION = ( "Fast, frame-accurate video scene detection and splitting tool in Python " "with a command-line interface and Python API." diff --git a/website/pages/changelog.md b/website/pages/changelog.md index 89c2c7d8..f3f5b659 100644 --- a/website/pages/changelog.md +++ b/website/pages/changelog.md @@ -3,6 +3,53 @@ ## PySceneDetect 0.7 +### PySceneDetect 0.7.4 (December 5, 2026) + +PySceneDetect 0.7.4 adds chapter export via `save-chapters`, piped video input via `--stdin`, `StatsManager.to_dict()`, and PEP 561 `py.typed` typing support. It also fixes CLI validation and exit codes, config file encoding, the `detect-threshold` fade bias, extra spaces in `split-video` arguments, `save-images` frame margin and variable-resolution aspect ratio handling, `FrameTimecode.get_timecode()` truncation and negative time formatting, image sequence input with the default OpenCV backend, and inputs without a video stream. Windows distributions now use Python 3.14 and ship updated dependencies. + +Thanks to @Davidvisualstudio007, @EnesSoydan, @rishi02102017, @goranai, @hskl18, @farisbasha, @aswanth-07, @M-Colley, @Alpenj, @leninworld, @Rohit-Singh-01 and @flavio-cesar for their contributions to this release. + +#### CLI Changes + + - [feature] Add `save-chapters` command to save scenes as chapters in FFmetadata format, which can be added to a video with ffmpeg without re-encoding. Also available as `write_scene_list_ffmetadata()` in the `scenedetect.output` module [#323](https://github.com/Breakthrough/PySceneDetect/issues/323) + - [feature] Add `--stdin` to read the input video from a pipe, e.g. `ffmpeg -i input.mp4 -c copy -f matroska - | scenedetect --stdin detect-content list-scenes`. Requires the PyAV backend. `save-html` omits images, and commands that need to seek or refer to a source file (`split-video`, `save-images`, `save-fcp`, `save-otio`, `load-scenes`, `time -s`) are not supported [#189](https://github.com/Breakthrough/PySceneDetect/issues/189) [#434](https://github.com/Breakthrough/PySceneDetect/issues/434) + - [bugfix] The CLI now exits with 1 when no frames could be read from the input video, or seeking to the `time -s`/`--start` time fails, instead of 0 + - [bugfix] `--kernel-size`/`-k` values the detectors cannot use (even numbers, 1, 0 and negatives other than -1) now give a usage error instead of a traceback, and `-k -1` now means auto, like the config file. A config file with `kernel-size = 1` is now an error [#604](https://github.com/Breakthrough/PySceneDetect/issues/604) + - [bugfix] `save-images` no longer takes the last image of a scene from the first frame of the next scene. `--frame-margin` is counted from the last frame of the scene again, as in v0.6 (`-m 0` now selects the last frame itself) + - [bugfix] Out of range values for `detect-adaptive --frame-window` (below 1) and `save-images` `--num-images` (below 1), `--scale`, `--height` and `--width` (negative) now give a usage error instead of a traceback, and the same values are rejected in a config file [#609](https://github.com/Breakthrough/PySceneDetect/issues/609) + - [bugfix] `detect-content` / `detect-adaptive` `--weights` set to all zeros, or with a negative or non-finite weight (also in a config file), now give an error instead of NaN frame scores and no detected scenes, and `ContentDetector` / `AdaptiveDetector` raise a `ValueError` for them [#612](https://github.com/Breakthrough/PySceneDetect/issues/612) + - [bugfix] Allow image sequences as inputs when the default backend is already OpenCV [#620](https://github.com/Breakthrough/PySceneDetect/issues/620) + - [bugfix] The `detect-threshold` fade bias parameter is now correctly parsed as a percentage value (-100 to 100) in both the CLI and config file [#625](https://github.com/Breakthrough/PySceneDetect/issues/625) + - [bugfix] Extra spaces in `split-video -a`/`--args` and `split_video_ffmpeg(arg_override=...)` no longer make ffmpeg fail [#634](https://github.com/Breakthrough/PySceneDetect/issues/634) + - A doubled space can no longer be used to pass an empty value to ffmpeg + - An all-space `-a` is now the same as `-a ""`: config file `args` apply, then the built-in defaults + - An empty or all-space `arg_override` now runs ffmpeg with no extra encoding or `-map` arguments, instead of failing + - [bugfix] Config files are now read as UTF-8 on all platforms, with or without a byte order mark [#633](https://github.com/Breakthrough/PySceneDetect/pull/633) + - Previously, Windows defaulted to using the system code page on Python <= 3.14, so a config file with non-ASCII text would fail to load depending on the encoding/system locale + - Non-ASCII text saved in a different encoding (e.g. ANSI on Windows) now fails to load. The config file can be saved as UTF-8 to resolve this. + +#### API Changes + + - [feature] Add `StatsManager.to_dict()` to get all frame metrics as a dict, e.g. for `pandas.DataFrame.from_dict(stats_manager.to_dict(), orient="index")` [#507](https://github.com/Breakthrough/PySceneDetect/issues/507) + - [bugfix] Single-threaded `save_images()` preserves each frame's aspect ratio when the video changes resolution and only a width or height is specified [#615](https://github.com/Breakthrough/PySceneDetect/pull/615) + - [bugfix] `FrameTimecode.get_timecode()` with `use_rounding=False` now truncates instead of sometimes rounding up the last digit. Previously 0.4996 seconds with `precision=2` gave `00:00:00.50`, and 1.99997 seconds gave `00:00:01.000` instead of `00:00:01.999`. [#611](https://github.com/Breakthrough/PySceneDetect/issues/611) + - [bugfix] `FrameTimecode.get_timecode()` now shows a negative time (e.g. from a negative PTS) as zero. Previously a large negative time gave output such as `-1:-6:00.000`. A negative `precision` now raises a `ValueError` + - [bugfix] `scenedetect.detect()` now closes the video when it returns or raises an exception. Previously the file stayed open, so on Windows it could not be deleted or moved right after the call [#616](https://github.com/Breakthrough/PySceneDetect/pull/616) + - [bugfix] A crop region that ends on the last row/column of the frame no longer emits an erroneous "crop ends outside of video boundary" warning. The frame size used to select auto downscale was also one pixel too large [#623](https://github.com/Breakthrough/PySceneDetect/issues/623) + - [bugfix] `open_video()` now raises `VideoOpenFailure` for an input without a video stream (e.g. an audio-only file). Previously the PyAV backend raised an `IndexError`, and the OpenCV backend on Windows (MSMF) opened the input with a 0x0 frame size, then failed with an `AssertionError` or stopped responding [#630](https://github.com/Breakthrough/PySceneDetect/issues/630) + +#### Packaging + + - [general] The root `pyproject.toml` is now `scenedetect` again (it had a development-only `scenedetect-core` name since 0.7.1). `pip install -e .` now installs the same distribution as PyPI. The `[opencv]` and `[opencv-headless]` extras of the development config were removed because `opencv-python` is now a declared dependency [#558](https://github.com/Breakthrough/PySceneDetect/issues/558) + - [feature] Ship a PEP 561 `py.typed` marker in both `scenedetect` and `scenedetect-headless` distributions, add the `Typing :: Typed` classifier, and explicitly re-export `SceneManager` in `scenedetect/__init__.py` for strict type checkers [#617](https://github.com/Breakthrough/PySceneDetect/pull/617) + - [general] Updates to Windows distributions: + - Python 3.13 -> Python 3.14 + - ffmpeg 9.0.2 -> 9.1 + - imageio-ffmpeg 0.8.1 -> 0.8.2 + - numpy 2.5.4 -> 2.5.5 + - opencv-python-headless 5.0.0.93 -> 5.1.0.95 + - platformdirs 4.14.5 -> 4.14.9 + ### PySceneDetect 0.7.3 (November 8, 2026) 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. @@ -857,32 +904,3 @@ Both the Windows installer and portable distributions now include signed executa ### PySceneDetect 0.8 (TBD) Major breaking release that overhauls how time is managed. Rather than assigning each frame a point in time, we will now represent the presenation time, duration, and ordinal of a given frame. We will also align on a policy for how we deal with non-monotonic frame delivery from backends. - -### PySceneDetect 0.7.4 (TBD) - - - [general] The root `pyproject.toml` is now `scenedetect` again (it had a development-only `scenedetect-core` name since 0.7.1). `pip install -e .` now installs the same distribution as PyPI. The `[opencv]` and `[opencv-headless]` extras of the development config were removed because `opencv-python` is now a declared dependency [#558](https://github.com/Breakthrough/PySceneDetect/issues/558) - - [feature] Add `save-chapters` command to save scenes as chapters in FFmetadata format, which can be added to a video with ffmpeg without re-encoding. Also available as `write_scene_list_ffmetadata()` in the `scenedetect.output` module [#323](https://github.com/Breakthrough/PySceneDetect/issues/323) - - [feature] Add `--stdin` to read the input video from a pipe, e.g. `ffmpeg -i input.mp4 -c copy -f matroska - | scenedetect --stdin detect-content list-scenes`. Requires the PyAV backend. `save-html` omits images, and commands that need to seek or refer to a source file (`split-video`, `save-images`, `save-fcp`, `save-otio`, `load-scenes`, `time -s`) are not supported [#189](https://github.com/Breakthrough/PySceneDetect/issues/189) [#434](https://github.com/Breakthrough/PySceneDetect/issues/434) - - [feature] Add `StatsManager.to_dict()` to get all frame metrics as a dict, e.g. for `pandas.DataFrame.from_dict(stats_manager.to_dict(), orient="index")` [#507](https://github.com/Breakthrough/PySceneDetect/issues/507) - - [bugfix] The CLI now exits with 1 when no frames could be read from the input video, or seeking to the `time -s`/`--start` time fails, instead of 0 - - [bugfix] `--kernel-size`/`-k` values the detectors cannot use (even numbers, 1, 0 and negatives other than -1) now give a usage error instead of a traceback, and `-k -1` now means auto, like the config file. A config file with `kernel-size = 1` is now an error [#604](https://github.com/Breakthrough/PySceneDetect/issues/604) - - [bugfix] `save-images` no longer takes the last image of a scene from the first frame of the next scene. `--frame-margin` is counted from the last frame of the scene again, as in v0.6 (`-m 0` now selects the last frame itself) - - [bugfix] Single-threaded `save_images()` preserves each frame's aspect ratio when the video changes resolution and only a width or height is specified [#615](https://github.com/Breakthrough/PySceneDetect/pull/615) - - [bugfix] Out of range values for `detect-adaptive --frame-window` (below 1) and `save-images` `--num-images` (below 1), `--scale`, `--height` and `--width` (negative) now give a usage error instead of a traceback, and the same values are rejected in a config file [#609](https://github.com/Breakthrough/PySceneDetect/issues/609) - - [bugfix] `detect-content` / `detect-adaptive` `--weights` set to all zeros, or with a negative or non-finite weight (also in a config file), now give an error instead of NaN frame scores and no detected scenes, and `ContentDetector` / `AdaptiveDetector` raise a `ValueError` for them [#612](https://github.com/Breakthrough/PySceneDetect/issues/612) - - [bugfix] `FrameTimecode.get_timecode()` with `use_rounding=False` now truncates instead of sometimes rounding up the last digit. Previously 0.4996 seconds with `precision=2` gave `00:00:00.50`, and 1.99997 seconds gave `00:00:01.000` instead of `00:00:01.999`. [#611](https://github.com/Breakthrough/PySceneDetect/issues/611) - - [bugfix] `FrameTimecode.get_timecode()` now shows a negative time (e.g. from a negative PTS) as zero. Previously a large negative time gave output such as `-1:-6:00.000`. A negative `precision` now raises a `ValueError` - - [bugfix] Allow image sequences as inputs when the default backend is already OpenCV [#620](https://github.com/Breakthrough/PySceneDetect/issues/620) - - [bugfix] Extra spaces in `split-video -a`/`--args` and `split_video_ffmpeg(arg_override=...)` no longer make ffmpeg fail [#634](https://github.com/Breakthrough/PySceneDetect/issues/634) - - A doubled space can no longer be used to pass an empty value to ffmpeg - - An all-space `-a` is now the same as `-a ""`: config file `args` apply, then the built-in defaults - - An empty or all-space `arg_override` now runs ffmpeg with no extra encoding or `-map` arguments, instead of failing - - [bugfix] The `detect-threshold` fade bias parameter is now correctly parsed as a percentage value (-100 to 100) in both the CLI and config file [#625](https://github.com/Breakthrough/PySceneDetect/issues/625) - - [bugfix] A crop region that ends on the last row/column of the frame no longer emits an erroneus "crop ends outside of video boundary" warning. The frame size used to select auto downscale was also one pixel too large [#623](https://github.com/Breakthrough/PySceneDetect/issues/623) - - [bugfix] `scenedetect.detect()` now closes the video when it returns or raises an exception. Previously the file stayed open, so on Windows it could not be deleted or moved right after the call [#616](https://github.com/Breakthrough/PySceneDetect/pull/616) - - [bugfix] Config files are now read as UTF-8 on all platforms, with or without a byte order mark [#633](https://github.com/Breakthrough/PySceneDetect/pull/633) - - Previously, Windows defaulted to using the system code page on Python <= 3.14, so a config file with non-ASCII text would fail to load depending on the encoding/system locale - - Non-ASCII text saved in a different encoding (e.g. ANSI on Windows) now fails to load. The config file can be saved as UTF-8 to resolve this. - - [bugfix] The PyAV backend now raises `VideoOpenFailure` instead of `IndexError` if the input has no video stream (e.g. audio only) [#630](https://github.com/Breakthrough/PySceneDetect/issues/630) - - [general] Updates to Windows distributions: - - Python 3.13 -> Python 3.14 diff --git a/website/pages/docs.md b/website/pages/docs.md index c30a05a8..ce0991ba 100644 --- a/website/pages/docs.md +++ b/website/pages/docs.md @@ -5,6 +5,7 @@ Select a version below to open the PySceneDetect Reference Manual (CLI and Pytho ## Stable - [latest](/docs/latest/) +- [v0.7.4](/docs/0.7.4/) - [v0.7.3](/docs/0.7.3/) - [v0.7.2](/docs/0.7.2/) - [v0.7.1](/docs/0.7.1/) diff --git a/website/pages/download.md b/website/pages/download.md index 1559d51d..7ef8154b 100644 --- a/website/pages/download.md +++ b/website/pages/download.md @@ -10,19 +10,19 @@ PySceneDetect is free, open-source software released under the BSD 3-Clause Lice - Windows 64-bit · v0.7.3 + Windows 64-bit · v0.7.4 - November 8, 2026 + December 5, 2026