Log in

View Full Version : vspreview-rs - minimal VapourSynth script previewer


quietvoid
1st March 2022, 01:08
Made myself a previewer as the existing ones are too complicated to use.
It existed for a while but I just rewrote it because the previous version was broken.

https://i.ibb.co/Y3mGckM/00demo-thumb.jpg (https://raw.githubusercontent.com/quietvoid/vspreview-rs/main/assets/00demo.jpg)

Link: https://github.com/quietvoid/vspreview-rs
Releases: https://github.com/quietvoid/vspreview-rs/releases

Built using egui and vapoursynth-rs, so in Rust.
Cross platform, Linux (X11 and Wayland) and Windows tested.

Only Windows binaries are available as others depend on too many things.
Recommended to just build with Rust.

The current bindings are limited to API 3.6, but it should still work with VS R57.
Eventually I hope to be able to update the Rust VS bindings to support API4.

Features:
- Convenient keybindings
- Simple UI
- Fast enough for most use cases

The goal is to keep it simple, but I'll probably add some useful features as long as they're not too obstrusive.
In the end, this is just supposed to render an image and allow moving/zooming. No super fancy stuff.

Some stuff copied from the README (https://github.com/quietvoid/vspreview-rs).
You can see more information about the UI here: in the documentation (https://github.com/quietvoid/vspreview-rs/blob/main/UI.md).


The togglable GUI includes information about the clip as well as interactive controls.
Also, frame props are easily accessible.

Main parts of the UI:
- A window with the current state, including access to frame props and settings.
- A bottom panel with a slider to change frame quickly, as well as the clip info.
- An error window for VapourSynth messages or errors while rendering.

Keybindings

Moving around the image/clip:

- Seek 1 frame: Right, Left
- Seek 1 second: Down, Up
- Alternative seeking: H, J, K, L
- Change outputs: Num1 to Num0
- Outputs must be from 0-9
- Zoom: Ctrl + Scroll wheel
- Ctrl + Up/Down for 0.1 zoom increments
- Scroll horizontally: Home/End or Shift + Scroll wheel
- Scroll vertically: PageUp/PageDown, Scroll wheel

Misc
- Close: Escape, Q
- Show GUI: I (toggle)
- Reload script: R
- Take a screenshot: S (saves to script directory)
- Copy the current frame number to clipboard: Ctrl + Shift + C

Zarxrax
12th March 2022, 04:25
This is a nice tool. Now I can preview a script directly from Notepad++.
What does the Output setting do? Is that for if you have multiple monitors or something?

Gintoki Sakata
14th March 2022, 10:59
This is a nice tool. Now I can preview a script directly from Notepad++.
What does the Output setting do? Is that for if you have multiple monitors or something?

You can set multiple outputs in VapourSynth. The output setting dropout allows you to easily switch between them.


Documentation link: http://www.vapoursynth.com/doc/pythonreference.html#output

MysteryX
15th March 2022, 04:13
Anyone wants to add this to the Linux AUR?

quietvoid
15th March 2022, 23:45
I'm not sure of the exact dependencies required, so there's no AUR package.
Making your own PKGBUILD should be straightforward, though.

quietvoid
10th April 2022, 02:41
Released v0.1.2: https://github.com/quietvoid/vspreview-rs/releases/tag/0.1.2


Added context menu on right click
- Open a new script
- About menu
Added ICC profile color correction, using lcms2. See Transforms section in Preferences.

Bug fixes

- Fixed MDCV BT.2020 primaries detection in props.
- Added error on invalid/inexistent input script file.