You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[api] Convert frame-based defaults to temporal values (#531)
Replace frame-based defaults with temporal (time-based) values to properly support VFR video.
Rename save-images --frame-margin to --margin (default 0.1s), and change min_scene_len default from 15 frames to "0.6s" across all detectors.
FlashFilter now accepts temporal values directly instead of frame numbers.
Introduce new constant to centralize default min scene length.
All built-in detector constructors now default ``min_scene_len`` to ``"0.6s"`` (temporal) instead of ``15`` (frames). This makes detection behavior consistent across different framerates and is required for correct VFR support. Existing code passing an explicit ``int`` still works:
103
+
104
+
.. code:: python
105
+
106
+
# v0.6 - default was 15 frames
107
+
detector = ContentDetector()
108
+
109
+
# v0.7 - default is "0.6s" (~15 frames at 25fps, ~14 at 24fps, ~18 at 30fps)
110
+
detector = ContentDetector()
111
+
112
+
# To preserve exact v0.6 behavior:
113
+
detector = ContentDetector(min_scene_len=15)
114
+
115
+
The ``save_images()`` function parameter ``frame_margin`` has been renamed to ``margin`` and now defaults to ``"0.1s"`` instead of ``1`` (frame). The old keyword ``frame_margin=`` still works with a deprecation warning:
- The ``-d``/``--min-delta-hsv`` option on ``detect-adaptive`` has been removed. Use ``-c``/``--min-content-val`` instead.
205
231
- VFR videos now work correctly with both the OpenCV and PyAV backends.
206
232
- New ``save-xml`` command for exporting scenes in Final Cut Pro XML format.
233
+
- ``save-images``: ``--frame-margin`` renamed to ``--margin``, now accepts temporal values (e.g. ``0.1s``). Default changed from 1 frame to ``0.1s``. Old name still works with a deprecation warning.
234
+
- Config file: ``[save-images]`` option ``frame-margin`` renamed to ``margin``. Old name still accepted with a deprecation warning.
0 commit comments