Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Breakthrough/PySceneDetect
/ functions
Functions
660 in github.com/Breakthrough/PySceneDetect
⨍
Functions
660
◇
Types & classes
69
↳
Endpoints
18
↓ 89 callers
Method
get_value
Get the current setting or default value of the specified command option. Returns ``ty.Any`` because each (command, option) pair has a known
scenedetect/_cli/config.py:783
↓ 63 callers
Method
get_timecode
Get a formatted timecode string of the form HH:MM:SS[.nnn]. Args: precision: The number of decimal places to include in the outpu
scenedetect/common.py:407
↓ 40 callers
Function
invoke_scenedetect
Invokes the scenedetect CLI with the specified arguments and returns the exit code. The kwargs are passed to the args format method, for example:
tests/test_cli.py:68
↓ 39 callers
Method
add_detector
Add/register a SceneDetector (e.g. ContentDetector, ThresholdDetector) to run when detect_scenes is called. The SceneManager owns the detector
scenedetect/scene_manager.py:309
↓ 39 callers
Function
open_video
Open a video at the given path. If `backend` is specified but not available on the current system, OpenCV (`VideoStreamCv2`) will be used as a fal
scenedetect/__init__.py:84
↓ 38 callers
Method
detect_scenes
Perform scene detection on the given video using the added SceneDetectors, returning the number of frames processed. Results can be obtained b
scenedetect/scene_manager.py:418
↓ 29 callers
Method
get_scene_list
Return a list of tuples of start/end FrameTimecodes for each detected scene. Arguments: start_in_scene: Assume the video begins i
scenedetect/scene_manager.py:348
↓ 27 callers
Method
add_command
Add `command` to the processing pipeline. Will be called after processing the input.
scenedetect/_cli/context.py:112
↓ 24 callers
Method
read
Read and decode the next frame as a np.ndarray. Returns False when video ends. Arguments: decode: Return the frame image itself.
scenedetect/video_stream.py:173
↓ 23 callers
Method
format
(self, timecode: FrameTimecode)
scenedetect/_cli/config.py:320
↓ 20 callers
Function
framerate_to_fraction
Convert a framerate value to an exact rational Fraction. Detects NTSC-derived framerates of the form ``N * 1000/1001`` (e.g. 23.976 -> 24000/1001
scenedetect/common.py:126
↓ 16 callers
Function
invoke_cli
Invoke the scenedetect CLI in-process using Click's CliRunner. Replicates the two-step execution of ``__main__.py``: 1. ``scenedetect.main(o
tests/helpers.py:21
↓ 15 callers
Function
_fake_scenes
(fps: Fraction, frames)
tests/test_output.py:247
↓ 14 callers
Method
run
Run image extraction on `video` using the current parameters. Thread-safe. Arguments: video: The video to process. sc
scenedetect/output/image.py:163
↓ 13 callers
Method
seek
Seek to the given timecode. If given as a frame number, represents the current seek pointer (e.g. if seeking to 0, the next frame decoded will
scenedetect/video_stream.py:193
↓ 12 callers
Function
write_scene_list_edl
Writes the given list of scenes to `output_path` in CMX 3600 EDL format. Arguments: output_path: Path to write the EDL file to. Parent di
scenedetect/output/__init__.py:281
↓ 10 callers
Method
_get_other_as_seconds
Get the time in seconds from `other` for arithmetic operations.
scenedetect/common.py:757
↓ 10 callers
Function
get_and_create_path
Get & Create Path: Gets and returns the full/absolute path to file_path in the specified output_directory if set, creating any required directorie
scenedetect/platform.py:141
↓ 9 callers
Function
_run
(args, cwd)
tests/release/test_cli_permutations.py:24
↓ 9 callers
Method
update
No-op.
scenedetect/platform.py:60
↓ 8 callers
Method
_get_other_as_frames
Get the frame number from `other` for arithmetic operations.
scenedetect/common.py:521
↓ 8 callers
Method
close
No-op.
scenedetect/platform.py:63
↓ 7 callers
Function
check_exists
Returns the absolute path to a (relative) path of a file that should exist within the tests/ directory. Throws FileNotFoundError if the file
tests/conftest.py:46
↓ 7 callers
Function
get_absolute_path
Returns the absolute path to a (relative) path of a file that should exist within the tests/ directory. Throws FileNotFoundError if the file
tests/test_detectors.py:52
↓ 7 callers
Method
get_metrics
Return the requested statistics/metrics for a given timecode. Returns: A list containing the requested frame metrics for the give
scenedetect/stats_manager.py:126
↓ 7 callers
Method
save
Save HTML page to a file using the proper encoding
scenedetect/_thirdparty/simpletable.py:301
↓ 7 callers
Function
save_images
Save a set number of images from each scene, given a list of scenes and the associated video/frame source. Arguments: scene_list: A l
scenedetect/output/image.py:352
↓ 7 callers
Method
seek
Seek to the given timecode. If given as a frame number, represents the current seek pointer (e.g. if seeking to 0, the next frame decoded will
scenedetect/backends/pyav.py:250
↓ 7 callers
Method
seek
(self, target: TimecodeLike)
scenedetect/backends/opencv.py:241
↓ 7 callers
Method
set_metrics
Set Metrics: Sets the provided statistics/metrics for a given frame. Arguments: timecode: Timecode to set metrics for.
scenedetect/stats_manager.py:137
↓ 6 callers
Function
_compare_as_fixed
Type guard: True (and narrows `other` to `FrameTimecode`) iff both timecodes have a known framerate, in which case frame-based comparison is exact
scenedetect/common.py:777
↓ 6 callers
Method
add_detector
Instantiate and add `detector` to the processing pipeline.
scenedetect/_cli/context.py:119
↓ 6 callers
Function
copy_file
(src: Path, dst: Path)
scripts/stage_windows_dist.py:85
↓ 6 callers
Function
generate_title
(s: str, level: int = 0, len: int = 72)
docs/generate_cli_docs.py:90
↓ 6 callers
Method
metrics_exist
Metrics Exist: Checks if the given metrics/stats exist for the given frame. Returns: bool: True if the given metric keys exist fo
scenedetect/stats_manager.py:147
↓ 6 callers
Method
parse_timecode
Parses a user input string into a FrameTimecode assuming the given framerate. If `value` is None it will be passed through without processing.
scenedetect/_cli/context.py:152
↓ 6 callers
Method
read
(self, decode: bool = True)
scenedetect/backends/pyav.py:299
↓ 6 callers
Function
run
(advinst: Path, *edit_args: str, check: bool = True)
scripts/update_installer.py:69
↓ 5 callers
Method
_log
(self, log_level: int, log_str: str)
scenedetect/_cli/config.py:743
↓ 5 callers
Method
_resolve_min_scene_len
Resolve the minimum scene length (in frames) for a `detect-*` command, honoring the `--drop-short-scenes` flag, command-specific config, and g
scenedetect/_cli/context.py:136
↓ 5 callers
Method
_seconds_to_frames
Convert `seconds` to the nearest number of frames using the current framerate. *NOTE*: This will not be correct for variable framerate videos
scenedetect/common.py:466
↓ 5 callers
Function
detect
Perform scene detection on a given video `path` using the specified `detector`. Arguments: video_path: Path to input video (absolute or r
scenedetect/__init__.py:144
↓ 5 callers
Method
equal_frame_rate
Determine whether the passed frame rate equals this object's frame rate. Arguments: other: Frame rate to compare against within t
scenedetect/common.py:345
↓ 5 callers
Function
invoke_command
Same as calling Python's subprocess.call() method, but explicitly raises a different exception when the command length is too long. See https
scenedetect/platform.py:221
↓ 5 callers
Method
is_default
True if specified config option is unset (i.e. the default), False otherwise.
scenedetect/_cli/config.py:779
↓ 5 callers
Method
is_save_required
Is Save Required: Checks if the stats have been updated since loading. Returns: bool: True if there are frame metrics/statistics
scenedetect/stats_manager.py:155
↓ 5 callers
Method
save_to_csv
Save To CSV: Saves all frame metrics stored in the StatsManager to a CSV file. Arguments: csv_file: A file handle opened in write
scenedetect/stats_manager.py:164
↓ 5 callers
Function
write_scene_list_otio
Writes the given list of scenes to `output_path` as an OTIO Timeline.1 JSON document. OTIO (OpenTimelineIO) timelines can be imported by many vid
scenedetect/output/__init__.py:555
↓ 4 callers
Function
_detect
(video_path)
tests/release/test_validation.py:46
↓ 4 callers
Function
_mean_pixel_distance
Return the mean average distance in pixel values between `left` and `right`. Both `left and `right` should be 2 dimensional 8-bit images of the sa
scenedetect/detectors/content_detector.py:29
↓ 4 callers
Function
_rational_seconds
Format a `Fraction` as an FCPXML rational time string. FCPXML expresses time as ``<num>/<denom>s`` (or ``<int>s`` for whole seconds). See htt
scenedetect/output/__init__.py:320
↓ 4 callers
Function
_render_slate
Render the slate icon at exact size with Inkscape. With inverted=False, the slate renders with its native FG body / BG stripes (right for pla
scripts/generate_assets.py:197
↓ 4 callers
Method
clear
Clear all cuts/scenes and resets the SceneManager's position. Any statistics generated are still saved in the StatsManager object passed to t
scenedetect/scene_manager.py:330
↓ 4 callers
Method
filter
(self, timecode: FrameTimecode, above_threshold: bool)
scenedetect/detector.py:160
↓ 4 callers
Function
get_absolute_path
Returns the absolute path to a (relative) path of a file that should exist within the tests/ directory. Throws FileNotFoundError if the file
tests/test_video_stream.py:59
↓ 4 callers
Method
load_from_csv
[DEPRECATED] DO NOT USE Load all metrics stored in a CSV file into the StatsManager instance. Will be removed in a future release aft
scenedetect/stats_manager.py:221
↓ 4 callers
Method
push
(self, ys: np.ndarray, ts: np.ndarray)
scenedetect/detectors/transnet_v2.py:36
↓ 4 callers
Function
split_video_ffmpeg
Split `input_video_path` using `ffmpeg` based on the scenes in `scene_list`. Arguments: input_video_path: Path to the video to be split.
scenedetect/output/video.py:255
↓ 4 callers
Function
write_scene_list
Writes the given list of scenes to an output file handle in CSV format. Arguments: output_csv_file: Handle to open file in write mode.
scenedetect/output/__init__.py:57
↓ 3 callers
Method
__init__
(self, value: "str | tuple[int, int, int, int] | CropValue | None" = None)
scenedetect/_cli/config.py:156
↓ 3 callers
Function
_frame_timecode_seconds
Exact seconds for `tc` as a `Fraction`, derived from PTS * time base.
scenedetect/output/__init__.py:331
↓ 3 callers
Function
_get_cv2_param
(param_name: str)
scenedetect/platform.py:109
↓ 3 callers
Function
_retry_on_oserror
Run ``fn``, retrying up to ``_FFMPEG_RETRY_COUNT`` times on ``OSError``.
scenedetect/backends/moviepy.py:49
↓ 3 callers
Method
_timecode_to_seconds
Parses a string based on the three possible forms (in timecode format, as an integer number of frames, or floating-point seconds, ending with
scenedetect/common.py:474
↓ 3 callers
Method
detect
Run scene detection for test case. Should only be called once.
tests/test_detectors.py:87
↓ 3 callers
Function
generate_command_help
( ctx: click.Context, command: click.Command, parent_name: str | None = None )
docs/generate_cli_docs.py:182
↓ 3 callers
Function
get_file_name
Return the file name that `file_path` refers to, optionally removing the extension. E.g. /tmp/foo.bar -> foo
scenedetect/platform.py:129
↓ 3 callers
Function
msi_version
(raw: str)
scripts/update_installer.py:38
↓ 3 callers
Function
render_installer_jpegs
Render the per-scale baseline JPEGs that ship inside the MSI. Outputs `Generated Images/installer_{banner,logo}{,.scale-125,.scale-150,.scale-200
scripts/generate_assets.py:255
↓ 3 callers
Function
render_svg
Render an SVG to a PNG at the given dimensions using Inkscape.
scripts/generate_assets.py:169
↓ 3 callers
Function
write_scene_list_fcp7
Writes the given list of scenes to `output_path` in Final Cut Pro 7 XML (xmeml) format. See the xmeml element reference at https://developer.
scenedetect/output/__init__.py:435
↓ 3 callers
Function
write_scene_list_fcpx
Writes the given list of scenes to `output_path` in Final Cut Pro X XML format (FCPXML 1.9). The output follows Apple's FCPXML schema with ration
scenedetect/output/__init__.py:336
↓ 2 callers
Method
_callback
(self, image, frame_num)
tests/test_scene_manager.py:105
↓ 2 callers
Function
_compose_banner
Banner = full-bleed BG (light blue) canvas with the FG slate on the right.
scripts/generate_assets.py:231
↓ 2 callers
Function
_compose_dialog
Dialog = white canvas with FG strip on the left holding a BG-tinted slate.
scripts/generate_assets.py:242
↓ 2 callers
Function
_cuts
(csv_path)
tests/release/test_cli_permutations.py:117
↓ 2 callers
Function
_edl
(form: str, out_dir)
tests/release/test_cli_permutations.py:233
↓ 2 callers
Function
_edl_timecode
Format `timecode` as ``HH:MM:SS:FF`` for a CMX 3600 EDL entry.
scenedetect/output/__init__.py:245
↓ 2 callers
Method
_ensure_fractional
Validate and convert an `fps` argument into a positive `Fraction`. NTSC-like frame rates are handled via :func:`framerate_to_fraction`.
scenedetect/common.py:453
↓ 2 callers
Function
_generate_timecode_list
Generate per-scene image timecodes using PTS-accurate seconds-based timing. `frame_margin` accepts any :data:`TimecodeLike` value (e.g. ``int`` f
scenedetect/output/image.py:38
↓ 2 callers
Function
_get_aspect_ratio
Display/pixel aspect ratio of the VideoCapture as a float (1.0 represents square pixels).
scenedetect/backends/opencv.py:58
↓ 2 callers
Method
_get_cutting_list
Return a sorted list of unique frame numbers of any detected scene cuts.
scenedetect/scene_manager.py:375
↓ 2 callers
Method
_inference
(self, pixels: np.ndarray, time: np.ndarray)
scenedetect/detectors/transnet_v2.py:74
↓ 2 callers
Method
_initialize_logging
Setup logging based on CLI args and user configuration settings.
scenedetect/_cli/context.py:457
↓ 2 callers
Function
_installed_backends
()
tests/release/test_backends.py:37
↓ 2 callers
Method
_metric_exists
(self, timecode: int | FrameTimecode, metric_key: str)
scenedetect/stats_manager.py:313
↓ 2 callers
Method
_open_capture
Opens capture referenced by this object and resets internal state.
scenedetect/backends/opencv.py:312
↓ 2 callers
Function
_postprocess_scene_list
(context: CliContext, scene_list: SceneList)
scenedetect/_cli/controller.py:81
↓ 2 callers
Function
_rel
(p: Path)
scripts/stage_windows_dist.py:76
↓ 2 callers
Function
_save_baseline_jpeg
Save as baseline (non-progressive) sRGB JPEG. Required by Windows Installer's dialog renderer; progressive JPEGs decode as solid black at install
scripts/generate_assets.py:223
↓ 2 callers
Method
_set_metric
( self, timecode: int | FrameTimecode, metric_key: str, metric_value: ty.Any )
scenedetect/stats_manager.py:305
↓ 2 callers
Function
_tc_to_secs
Parse a HH:MM:SS.mmm timecode string to seconds.
tests/test_vfr.py:48
↓ 2 callers
Method
add_table
Add a SimpleTable to the page list of tables
scenedetect/_thirdparty/simpletable.py:307
↓ 2 callers
Method
equal_framerate
[DEPRECATED] Use :meth:`equal_frame_rate` instead.
scenedetect/common.py:365
↓ 2 callers
Method
evaluate_performance
(self, pred_scenes)
benchmark/evaluator.py:14
↓ 2 callers
Function
find_inkscape
Find the Inkscape executable.
scripts/generate_assets.py:156
↓ 2 callers
Method
get_callback_func
For testing using a callback function.
tests/test_scene_manager.py:96
↓ 2 callers
Method
get_callback_lambda
For testing using a lambda..
tests/test_scene_manager.py:92
↓ 2 callers
Function
get_cv2_imwrite_params
Get OpenCV imwrite Params: Returns a dict of supported image formats and their associated quality/compression parameter index, or None if that for
scenedetect/platform.py:97
↓ 2 callers
Method
get_detect_adaptive_params
Handle detect-adaptive command options and return args to construct one with.
scenedetect/_cli/context.py:368
next →
1–100 of 660, ranked by callers