YaLTeR / vapoursynth-rs

A safe Rust wrapper for VapourSynth.
Apache License 2.0
31 stars 8 forks source link

vapoursynth-rs

crates.io Documentation Actions Status

ChangeLog

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.

Functionality

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.

vapoursynth-sys

crates.io Documentation

ChangeLog

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:

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

Building

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.

License

Licensed under either of

at your option.