#video #bindings #vapoursynth #vsscript


Safe Rust wrapper for VapourSynth and VSScript

5 unstable releases

Uses old Rust 2015

0.3.0 Oct 22, 2019
0.2.0 Jun 16, 2018
0.1.2 Apr 2, 2018
0.1.1 Mar 24, 2018
0.1.0 Mar 11, 2018

#28 in Video

Download history 14/week @ 2020-05-22 11/week @ 2020-05-29 16/week @ 2020-06-05 12/week @ 2020-06-12 17/week @ 2020-06-19 9/week @ 2020-06-26 17/week @ 2020-07-03 6/week @ 2020-07-10 12/week @ 2020-07-17 13/week @ 2020-07-24 8/week @ 2020-07-31 8/week @ 2020-08-07 20/week @ 2020-08-14 19/week @ 2020-08-21 19/week @ 2020-08-28 18/week @ 2020-09-04

77 downloads per month
Used in ssb_filter


41K SLoC

C++ 24K SLoC // 0.1% comments C 8K SLoC // 0.1% comments Rust 5K SLoC // 0.0% comments Visual Studio Project 2K SLoC Python 1K SLoC // 0.2% comments Pascal 288 SLoC // 0.0% comments Batch 270 SLoC Visual Studio Solution 167 SLoC Automake 157 SLoC Shell 22 SLoC


crates.io Documentation Travis Build Status AppVeyor Build Status


Documentation for the master branch with all features enabled

A safe wrapper for VapourSynth, written in Rust.

The primary goal is safety (that is, safe Rust code should not trigger undefined behavior), and secondary goals include performance and ease of use.


Most of the VapourSynth API is covered. It's possible to evaluate .vpy scripts, access their properties and output, retrieve frames; enumerate loaded plugins and invoke their functions as well as create VapourSynth filters.

For an example usage see examples/vspipe.rs, a complete reimplementation of VapourSynth's vspipe in safe Rust utilizing this crate.

For a VapourSynth plugin example see sample-plugin which implements some simple filters.


crates.io Documentation


Raw bindings to VapourSynth.

Supported Versions

All VapourSynth and VSScript API versions starting with 3.0 are supported. By default the crates use the 3.0 feature set. To enable higher API version support, enable one of the following Cargo features:

  • vapoursynth-api-31 for VapourSynth API 3.1 (R26)
  • vapoursynth-api-32 for VapourSynth API 3.2 (R27)
  • vapoursynth-api-33 for VapourSynth API 3.3 (R30)
  • vapoursynth-api-34 for VapourSynth API 3.4 (R30)
  • vapoursynth-api-35 for VapourSynth API 3.5 (R38)
  • vapoursynth-api-36 for VapourSynth API 3.6 (R47)
  • vsscript-api-31 for VSScript API 3.1
  • vsscript-api-32 for VSScript API 3.2

To enable linking to VapourSynth or VSScript functions, enable the following Cargo features:

  • vapoursynth-functions for VapourSynth functions (getVapourSynthAPI())
  • vsscript-functions for VSScript functions (vsscript_*())


Make sure you have the corresponding libraries available if you enable the linking features. You can use the VAPOURSYNTH_LIB_DIR environment variable to specify a custom directory with the library files.

On Windows the easiest way is to use the VapourSynth installer (make sure the VapourSynth SDK is checked). The crate should pick up the library directory automatically. If it doesn't or if you're cross-compiling, set VAPOURSYNTH_LIB_DIR to <path to the VapourSynth installation>\sdk\lib64 or <...>\lib32, depending on the target bitness.


Licensed under either of

at your option.