Skip to content

Commit c323ff2

Browse files
committed
[docs] Prepare for v0.7.2. release
1 parent a20c991 commit c323ff2

5 files changed

Lines changed: 44 additions & 23 deletions

File tree

‎appveyor.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ environment:
3131
secure: QRCPoNYF1nqgXDn7pHgBzg==
3232
ai_license_salt:
3333
secure: +Gy+SRk8JUsaM+5pMEKITiJxdLilrxHpkKlrZzR3C9DPwdgYLGxt5sJn6uXuAJg7e6JsKHcT7tRks/HcSKkHPw==
34-
ffmpeg_version: "8.1.2"
34+
ffmpeg_version: "9.0.2"
3535

3636
# SignPath Config for Code Signing
3737
deploy:

‎packaging/windows/requirements.txt‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# PySceneDetect Requirements for Windows Build
22
# NOTE: pillow (transitive, via moviepy) is overridden to 12.3.0 in appveyor.yml for CVE fixes
33
# (see https://github.com/Zulko/moviepy/issues/2553).
4-
av==18.0.0
5-
click==8.4.2
4+
av==19.0.1
5+
click==8.5.0
66
imageio-ffmpeg==0.6.0
77
moviepy==2.2.1
88
opencv-python-headless==5.0.0.93
9-
numpy==2.5.1
10-
platformdirs==4.11.0
11-
tqdm==4.69.0
9+
numpy==2.5.4
10+
platformdirs==4.13.0
11+
tqdm==4.70.1
1212

1313
# Build-only and test-only requirements.
1414
pyinstaller

‎scenedetect/backends/opencv.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ def _get_capture_api(path: str) -> int:
6363
By default OpenCV resolves any capture backend by probing for compatibility, and tries FFmpeg
6464
first. Usually this fails, and it falls back gracefully to CAP_IMAGES. However, this also seems
6565
to cause issues on interpreter exit, as the stack trace implicates something in the ffmpeg DLL.
66+
67+
TODO: Remove this workaround once upstream fix ships.
68+
69+
https://github.com/opencv/opencv/issues/30017
6670
"""
6771
is_local = not any(identifier in path for identifier in ("://", " ! "))
6872
if os.name == "nt" and is_local and path.lower().endswith(".png"):

‎website/pages/benchmarks.md‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ Three datasets are used, chosen to cover very different content:
2121

2222
Hard cuts, strict frame-exact matching (tolerance 0). F1 cells are shaded by score.
2323

24+
These results were measured with the v0.7 defaults. In v0.7.2 the `HistogramDetector` and
25+
`HashDetector` defaults changed to the swept-best values listed under
26+
[Parameter sweeps](#parameter-sweeps); the tables below will be regenerated with the new defaults.
27+
2428
### BBC Planet Earth
2529

2630
<table class="bm-table">
@@ -84,11 +88,11 @@ robust middle ground.
8488
Scored by mean hard-cut F1 at 1-frame tolerance across all three datasets:
8589

8690
<table class="bm-table">
87-
<tr><th>Detector</th><th>Best mean F1</th><th>Best parameters</th><th>v0.7 default</th></tr>
88-
<tr><td>AdaptiveDetector</td><td class="bm-t2">76.3</td><td>adaptive_threshold=3.5, window_width=3, min_scene_len=0.6s</td><td>adaptive_threshold=3.0, window_width=2</td></tr>
89-
<tr><td>ContentDetector</td><td class="bm-t2">73.4</td><td>threshold=31, min_scene_len=0.6s</td><td>threshold=27</td></tr>
90-
<tr><td>HashDetector</td><td class="bm-t2">69.8</td><td>threshold=0.35, size=8</td><td>threshold=0.395, size=16</td></tr>
91-
<tr><td>HistogramDetector</td><td class="bm-t2">66.3</td><td>threshold=0.20, bins=128</td><td>threshold=0.05, bins=256</td></tr>
91+
<tr><th>Detector</th><th>Best mean F1</th><th>Best parameters</th><th>v0.7.2 default</th><th>v0.7 default</th></tr>
92+
<tr><td>AdaptiveDetector</td><td class="bm-t2">76.3</td><td>adaptive_threshold=3.5, window_width=3, min_scene_len=0.6s</td><td>adaptive_threshold=3.0, window_width=2</td><td>adaptive_threshold=3.0, window_width=2</td></tr>
93+
<tr><td>ContentDetector</td><td class="bm-t2">73.4</td><td>threshold=31, min_scene_len=0.6s</td><td>threshold=27</td><td>threshold=27</td></tr>
94+
<tr><td>HashDetector</td><td class="bm-t2">69.8</td><td>threshold=0.35, size=8</td><td>threshold=0.35, size=8</td><td>threshold=0.395, size=16</td></tr>
95+
<tr><td>HistogramDetector</td><td class="bm-t2">66.3</td><td>threshold=0.20, bins=128</td><td>threshold=0.20, bins=128</td><td>threshold=0.05, bins=256</td></tr>
9296
</table>
9397

9498
Full per-dataset breakdowns are in

‎website/pages/changelog.md‎

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -783,21 +783,34 @@ Development
783783

784784
## PySceneDetect 0.7.2 (TBD)
785785

786-
- [bugfix] Fix `AdaptiveDetector` / `detect-adaptive` emitting scenes shorter than `min_scene_len` when `window_width` is large, by applying the minimum-length check to the emitted (target) frame instead of the current frame [#408](https://github.com/Breakthrough/PySceneDetect/issues/408)
787-
- [general] The `scenedetect-core` package introduced in 0.7.1 has been discontinued, and its only release (0.7.1) yanked from PyPI: pip cannot safely support multiple packages that install the same module files, and restructuring the existing packages around a shared core would break in-place upgrades. Existing `scenedetect-core` installs keep working but will not receive updates; continue to install `scenedetect` or `scenedetect-headless` as usual.
788-
- [improvement] `HistogramDetector` (`detect-hist`) default `threshold` changed from 0.05 to 0.20 and default `bins` from 256 to 128, calibrated from the [benchmark sweep](https://www.scenedetect.com/benchmarks/) for significantly better accuracy. Default output for this detector will change [#559](https://github.com/Breakthrough/PySceneDetect/issues/559)
789-
- [improvement] `HashDetector` (`detect-hash`) default `threshold` changed from 0.395 to 0.35 and default `size` from 16 to 8, calibrated from the [benchmark sweep](https://www.scenedetect.com/benchmarks/) for better accuracy. Default output for this detector will change, including the statsfile metric key (now `hash_dist [size=8 lowpass=2]`) [#559](https://github.com/Breakthrough/PySceneDetect/issues/559)
786+
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*.
787+
788+
#### CLI Changes
789+
790+
- [improvement] `HistogramDetector` (`detect-hist`) default `threshold` changed from 0.05 to 0.20 and default `bins` from 256 to 128, calibrated from the [benchmarks](https://www.scenedetect.com/benchmarks/). Output for this detector will change if you are not setting both parameters explicitly. [#559](https://github.com/Breakthrough/PySceneDetect/issues/559)
791+
- Use `detect-hist -t 0.05 -b 256` or `HistogramDetector(threshold=0.05, bins=256)` to restore the previous behavior.
792+
- [improvement] `HashDetector` (`detect-hash`) default `threshold` changed from 0.395 to 0.35 and default `size` from 16 to 8, calibrated from the [benchmarks](https://www.scenedetect.com/benchmarks/). Output for this detector will change if you are not setting both parameters explicitly. [#559](https://github.com/Breakthrough/PySceneDetect/issues/559)
793+
- Use `detect-hash -t 0.395 -s 16` or `HashDetector(threshold=0.395, size=16)` to restore the previous behavior.
794+
- [improvement] `detect-threshold` now ignores fade-outs shorter than `0.1s` by default. Use `--min-out-length 0` to restore the previous behavior. The API default remains `0` [#278](https://github.com/Breakthrough/PySceneDetect/issues/278)
795+
- [feature] Added `save-keyframes` command to export detected cuts using `# keyframe format v1` for Aegisub-compatible tools [#534](https://github.com/Breakthrough/PySceneDetect/issues/534). Frame numbers are currently approximate for VFR input [#569](https://github.com/Breakthrough/PySceneDetect/issues/569)
796+
- [feature] Add `--min-out-length`/`min_out_length` to `detect-threshold`/`ThresholdDetector`, which requires that fades stay below the threshold for the given duration [#278](https://github.com/Breakthrough/PySceneDetect/issues/278)
797+
- [general] `-f`, `--frame-rate`, and `--framerate` are 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](https://github.com/Breakthrough/PySceneDetect/issues/548)
790798
- [bugfix] Progress bar now reaches 100% when processing variable framerate (VFR) videos, with both the OpenCV and PyAV backends [#561](https://github.com/Breakthrough/PySceneDetect/issues/561)
799+
- [bugfix] Fix `AdaptiveDetector` / `detect-adaptive` emitting scenes shorter than `min_scene_len` when `window_width` is large, by applying the minimum-length check to the emitted (target) frame instead of the current frame [#408](https://github.com/Breakthrough/PySceneDetect/issues/408)
800+
801+
#### API Changes
802+
791803
- [api] Legacy `framerate` argument aliases in `FrameTimecode`, `open_video()`, and the video backends now emit a `DeprecationWarning`; use `frame_rate` instead. When both forms are provided, `frame_rate` takes precedence [#548](https://github.com/Breakthrough/PySceneDetect/issues/548)
792-
- [general] `-f`, `--frame-rate`, and `--framerate` are 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](https://github.com/Breakthrough/PySceneDetect/issues/548)
793804
- [api] `write_scene_list()` now also accepts a path (`str` or `pathlib.Path`) as the first argument in addition to an open file handle; paths are opened and closed automatically [#523](https://github.com/Breakthrough/PySceneDetect/issues/523)
794805
- [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](https://github.com/Breakthrough/PySceneDetect/issues/567)
795-
- [feature] Add `--min-out-length`/`min_out_length` to `detect-threshold`/`ThresholdDetector`, which ignores fades that stay below the threshold for less than the given duration [#278](https://github.com/Breakthrough/PySceneDetect/issues/278)
796-
- [improvement] `detect-threshold` now ignores fade-outs shorter than `0.1s` by default. Use `--min-out-length 0` to restore the previous behavior. The API default remains `0` [#278](https://github.com/Breakthrough/PySceneDetect/issues/278)
797-
- [feature] Added `save-keyframes` command to export detected cuts using `# keyframe format v1` for Aegisub-compatible tools [#534](https://github.com/Breakthrough/PySceneDetect/issues/534). Frame numbers are currently approximate for VFR input [#569](https://github.com/Breakthrough/PySceneDetect/issues/569)
798-
- [bugfix] Fix intermittent segfault on exit. Isolated to Windows builds with OpenCV 5.x when opening PNG image sequences with the `VideoStreamCv2` backend. [#575](https://github.com/Breakthrough/PySceneDetect/issues/575)
799-
- [bugfix] Fix `TypeError` when opening videos with the `pyav` backend on PyAV 19.0 or newer
806+
- [bugfix] `ThresholdDetector`/`detect-threshold` with method `CEILING` now classifies the first frame with the `CEILING` rule instead of the `FLOOR` rule, which anchored a leading fade one frame late and could emit a spurious cut at the first frame (thanks @MuhammadBilalKhan267)
807+
- [bugfix] Fix `min_scene_len` given in frames dropping cuts that are exactly `min_scene_len` frames apart at NTSC framerates (e.g. 29.97 fps), by comparing frame counts instead of converting to seconds [#577](https://github.com/Breakthrough/PySceneDetect/issues/577)
808+
- [bugfix] Fix `TypeError` when opening videos with the `pyav` backend on PyAV 19.0 or newer (PyAV 19 is now supported)
800809
- [bugfix] Fix `pyav` backend duration calculation fallback
801810
- [bugfix] Fix `pyav` backend not releasing the file handle it opened when the stream is garbage collected, which emitted a `ResourceWarning` under `python -X dev` [#568](https://github.com/Breakthrough/PySceneDetect/issues/568)
802-
- [bugfix] `ThresholdDetector`/`detect-threshold` with method `CEILING` now classifies the first frame with the `CEILING` rule instead of the `FLOOR` rule, anchoring a leading fade one frame late and resulting in the possibility of a spurious first-frame cut (thanks @MuhammadBilalKhan267)
803-
- [bugfix] Fix `min_scene_len` given in frames dropping cuts that are exactly `min_scene_len` frames apart at NTSC framerates (e.g. 29.97 fps), by comparing frame counts instead of converting to seconds [#577](https://github.com/Breakthrough/PySceneDetect/issues/577)
811+
- [bugfix] Work around an intermittent segfault on exit with the OpenCV backend on Windows when opening PNG image sequences with `opencv-python` 4.14 or 5.0 (upstream: [opencv/opencv#30017](https://github.com/opencv/opencv/issues/30017)) [#575](https://github.com/Breakthrough/PySceneDetect/issues/575)
812+
813+
#### Packaging
814+
815+
- [general] The Windows distribution now bundles PyAV 19 and FFmpeg 9.0
816+
- [general] The `scenedetect-core` package introduced in 0.7.1 has been discontinued, and its only release (0.7.1) yanked from PyPI. Existing `scenedetect-core` installs keep working but will not receive updates. Install either `scenedetect` or `scenedetect-headless`. [#558](https://github.com/Breakthrough/PySceneDetect/issues/558)

0 commit comments

Comments
 (0)