vapoursynth-fftspectrum-rs
A faster FFT spectrum VapourSynth plugin.
Install
Via vsrepo:
vsrepo install fftspectrum_rs
Manually: download a release from the Releases page and unzip
fftspectrum_rs.dll (Windows), libfftspectrum_rs.so (Linux), or
libfftspectrum_rs.dylib (macOS) into a plugins directory.
API
fftspectrum_rs.FFTSpectrum(clip: vs.VideoNode) -> vs.VideoNode
clip— Input video node. Must have 32-bit float format.
Only the first plane of clip will be processed. The output is a GRAYS video
node.
Benchmark
On 1080p clips, this plugin is about 2.2 times faster than
fftspectrum.FFTSpectrum(). This is mostly accomplished by minimizing the
number of allocations, copies, and transposes done.
import numpy as np
from cv2 import DFT_COMPLEX_OUTPUT, dft
from vssource import BestSource
from vstools import core, depth, get_y, set_output, vs
core.set_affinity(range(0, 32, 2), 22000)
src = BestSource.source("/path/to/1080_clip.mkv", bits=0)
src_8 = depth(src, 8)
src_32 = depth(src, 32)
# fftspectrum
set_output(src_8.fftspectrum.FFTSpectrum(), "fftspectrum")
# numpy + ModifyFrame
def _to_polar(f: vs.VideoFrame, n: int) -> vs.VideoFrame:
src = np.asarray(f[0])
dft_shift = np.fft.fftshift(dft(src, flags=DFT_COMPLEX_OUTPUT))
mag = np.sqrt(np.power(dft_shift[:, :, 1], 2) + np.power(dft_shift[:, :, 0], 2))
dst = f.copy()
np.copyto(np.asarray(dst[0]), np.log(mag) / 10)
return dst
y = get_y(src_32)
set_output(y.std.ModifyFrame(y, _to_polar), "numpy ModifyFrame")
# fftspectrum_rs
set_output(src_32.fftspectrum_rs.FFTSpectrum(), "fftspectrum_rs")
$ hyperfine --warmup 1 'vspipe test.py --end 1999 -o {output_node} .' -P output_node 0 2
Benchmark 1: vspipe test.py --end 1999 -o 0 .
Time (mean ± σ): 31.878 s ± 0.853 s [User: 44.497 s, System: 1.592 s]
Range (min … max): 30.672 s … 33.681 s 10 runs
Benchmark 2: vspipe test.py --end 1999 -o 1 .
Time (mean ± σ): 62.379 s ± 1.839 s [User: 59.013 s, System: 22.801 s]
Range (min … max): 59.342 s … 64.992 s 10 runs
Benchmark 3: vspipe test.py --end 1999 -o 2 .
Time (mean ± σ): 13.909 s ± 0.146 s [User: 178.334 s, System: 18.904 s]
Range (min … max): 13.669 s … 14.166 s 10 runs
Summary
vspipe test.py --end 1999 -o 2 . ran
2.29 ± 0.07 times faster than vspipe test.py --end 1999 -o 0 .
4.48 ± 0.14 times faster than vspipe test.py --end 1999 -o 1 .
| Benchmark | Mean (fps) | Range (fps) |
|---|---|---|
| fftspectrum | 62.74 ± 1.68 | 59.38 … 65.21 |
| numpy ModifyFrame | 32.06 ± 0.95 | 30.77 … 33.70 |
| fftspectrum_rs | 143.79 ± 1.51 | 141.18 … 146.32 |
Build
Rust v1.91.0-nightly and cargo may be used to build the project. Older versions will likely work fine but they aren't explicitly supported.
$ git clone https://github.com/sgt0/vapoursynth-fftspectrum-rs.git
$ cd vapoursynth-fftspectrum-rs
# Debug build.
$ cargo build
# Release (optimized) build.
$ cargo build --release
# Release build optimized for the host CPU.
$ RUSTFLAGS="-C target-cpu=native" cargo build --release
Metadata
Release files for vapoursynth-fftspectrum-rs 1.0.13
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 | Actions |
|---|---|---|---|---|
| vapoursynth_fftspectrum_rs-1.0.13.tar.gz | 3.0 MB | With provenance | Details for vapoursynth_fftspectrum_rs-1.0.13.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| vapoursynth_fftspectrum_rs-1.0.13-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for vapoursynth_fftspectrum_rs-1.0.13-py3-none-win_amd64.whl |
| vapoursynth_fftspectrum_rs-1.0.13-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details for vapoursynth_fftspectrum_rs-1.0.13-py3-none-manylinux_2_28_x86_64.whl |
| vapoursynth_fftspectrum_rs-1.0.13-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details for vapoursynth_fftspectrum_rs-1.0.13-py3-none-manylinux_2_28_aarch64.whl |
| vapoursynth_fftspectrum_rs-1.0.13-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for vapoursynth_fftspectrum_rs-1.0.13-py3-none-macosx_11_0_arm64.whl |
Total release size: 4.6 MB
Release files / vapoursynth_fftspectrum_rs-1.0.13.tar.gz
| Download URL | vapoursynth_fftspectrum_rs-1.0.13.tar.gz |
|---|---|
| Size | 3.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd2347222d833d82ba8f3b4e4cf45aea6276b7c48e5c3eb510198520bf15ebe6
|
|
BLAKE2b-256 checksum How to use checksums |
13569771adfbc1195017e887142cf03253316efac3d21d2f7f10900bdcf628df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Apr 27, 2026.
Transparency logRelease files / vapoursynth_fftspectrum_rs-1.0.13-py3-none-win_amd64.whl
| Download URL | vapoursynth_fftspectrum_rs-1.0.13-py3-none-win_amd64.whl |
|---|---|
| Size | 388.3 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6413142fe9760f42739e450be67d1317a5762dcd2761f66bb68d710e03879300
|
|
BLAKE2b-256 checksum How to use checksums |
57927409c611b1e71fe2cba74d1a0bb0c8c31037f55de077b65545f493b81fdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Apr 27, 2026.
Transparency logRelease files / vapoursynth_fftspectrum_rs-1.0.13-py3-none-manylinux_2_28_x86_64.whl
| Download URL | vapoursynth_fftspectrum_rs-1.0.13-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 512.3 kB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
229738b5be3147cfdca9a1388c05c8f76e856a52a9b468f9e175970c7d83e4fc
|
|
BLAKE2b-256 checksum How to use checksums |
c0856551be73450110449ac509b9f36d33458e48875dcfc27e570dcf4cc2502f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Apr 27, 2026.
Transparency logRelease files / vapoursynth_fftspectrum_rs-1.0.13-py3-none-manylinux_2_28_aarch64.whl
| Download URL | vapoursynth_fftspectrum_rs-1.0.13-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 350.7 kB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
f6623874f4afa4cc24b853685c2c78d4e2e7e0028d54cb265764b1fbf174d978
|
|
BLAKE2b-256 checksum How to use checksums |
7eb21a7b2cba6454c422863c2a351e5533e3d5114b5711d70b86f72beddaeef0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Apr 27, 2026.
Transparency logRelease files / vapoursynth_fftspectrum_rs-1.0.13-py3-none-macosx_11_0_arm64.whl
| Download URL | vapoursynth_fftspectrum_rs-1.0.13-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 331.1 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
31772ed484ec60e1c85a4f60adb7c401d4c295a283935086910c6e656f6670d0
|
|
BLAKE2b-256 checksum How to use checksums |
bc3ff87efae03c8e204ff706ce04928979b53e48a91e4f498da98e6416b50d9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Apr 27, 2026.
Transparency logSecurity for vapoursynth-fftspectrum-rs 1.0.13
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 5 files in this release have been uploaded with provenance metadata.
Attestation for vapoursynth_fftspectrum_rs-1.0.13.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 Apr 27, 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.