vapoursynth-autocrop
AutoCrop for Vapoursynth
Usage
AutoCrop
acrop.AutoCrop(clip src, int range=4, int top=range, int bottom=range, int left=range, int right=range, float[] ref_color=<black luma, neutral chroma>, float[] max_color_deviation=[0.0824,0.0196,0.0196])
Search only
acrop.CropValues(clip src, int range=4, int top=range, int bottom=range, int left=range, int right=range, float[] ref_color=<black luma, neutral chroma>, float[] max_color_deviation=[0.0824,0.0196,0.0196])
CropValues leaves the frame untouched and only attaches the detected values as the
frame properties CropTopValue, CropBottomValue, CropLeftValue and CropRightValue.
AutoCrop applies the crop instead. Because the amount to crop is decided per frame,
AutoCrop produces a clip with variable dimensions, which many filters refuse to accept.
Arguments
Input must be constant format YUV or GRAY, either 8 to 16 bit integer or 32 bit float. 16 bit half float is not supported. All chroma subsamplings are supported. A GRAY clip has nothing to constrain the crop besides its single plane, and since it has no subsampling, crop values on it are not restricted to even numbers.
range sets the default for top, bottom, left and right, which cap how far in
from each edge the search looks. They must be non-negative, must be a multiple of the
chroma subsampling, and must leave at least one pixel in each direction, so
left + right < width and top + bottom < height.
ref_color is the color a border is expected to be and max_color_deviation is how
far a sample may stray from it before the row or column stops counting as border.
ref_color takes one value per plane as an actual sample value in the clip's own scale,
with no conversion applied. An integer clip wants values inside its sample range, so
neutral chroma is 128 at 8 bit and 32768 at 16 bit. A float clip wants normalised values,
where luma and GRAY run 0.0 to 1.0 while chroma runs -0.5 to 0.5, so neutral chroma there
is 0.0 and negative references are perfectly valid.
Its default is black luma and neutral chroma expressed for whatever format the clip is, so leaving it alone means the same thing everywhere.
max_color_deviation is a fraction of the full sample range rather than a sample value,
either a single value applied to every plane or one value per plane. For integer clips
the tolerance is round(max_color_deviation * ((1 << bits_per_sample) - 1)), and for
float clips the full range is 1.0 so the tolerance is the deviation itself. A deviation
of 0.0 requires an exact match and 1.0 accepts anything.
Together the defaults accept luma 0 to 21 and chroma 128 +/- 5 at 8 bit, which is the
same band the original color/color_second pair described, and the equivalent band at
every other depth and sample type.
Each edge is measured independently over the full frame, and the result is not fed back into the other edges. A sample outside the color range therefore blocks detection along the whole row and column it sits in, even if it would itself have been cropped away by one of the other edges.
Compilation
The plugin builds with Meson through a PEP 517 frontend, which installs it straight into the VapourSynth plugin directory of the Python environment it is built for:
pip install .
To produce a wheel instead:
python -m build
The VapourSynth Python module has to be installed in the build environment, since the build queries it for the header location.
Meson can also be driven directly if you would rather not go through Python packaging:
meson setup build && meson compile -C build
Metadata
Release files for vapoursynth-autocrop 2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vapoursynth_autocrop-2.0.tar.gz | 11.1 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| vapoursynth_autocrop-2.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| vapoursynth_autocrop-2.0-py3-none-musllinux_1_2_x86_64.whl | Python 3 | none | Linux musl 1.2+ x86-64 | Details |
| vapoursynth_autocrop-2.0-py3-none-musllinux_1_2_aarch64.whl | Python 3 | none | Linux musl 1.2+ ARM64 | Details |
| vapoursynth_autocrop-2.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 | Details |
| vapoursynth_autocrop-2.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64, Linux glibc 2.24+ ARM64 | Details |
| vapoursynth_autocrop-2.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| vapoursynth_autocrop-2.0-py3-none-macosx_10_15_x86_64.whl | Python 3 | none | macOS 10.15+ x86-64 | Details |
Total release size: 2.6 MB
Release files / vapoursynth_autocrop-2.0.tar.gz
| Download URL | vapoursynth_autocrop-2.0.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
546efc43ddb062de3a5fdd8ff371daae0e9942bfa1ca94afd9f9a2d6eadfb832
|
|
BLAKE2b-256 checksum How to use checksums |
18ad7272f085ccfa898984e1c8df71bf094113b441e2c0784886a1d2c0c30c7d
|
| 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 17, 2026.
Transparency logRelease files / vapoursynth_autocrop-2.0-py3-none-win_amd64.whl
| Download URL | vapoursynth_autocrop-2.0-py3-none-win_amd64.whl |
|---|---|
| Size | 139.8 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
03d1e52760d5bf459eaf77885ae5987686b543437ecfb5f588a0b2c9c223e4a6
|
|
BLAKE2b-256 checksum How to use checksums |
056324f29281afa845df6ac74b3fa14255c56195b370301dff1276c9afd56bea
|
| 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 17, 2026.
Transparency logRelease files / vapoursynth_autocrop-2.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | vapoursynth_autocrop-2.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
25f3f8abaf26784811ea0029b85e0b78e069324cfa0d2d47288ffe7ea6cf59cf
|
|
BLAKE2b-256 checksum How to use checksums |
eaff014d3a92ee5b76bb898a70f42bcde84c2648cfd00a83070bd9480673f6b4
|
| 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 17, 2026.
Transparency logRelease files / vapoursynth_autocrop-2.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | vapoursynth_autocrop-2.0-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 994.6 kB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
9360d19c9b0afb48e616c6d5a1f55251d7d59302ace6d966353288b265d40acc
|
|
BLAKE2b-256 checksum How to use checksums |
009500354b2ab29cf97f30154682a977527e60438d1d0cbba03bd9061fcc9c11
|
| 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 17, 2026.
Transparency logRelease files / vapoursynth_autocrop-2.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | vapoursynth_autocrop-2.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 176.1 kB |
| Tags | Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
766a556d47c2ff87eeb907a840e4bfd99e059441d681de81cb41c4430275667e
|
|
BLAKE2b-256 checksum How to use checksums |
364d160cd6b8f33ae35b47e799df152da1bec32b9215301ff55b4366779909f8
|
| 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 17, 2026.
Transparency logRelease files / vapoursynth_autocrop-2.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
| Download URL | vapoursynth_autocrop-2.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 164.3 kB |
| Tags | Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
c753e7a58aedeb5bba2a67f625f46f8d18c0b2658194dfdb788531dd4397952b
|
|
BLAKE2b-256 checksum How to use checksums |
502a6c997e5a578a3d1f6c49774b96bb69e8d7627c0d72a613346d626a894b5d
|
| 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 17, 2026.
Transparency logRelease files / vapoursynth_autocrop-2.0-py3-none-macosx_11_0_arm64.whl
| Download URL | vapoursynth_autocrop-2.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
335f1ad377a16974ff2116c4a6ffa946ed7fc339b7b0b06824656eeff340bacd
|
|
BLAKE2b-256 checksum How to use checksums |
79f267a6996a4e89df1d0171dd3df2cbde7108b6ef56f54453666b3045de2ded
|
| 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 17, 2026.
Transparency logRelease files / vapoursynth_autocrop-2.0-py3-none-macosx_10_15_x86_64.whl
| Download URL | vapoursynth_autocrop-2.0-py3-none-macosx_10_15_x86_64.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
b86e8e2008981f4158f5d9d1b9c5af82b90f5434ce75b4f463e3c8cda1137b2a
|
|
BLAKE2b-256 checksum How to use checksums |
ba3dd0139f48ccbde4b749d422e2d266c007bbc62eb8b7d83fff1c5f925d62b6
|
| 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 17, 2026.
Transparency log