Skip to content

Commit f808d29

Browse files
committed
[common] Move FrameTimecode into scenedetect.common
1 parent 08e5ba0 commit f808d29

File tree

7 files changed

+487
-487
lines changed

7 files changed

+487
-487
lines changed

docs/api.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ The `scenedetect` API is easy to integrate with most application workflows, whil
2929

3030
* :ref:`scenedetect.video_splitter ✂️ <scenedetect-video_splitter>`: Contains :func:`split_video_ffmpeg <scenedetect.video_splitter.split_video_ffmpeg>` and :func:`split_video_mkvmerge <scenedetect.video_splitter.split_video_mkvmerge>` to split a video based on the detected scenes.
3131

32-
* :ref:`scenedetect.frame_timecode ⏱️ <scenedetect-frame_timecode>`: Contains
33-
:class:`FrameTimecode <scenedetect.frame_timecode.FrameTimecode>`
34-
class for storing, converting, and performing arithmetic on timecodes
35-
with frame-accurate precision.
32+
* :ref:`scenedetect.common ⏱️ <scenedetect-common>`: Contains common types such as :class:`FrameTimecode <scenedetect.common.FrameTimecode>` used for timecode handing.
3633

3734
* :ref:`scenedetect.scene_detector 🌐 <scenedetect-scene_detector>`: Contains :class:`SceneDetector <scenedetect.scene_detector.SceneDetector>` interface which detection algorithms must implement.
3835

@@ -68,7 +65,7 @@ PySceneDetect makes it very easy to find scene transitions in a video with the :
6865
for (scene_start, scene_end) in scenes:
6966
print(f'{scene_start}-{scene_end}')
7067
71-
``scenes`` now contains a list of :class:`FrameTimecode <scenedetect.frame_timecode.FrameTimecode>` pairs representing the start/end of each scene. Note that you can set ``show_progress=True`` when calling :func:`detect <scenedetect.detect>` to display a progress bar with estimated time remaining.
68+
``scenes`` now contains a list of :class:`FrameTimecode <scenedetect.common.FrameTimecode>` pairs representing the start/end of each scene. Note that you can set ``show_progress=True`` when calling :func:`detect <scenedetect.detect>` to display a progress bar with estimated time remaining.
7269

7370
Here, we use :mod:`ContentDetector <scenedetect.detectors.content_detector>` to detect fast cuts. There are :ref:`many detector types <scenedetect-detectors>` which can be used to find fast cuts and fades in/out. PySceneDetect can also export scene data in various formats, and can :ref:`split the input video <scenedetect-video_splitter>` automatically if `ffmpeg` is available:
7471

@@ -103,7 +100,7 @@ Module Reference
103100
api/scene_manager
104101
api/video_splitter
105102
api/stats_manager
106-
api/frame_timecode
103+
api/common
107104
api/scene_detector
108105
api/video_stream
109106
api/platform
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

2-
.. _scenedetect-frame_timecode:
2+
.. _scenedetect-common:
33

44
---------------------------------------------------------------
5-
FrameTimecode
5+
Common
66
---------------------------------------------------------------
77

8-
.. automodule:: scenedetect.frame_timecode
8+
.. automodule:: scenedetect.common
99
:members:

docs/api/migration_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ The `calculate_frame_score` method of :class:`ContentDetector <scenedetect.detec
127127
`MINIMUM_FRAMES_PER_SECOND_*` Constants
128128
===============================================================
129129
130-
In :mod:`scenedetect.frame_timecode` the constants `MINIMUM_FRAMES_PER_SECOND_FLOAT` and `MINIMUM_FRAMES_PER_SECOND_DELTA_FLOAT` have been replaced with :data:`MAX_FPS_DELTA <scenedetect.frame_timecode.MAX_FPS_DELTA>`.
130+
In `scenedetect.frame_timecode` the constants `MINIMUM_FRAMES_PER_SECOND_FLOAT` and `MINIMUM_FRAMES_PER_SECOND_DELTA_FLOAT` have been replaced with :data:`MAX_FPS_DELTA <scenedetect.frame_timecode.MAX_FPS_DELTA>`.
131131
132132
133133
`get_aspect_ratio` Function

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ Table of Contents
4848
api/detectors
4949
api/backends
5050
api/scene_manager
51+
api/common
5152
api/video_splitter
5253
api/stats_manager
53-
api/frame_timecode
5454
api/scene_detector
5555
api/video_stream
5656
api/platform

0 commit comments

Comments
 (0)