Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 35 additions & 33 deletions scenedetect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,47 +30,49 @@

# Commonly used classes/functions exported under the `scenedetect` namespace for brevity.
# Note that order of importants is important!
from scenedetect.platform import init_logger # noqa: I001
from scenedetect.platform import init_logger as init_logger # noqa: I001
from scenedetect.common import (
FrameTimecode,
FrameRate,
SceneList,
CutList,
CropRegion,
TimecodePair,
TimecodeLike,
Interpolation,
FrameTimecode as FrameTimecode,
FrameRate as FrameRate,
SceneList as SceneList,
CutList as CutList,
CropRegion as CropRegion,
TimecodePair as TimecodePair,
TimecodeLike as TimecodeLike,
Interpolation as Interpolation,
)
from scenedetect.platform import StrPath
from scenedetect.video_stream import VideoStream, VideoOpenFailure
from scenedetect.platform import StrPath as StrPath
from scenedetect.video_stream import VideoStream as VideoStream
from scenedetect.video_stream import VideoOpenFailure as VideoOpenFailure
from scenedetect.output import (
save_images,
split_video_ffmpeg,
split_video_mkvmerge,
is_ffmpeg_available,
is_mkvmerge_available,
write_scene_list,
write_scene_list_html,
PathFormatter,
VideoMetadata,
SceneMetadata,
save_images as save_images,
split_video_ffmpeg as split_video_ffmpeg,
split_video_mkvmerge as split_video_mkvmerge,
is_ffmpeg_available as is_ffmpeg_available,
is_mkvmerge_available as is_mkvmerge_available,
write_scene_list as write_scene_list,
write_scene_list_html as write_scene_list_html,
PathFormatter as PathFormatter,
VideoMetadata as VideoMetadata,
SceneMetadata as SceneMetadata,
)
from scenedetect.detector import SceneDetector
from scenedetect.detector import SceneDetector as SceneDetector
from scenedetect.detectors import (
ContentDetector,
AdaptiveDetector,
ThresholdDetector,
HistogramDetector,
HashDetector,
ContentDetector as ContentDetector,
AdaptiveDetector as AdaptiveDetector,
ThresholdDetector as ThresholdDetector,
HistogramDetector as HistogramDetector,
HashDetector as HashDetector,
)
from scenedetect.backends import (
AVAILABLE_BACKENDS,
VideoStreamCv2,
VideoStreamAv,
VideoStreamMoviePy,
VideoCaptureAdapter,
AVAILABLE_BACKENDS as AVAILABLE_BACKENDS,
VideoStreamCv2 as VideoStreamCv2,
VideoStreamAv as VideoStreamAv,
VideoStreamMoviePy as VideoStreamMoviePy,
VideoCaptureAdapter as VideoCaptureAdapter,
)
from scenedetect.stats_manager import StatsManager, StatsFileCorrupt
from scenedetect.stats_manager import StatsManager as StatsManager
from scenedetect.stats_manager import StatsFileCorrupt as StatsFileCorrupt
from scenedetect.scene_manager import SceneManager

# Used for module identification and when printing version & about info
Expand Down
2 changes: 1 addition & 1 deletion scenedetect/_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import logging
import os
import os.path
import typing as ty

from copy import copy

import click
Expand Down
2 changes: 1 addition & 1 deletion scenedetect/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
# - Nvidia VPF: https://developer.nvidia.com/blog/vpf-hardware-accelerated-video-processing-framework-in-python/

# OpenCV must be available at minimum.
from scenedetect.backends.opencv import VideoCaptureAdapter, VideoStreamCv2
from scenedetect.backends.opencv import VideoCaptureAdapter as VideoCaptureAdapter, VideoStreamCv2

try:
from scenedetect.backends.pyav import VideoStreamAv
Expand Down
1 change: 0 additions & 1 deletion scenedetect/backends/opencv.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import math
import os
import os.path
import typing as ty
import warnings
from fractions import Fraction
from logging import getLogger
Expand Down
10 changes: 5 additions & 5 deletions scenedetect/detectors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
processing videos, however they can also be used to process frames directly.
"""

from scenedetect.detectors.content_detector import ContentDetector # noqa: I001
from scenedetect.detectors.threshold_detector import ThresholdDetector
from scenedetect.detectors.adaptive_detector import AdaptiveDetector
from scenedetect.detectors.hash_detector import HashDetector
from scenedetect.detectors.histogram_detector import HistogramDetector
from scenedetect.detectors.content_detector import ContentDetector as ContentDetector # noqa: I001
from scenedetect.detectors.threshold_detector import ThresholdDetector as ThresholdDetector
from scenedetect.detectors.adaptive_detector import AdaptiveDetector as AdaptiveDetector
from scenedetect.detectors.hash_detector import HashDetector as HashDetector
from scenedetect.detectors.histogram_detector import HistogramDetector as HistogramDetector

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
Expand Down
18 changes: 9 additions & 9 deletions scenedetect/output/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
)

# Commonly used classes/functions exported under the `scenedetect.output` namespace for brevity.
from scenedetect.output.image import save_images
from scenedetect.output.image import save_images as save_images
from scenedetect.output.video import (
PathFormatter,
SceneMetadata,
VideoMetadata,
default_formatter,
is_ffmpeg_available,
is_mkvmerge_available,
split_video_ffmpeg,
split_video_mkvmerge,
PathFormatter as PathFormatter,
SceneMetadata as SceneMetadata,
VideoMetadata as VideoMetadata,
default_formatter as default_formatter,
is_ffmpeg_available as is_ffmpeg_available,
is_mkvmerge_available as is_mkvmerge_available,
split_video_ffmpeg as split_video_ffmpeg,
split_video_mkvmerge as split_video_mkvmerge,
)

logger = logging.getLogger("pyscenedetect")
Expand Down
1 change: 0 additions & 1 deletion scenedetect/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import string
import subprocess
import sys
import typing as ty

import cv2

Expand Down