Skip to main content

scenechange

Python versions PyPI - Version GitHub tag (with filter) License GitHub commits since latest release (by SemVer including pre-releases) QA Tests Coverage Status Dependabot Documentation Status mypy uv pytest Ruff Downloads Stargazers pre-commit.ci status Prettier

@Tatsh Buy Me A Coffee Libera.Chat Mastodon Follow Patreon

Scene change detection plugin for VapourSynth.

The project builds two VapourSynth plugins:

  • scenechange (namespace scd) detects scene changes and attaches _SceneChangePrev and _SceneChangeNext frame properties (0 or 1) so downstream temporal filters can avoid bleeding across cuts.
  • temporalsoften2 (namespace focus2) is a temporal-averaging denoiser that honours those scene change properties.

The vapoursynth-scenechange Python package bundles both compiled plugins together with a small wrapper (scenechange.TemporalSoften) that stitches them into a single function call.

Building and installing

Requirements:

  • A C99 compiler (GCC, Clang, or MSVC).
  • Meson 1.3 or newer, and Ninja.
  • VapourSynth R55 or newer (API 4) headers. These are found via vapoursynth.pc, or via the vapoursynth Python package (vapoursynth.get_include()), and are otherwise downloaded at configure time. The plugins use VapourSynth4.h and are not compatible with the legacy API 3.

Configure, build, and install:

meson setup build
meson compile -C build
meson install -C build

By default the plugins install to <libdir>/vapoursynth. Override the location with -Dplugins_dir=/path/to/plugins at configure time. Other options are -Dtests=enabled (build the cmocka test suite), -Dforce_generic=true (use the scalar kernel on SIMD-capable hosts), -Ddocs=true (build the Doxygen API documentation), and -Dfetch_vapoursynth_headers=false (never download VapourSynth4.h).

Python package

Prebuilt wheels that bundle both plugins are published to PyPI, so most users do not need to build anything from source:

pip install vapoursynth-scenechange

Following the VapourSynth packaging conventions, the wheel installs the compiled plugins into <site-packages>/vapoursynth/plugins, which VapourSynth autoloads. Nothing needs to be imported or loaded to make scd and focus2 available. The scenechange Python module is installed alongside them and declares vapoursynth as a dependency. Building the plugins from source with Meson (above) is only needed for development or for platforms without a published wheel. See Python wrapper for usage.

Usage

scd.Detect

clip = core.scd.Detect(clip, thresh, interval_h, interval_v, log)

Detect scene changes and attach _SceneChangePrev and _SceneChangeNext properties to the clip.

  • thresh: threshold for the average of luma differences between the previous and next frames. When the average exceeds this value the frame is judged a scene change. Range is 1 to 254 * 2 ^ (bitdepth - 8); the default (or any out-of-range value) is 15 * 2 ^ (bitdepth - 8).
  • interval_h: horizontal interval, in pixels, used when measuring differences. Range is 1 to the clip width; the default is auto-adjusted.
  • interval_v: vertical interval, in pixels, used when measuring differences. Range is 1 to the clip height; the default is auto-adjusted.
  • log: optional path of a log file. When set, the frame numbers identified as scene changes are written as text. An absolute path is recommended. Unset by default.

scd.ApplyLog

clip = core.scd.ApplyLog(clip, log)

Apply _SceneChangePrev and _SceneChangeNext properties to the clip from a log previously produced by scd.Detect.

Supported colour families are GRAY (8-bit and 16-bit) and YUV (8-bit, 9-bit, 10-bit, and 16-bit).

focus2.TemporalSoften2

clip = core.focus2.TemporalSoften2(
    clip, radius, luma_threshold, chroma_threshold, scenechange, mode
)
  • radius: 1 to 7. Default is 4.
  • luma_threshold: 0 to 255. For RGB clips this value applies to all planes. Default is 4.
  • chroma_threshold: 0 to 255. Ignored for RGB and Gray clips. Default is 8.
  • scenechange: when 0 the _SceneChange* frame properties are ignored. Default is 1.
  • mode: 2.

YUV or Gray example. The plugins autoload from the VapourSynth plugins directory, so core.std.LoadPlugin is only needed when they were installed somewhere else:

import vapoursynth as vs

core = vs.core

clip = core.scd.Detect(clip, thresh=20)
clip = core.focus2.TemporalSoften2(clip)

RGB example (scene detection requires GRAY8, so the properties must be copied back):

def copy_sc(n, f):
    fout = f[0].copy()
    fout.props._SceneChange = f[1].props._SceneChange[0]
    return fout


tmp = core.resize.Point(clip, format=vs.GRAY8)
tmp = core.scd.Detect(tmp, thresh=20)
clip = core.std.ModifyFrame([clip, tmp], copy_sc)
clip = core.focus2.TemporalSoften2(clip)

Python wrapper

The TemporalSoften class in the scenechange package collapses the boilerplate above into a single call and handles the RGB property-copy step automatically:

import vapoursynth as vs
from scenechange import TemporalSoften

core = vs.core
clip = TemporalSoften(core).soften(clip, luma_threshold=4)

Credits

Original plugins by Oka Motofumi (chikuzen.mo at gmail dot com).

Metadata

Release files for vapoursynth-scenechange 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vapoursynth-scenechange 0.5.1
File Size Uploaded Provenance Actions
vapoursynth_scenechange-0.5.1.tar.gz 32.9 kB With provenance Details for vapoursynth_scenechange-0.5.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for vapoursynth-scenechange 0.5.1
File Actions
vapoursynth_scenechange-0.5.1-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for vapoursynth_scenechange-0.5.1-py3-none-win_arm64.whl
vapoursynth_scenechange-0.5.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for vapoursynth_scenechange-0.5.1-py3-none-win_amd64.whl
vapoursynth_scenechange-0.5.1-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for vapoursynth_scenechange-0.5.1-py3-none-musllinux_1_2_x86_64.whl
vapoursynth_scenechange-0.5.1-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for vapoursynth_scenechange-0.5.1-py3-none-musllinux_1_2_aarch64.whl
vapoursynth_scenechange-0.5.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for vapoursynth_scenechange-0.5.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
vapoursynth_scenechange-0.5.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64, Linux glibc 2.17+ ARM64 Details for vapoursynth_scenechange-0.5.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
vapoursynth_scenechange-0.5.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for vapoursynth_scenechange-0.5.1-py3-none-macosx_11_0_arm64.whl
vapoursynth_scenechange-0.5.1-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details for vapoursynth_scenechange-0.5.1-py3-none-macosx_10_13_x86_64.whl

Total release size: 278.8 kB

Release files / vapoursynth_scenechange-0.5.1.tar.gz

Download URL vapoursynth_scenechange-0.5.1.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5d1d244e3c23f7d4aced41f45f9dc3c7305bf820bb9fa26bcc20542a93345ddb
BLAKE2b-256 checksum
How to use checksums
5d3eb860f6e89ab5c29e09306b224440e0a26d83163327f9342176837e7570e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / vapoursynth_scenechange-0.5.1-py3-none-win_arm64.whl

Download URL vapoursynth_scenechange-0.5.1-py3-none-win_arm64.whl
Size 31.7 kB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
d44d5b7ad8c74192c7ad1372944f4038c58c55d78cb0fe7fcd1013a8fa233487
BLAKE2b-256 checksum
How to use checksums
ded2189e585b7753f33b0131fedd10366bd53122a3ae26c27aefb8a7f85792c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / vapoursynth_scenechange-0.5.1-py3-none-win_amd64.whl

Download URL vapoursynth_scenechange-0.5.1-py3-none-win_amd64.whl
Size 32.9 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
0a6733c1d501daf1efd89f8bfb2a9322473ab5995e87dcb76ec3bc66637889dc
BLAKE2b-256 checksum
How to use checksums
aaba9839783fd3c2f1ee82b98c96b6232c8e48eb4e085e69fa7ff666efeecdc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / vapoursynth_scenechange-0.5.1-py3-none-musllinux_1_2_x86_64.whl

Download URL vapoursynth_scenechange-0.5.1-py3-none-musllinux_1_2_x86_64.whl
Size 31.5 kB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
f2df3f7bd816fc11dd21beee36fba149d119cadf7f2b55faac9c1a9e4abe0886
BLAKE2b-256 checksum
How to use checksums
9abd2d7dcc86bc5bc1f0ce64765086e571e504e6b6f45a2a888b8303d6fa10e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / vapoursynth_scenechange-0.5.1-py3-none-musllinux_1_2_aarch64.whl

Download URL vapoursynth_scenechange-0.5.1-py3-none-musllinux_1_2_aarch64.whl
Size 32.0 kB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
58b3d8464e7cdd47c680c8e0a9b5c8ed547c1246b0203e9596738139c76ff309
BLAKE2b-256 checksum
How to use checksums
31fed5b05d03c3fef493939eb9352e2a5f06148b4626eba99949b38e88a1357e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / vapoursynth_scenechange-0.5.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL vapoursynth_scenechange-0.5.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 30.8 kB
Tags Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c8a9b07162f5060af2e658f8b4a28faa069721804a9a7059890b12c305bd6edb
BLAKE2b-256 checksum
How to use checksums
b14f90b7d87c2f9c32bb970006ec3a11ae5e7a6c306fcef223b3cb5569c308a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / vapoursynth_scenechange-0.5.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL vapoursynth_scenechange-0.5.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 31.9 kB
Tags Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
6678a8c7415dfc0a96a3f5f87bd0e94ad23e53afcec707779bd1007a1830395b
BLAKE2b-256 checksum
How to use checksums
05ff5701214216e626535a37dbb10b5de615bfbaa3c8251519f90d5e13ad3799
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / vapoursynth_scenechange-0.5.1-py3-none-macosx_11_0_arm64.whl

Download URL vapoursynth_scenechange-0.5.1-py3-none-macosx_11_0_arm64.whl
Size 28.3 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
36d1e10bfe4dc025936355b6617997d808496234919babba80682557aab06be4
BLAKE2b-256 checksum
How to use checksums
9819c1c9199cbeb9b3e53429813cfd527ded701844e92fed95f5d3bdbfb8e883
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / vapoursynth_scenechange-0.5.1-py3-none-macosx_10_13_x86_64.whl

Download URL vapoursynth_scenechange-0.5.1-py3-none-macosx_10_13_x86_64.whl
Size 26.9 kB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
aae6681a022a3319940f962244d93506ad0d5fbd6cd67dbb2600b7e6abe589eb
BLAKE2b-256 checksum
How to use checksums
3de1b3ca4c8c2f7f7965fce26b1c5af1fd2b545479df2a49d8164b6ae5251ab2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Security for vapoursynth-scenechange 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for vapoursynth_scenechange-0.5.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page