Description
Bifrost is a temporal derainbowing filter created by Fredrik Mellbin.
The original Avisynth plugin (version 1.1) worked on the whole frame or not at all. This version works on blocks, meaning that static parts of the image can be processed even if something moves on screen.
The VapourSynth plugin will accept any 8 to 16 bit integer YUV format. The Avisynth plugin is still limited to YV12.
Usage
bifrost.Bifrost(clip clip[, clip altclip=clip, float luma_thresh=10.0, int variation=5, bint conservative_mask=False, bint interlaced=True, int blockx=4, int blocky=4])
altclip
Bifrost will copy from this clip the chroma of the blocks it can’t process. This allows moving blocks to be processed with some other filter. altclip must have the same format, dimensions and length as clip.
luma_thresh
Blocks where the luma changes less than this are considered static and may be processed.
variation
Controls how big a chroma change must be in order to be considered a rainbow. Increasing this can reduce false positives.
Note: luma_thresh and variation are given in 8 bit sample units and are scaled to the clip’s bit depth internally, so the same values behave the same way at any depth.
conservative_mask
If true, only pixels detected as rainbows will be processed. Otherwise, pixels that have rainbows above and below them will also be processed.
interlaced
If true, SeparateFields, DoubleWeave and SelectEvery will be invoked in order to process the top and bottom fields separatedly.
blockx
blocky
The dimensions of the blocks. Smaller is probably better. The default 4×4 should be good enough. They must be a multiple of the clip’s subsampling, at least two chroma samples wide and tall, and no larger than the frame.
Note: If the dimensions of the image aren’t divisible by blockx and blocky, the right and/or bottom edges won’t be processed. The chroma of those edges is copied from altclip, same as for any other block Bifrost can’t process.
Types of rainbows
When dealing with telecined material you must determine if the rainbows were added before or after the telecine process. Find a scene with clearly visible rainbows and use the following:
src = your.Source() separated = std.SeparateFields(src) even = std.SelectEvery(separated, 2, 0)
If the rainbows change every frame, they were added after telecine. If there is a duplicate every five frames, they were added before.
Rainbows added before telecine
First you must fix the telecine, then use Bifrost in progressive mode:
ret = d2v.Source("rainbows1.d2v")
ret = vivtc.VFM(ret, order=1, chroma=False, mchroma=False)
ret = vivtc.VDecimate(ret, chroma=False)
ret = bifrost.Bifrost(ret, interlaced=False)
Rainbows added after telecine
In this case, Bifrost should be used in interlaced mode, right after the source filter:
ret = d2v.Source("rainbows2.d2v")
ret = bifrost.Bifrost(ret, interlaced=True)
# ivtc here
Installation
pip install vapoursynth-bifrost
Compilation
Requires Meson >= 1.2.3 and a C++17 compiler. VapourSynth must be installed and importable by the Python that Meson finds, because the include path is queried with vapoursynth.get_include(). That same interpreter also decides where the plugin installs (<site-packages>/vapoursynth/plugins).
meson setup build ninja -C build
If you have several Python installations, point Meson at the right one with a native file containing:
[binaries] python = '/path/to/python'
and passing --native-file to meson setup.
To build a wheel instead:
python -m build
DLLs for Avisynth 2.5.8+ can be found in the “releases” section.
License
The license is WTFPL; see the LICENSE file.
Metadata
Release files for vapoursynth-bifrost 4.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 | Provenance | |
|---|---|---|---|---|
| vapoursynth_bifrost-4.0.tar.gz | 12.3 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| vapoursynth_bifrost-4.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_x86_64.whl | Python 3 | none | Linux musl 1.2+ x86-64 | Details |
| vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_aarch64.whl | Python 3 | none | Linux musl 1.2+ ARM64 | Details |
| vapoursynth_bifrost-4.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_bifrost-4.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.24+ ARM64, Linux glibc 2.28+ ARM64 | Details |
| vapoursynth_bifrost-4.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| vapoursynth_bifrost-4.0-py3-none-macosx_10_15_x86_64.whl | Python 3 | none | macOS 10.15+ x86-64 | Details |
Total release size: 2.7 MB
Release files / vapoursynth_bifrost-4.0.tar.gz
| Download URL | vapoursynth_bifrost-4.0.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f90612df4aa3a111a1fd6607efe1951afba4867ac6623281054702cded426c0b
|
|
BLAKE2b-256 checksum How to use checksums |
2c1b6820b3f14fb53332b3a38553820fc54d08b5891b814d094a422b1e0d87e4
|
| 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 Aug 18, 2026.
Transparency logRelease files / vapoursynth_bifrost-4.0-py3-none-win_amd64.whl
| Download URL | vapoursynth_bifrost-4.0-py3-none-win_amd64.whl |
|---|---|
| Size | 210.2 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8d30dd3c99b09b71c470486440a2143d02a01f05eb5d9760126289692b9dc7fa
|
|
BLAKE2b-256 checksum How to use checksums |
d501863a55724fd35b175e571b20946736717852e7c8ed6ed7a10462c9f76a5b
|
| 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 Aug 18, 2026.
Transparency logRelease files / vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
12b3f8342b2ebc10eb2951f517d250881d43f334dd675f2ef9204b811c26a410
|
|
BLAKE2b-256 checksum How to use checksums |
17356d6c3179ae22a6e8c4d2b357b80cf02eb6e2aecc29d27b9b16f04911166f
|
| 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 Aug 18, 2026.
Transparency logRelease files / vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 999.3 kB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
57aecf36d3df0aad4d0ab8172d665372423cabd7170078ac65f2ae12a5bf20ae
|
|
BLAKE2b-256 checksum How to use checksums |
2f5f8a05429e0c037c952da7b77120a8c47a8303b4694aabb8cce8cfa1be1980
|
| 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 Aug 18, 2026.
Transparency logRelease files / vapoursynth_bifrost-4.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | vapoursynth_bifrost-4.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 182.2 kB |
| Tags | Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
f0144ea7596aa0bfcd9780da0a8979a3a150b4552bd8364d93111be090ba52b9
|
|
BLAKE2b-256 checksum How to use checksums |
8ce1a40673957ecfb50254a34ce4f172d3f3e602785bdc5a461a683479279f00
|
| 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 Aug 18, 2026.
Transparency logRelease files / vapoursynth_bifrost-4.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
| Download URL | vapoursynth_bifrost-4.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 168.9 kB |
| Tags | Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
9a33bc0f47b68a2d39595c4232976051aabe386908d3b3d46661a254e00d7ca7
|
|
BLAKE2b-256 checksum How to use checksums |
2d3a93a170fd2ac83726952af4e1405582134ef08ac8daa0831096d3508312be
|
| 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 Aug 18, 2026.
Transparency logRelease files / vapoursynth_bifrost-4.0-py3-none-macosx_11_0_arm64.whl
| Download URL | vapoursynth_bifrost-4.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1d535817d9902f5b8caa7114d8d8238eb7b702e5e56972f4b88ea2b9e7efdcb8
|
|
BLAKE2b-256 checksum How to use checksums |
9f161261814ab0d021ea442cf60fb6a4a258e048a024d896991dd448c0f98ea8
|
| 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 Aug 18, 2026.
Transparency logRelease files / vapoursynth_bifrost-4.0-py3-none-macosx_10_15_x86_64.whl
| Download URL | vapoursynth_bifrost-4.0-py3-none-macosx_10_15_x86_64.whl |
|---|---|
| Size | 18.5 kB |
| Tags | Python 3 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
1add287386313c9a984f161e8976e28db3f0d0365f82d4ca965f4c4fa327464e
|
|
BLAKE2b-256 checksum How to use checksums |
3b3469433b62177d410a58f48cc9d20d4c421430f88c5084747fa40f0b0a2494
|
| 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 Aug 18, 2026.
Transparency logSecurity for vapoursynth-bifrost 4.0
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 8 files in this release have been uploaded with provenance metadata.
Attestation for vapoursynth_bifrost-4.0.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 Aug 18, 2026.
Transparency logA 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.