Previewer for VapourSynth scripts.

Overview

Standalone previewer for VapourSynth scripts

Fork of Endilll's vapoursynth-preview (not maintained anymore)

This program is meant to be paired with a code editor with integrated terminal like Visual Studio Code.

Prerequisites

  1. Python (3.9+ required)
    • Make sure to install Python to your PATH.
  2. Vapoursynth (R57+ required)

Note: If you're on Python 3.10, you'll need VapourSynth R58.

Installation and usage

pip install -U git+https://github.com/Irrational-Encoding-Wizardry/vs-preview.git

It can then be used by running vspreview script.vpy or your preferred way in your IDE.

IDE Integration

Comments
  • Latest version fails to start

    Latest version fails to start

    Steps:

    I updated to the latest version using pip install -U git+https://github.com/Irrational-Encoding-Wizardry/vs-preview.git --user

    Issue:

    Upon trying to load vspreview with any vpy script, or even running vspreview --help or vspreview --version, I receive a crash with the following backtrace:

    Traceback (most recent call last):
      File "C:\Users\jholm\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "C:\Users\jholm\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "C:\Users\jholm\AppData\Local\Programs\Python\Python310\Scripts\vspreview.exe\__main__.py", line 4, in <module>
      File "C:\Users\jholm\AppData\Roaming\Python\Python310\site-packages\vspreview\__init__.py", line 1, in <module>
        from .init import main  # noqa: F401
      File "C:\Users\jholm\AppData\Roaming\Python\Python310\site-packages\vspreview\init.py", line 18, in <module>
        from .main import MainSettings, MainWindow
      File "C:\Users\jholm\AppData\Roaming\Python\Python310\site-packages\vspreview\main\__init__.py", line 3, in <module>
        from .window import *  # noqa: F401, F403
      File "C:\Users\jholm\AppData\Roaming\Python\Python310\site-packages\vspreview\main\window.py", line 26, in <module>
        from ..toolbars import Toolbars
      File "C:\Users\jholm\AppData\Roaming\Python\Python310\site-packages\vspreview\toolbars\__init__.py", line 12, in <module>
        from .main import MainToolbar
      File "C:\Users\jholm\AppData\Roaming\Python\Python310\site-packages\vspreview\toolbars\main\__init__.py", line 1, in <module>
        from .toolbar import *  # noqa: F401, F403
      File "C:\Users\jholm\AppData\Roaming\Python\Python310\site-packages\vspreview\toolbars\main\toolbar.py", line 13, in <module>
        from .dialog import FramePropsDialog
      File "C:\Users\jholm\AppData\Roaming\Python\Python310\site-packages\vspreview\toolbars\main\dialog.py", line 57, in <module>
        } | dict([
      File "C:\Users\jholm\AppData\Roaming\Python\Python310\site-packages\vspreview\toolbars\main\dialog.py", line 58, in <listcomp>
        _create_enum_props_lut(enum, name)
      File "C:\Users\jholm\AppData\Roaming\Python\Python310\site-packages\vspreview\toolbars\main\dialog.py", line 25, in _create_enum_props_lut
        pretty_name: {
      File "C:\Users\jholm\AppData\Roaming\Python\Python310\site-packages\vspreview\toolbars\main\dialog.py", line 26, in <dictcomp>
        idx: enum.from_param(idx).pretty_string if enum.is_valid(idx) else 'Invalid'
      File "C:\Users\jholm\AppData\Local\Programs\Python\Python310\lib\enum.py", line 437, in __getattr__
        raise AttributeError(name) from None
    AttributeError: is_valid
    

    I am on Windows 11 with Vapoursynth r61 and Python 3.10.

    opened by shssoichiro 3
  • Add more previewer dithering modes

    Add more previewer dithering modes

    Sometimes it may be desired to preview with ordered dithering, or even no dithering at all. An option to configure this with ease would be very convenient.

    enhancement Gui 
    opened by wiwaz 3
  • Remember old comps

    Remember old comps

    It might be nice to store the name and url of older comps in the local storage to find it back easily. You can force an update once the upload is finished, and this way users can easily find them back. Especially useful if you're unfortunate like me and the previewer often crashes directly after it's done. :(

    I'd set a limit to it, though. Probably 5 comps saved by default until it starts overwriting them to avoid it from getting too busy (with a setting allowing that to be changed?)

    enhancement 
    opened by LightArrowsEXE 3
  • 10-bit display detection

    10-bit display detection

    There's an error message for the bit depth detection: QPixmap: QGuiApplication must be created before calling defaultDepth(). When the GUI instance is not ready, the function returns zero.

    bug 
    opened by YomikoR 2
  • Frame Props dialog shows BT.709 Primaries as Unspecified

    Frame Props dialog shows BT.709 Primaries as Unspecified

    Gotta admit this is a weird one, because I checked the code and the primaries are indeed in the correct order in the list vspreview has.

    The issue I'm seeing is that, when opening the Frame Props dialog for a script where _Primaries is set to 1, the Frame Props dialog shows "Unspecified" instead of the expected "BT.709". Matrix and Transfer properties display correctly, and all other Primaries except BT.709 also display correctly.

    opened by shssoichiro 2
  • Save window geometry in global instead of local storage

    Save window geometry in global instead of local storage

    This is potentially related to #21, but I wasn't sure how much it overlapped so decided to create a new issue.

    I think the common workflow is that most people want to have their vspreview window in the same location for each video file they're working on, rather than having it reset to the default location for each new file. Having to move the window each time is a minor annoyance rather than a significant issue, but it would be more convenient, in my opinion, to have the geometry saved globally rather than per file.

    bug enhancement 
    opened by shssoichiro 2
  • Vspreview crashes when saving image

    Vspreview crashes when saving image

    Traceback (most recent call last):
      File "C:\Users\light\AppData\Local\Programs\Python\Python310\lib\site-packages\vspreview\toolbars\misc\toolbar.py", line 183, in on_save_frame_as_clicked
        heuristics = video_heuristics(self.main.current_output.source.clip, props, string_only=True)
    TypeError: video_heuristics() got an unexpected keyword argument 'string_only'
    

    This error seems to stem from vstools.

    def video_heuristics(clip: vs.VideoNode, props: vs.FrameProps | None = None, prop_in: bool = True) -> dict[str, int]:
        ...
    
    opened by LightArrowsEXE 1
  • Crash when pressing (un)mute button when there's no audio track

    Crash when pressing (un)mute button when there's no audio track

    This should probably throw a warning, but not flat-out crash vspreview.

    Traceback (most recent call last):
      File "C:\Users\light\AppData\Local\Programs\Python\Python310\lib\site-packages\vspreview\toolbars\playback\toolbar.py", line 530, in on_mute_clicked
        self.setMute(not self.audio_muted)
      File "C:\Users\light\AppData\Local\Programs\Python\Python310\lib\site-packages\vspreview\toolbars\playback\toolbar.py", line 537, in setMute   
        self.play_audio()
      File "C:\Users\light\AppData\Local\Programs\Python\Python310\lib\site-packages\vspreview\toolbars\playback\toolbar.py", line 259, in play_audio
        self.current_audio_frame = self.current_audio_output.to_frame(
    AttributeError: 'NoneType' object has no attribute 'to_frame'
    
    bug 
    opened by LightArrowsEXE 1
  • Add --frame CLI arg for seeking to a specified frame on load

    Add --frame CLI arg for seeking to a specified frame on load

    I had a use case for this as part of a script to find the frame with the most out-of-range pixels in a video, and then display it. My hope is that it might be useful to someone else as well.

    opened by shssoichiro 0
  • Fix a crash that occurs when opening a second file within a workspace

    Fix a crash that occurs when opening a second file within a workspace

    I'm not certain exactly what triggered this scenario, but the situation that occurred is that self.current_output is an attribute on the class that self is, and that attribute is set to None. hasattr returns True because there is an attribute on self called current_output, even though it is None.

    opened by shssoichiro 0
  • Draft: Write Sphinx documentation

    Draft: Write Sphinx documentation

    TODO

    Make pages for the following:

    • [ ] Basic usage for beginners
    • [ ] Different toolbars
    • [ ] Different viewmodes

    Other:

    More suggestions welcome

    documentation enhancement 
    opened by LightArrowsEXE 0
  • Button to find scene changes

    Button to find scene changes

    A neat feature may be to, when you click a button, run wwxd/scxvid on the current output node and iterate over the entire clip. Alternatively, a helper function the user can import that allows you to pass a clip and an enum determining the mode (wwxd, scxvid, both, etc. Check the old lvsfunc or vsencode code for one such example, I forgot which one has it).

    Additionally, hotkeys to jump from scene to scene might be neato as well if they do not exist yet. If they do, the user can just use those binds.

    opened by LightArrowsEXE 0
  • Fix recent Scening toolbar and workflow issues

    Fix recent Scening toolbar and workflow issues

    This fixes the following crash scenarios:

    • Hovering cursor on timeline scene notch.
    • Browsing to new frames while there are listed scenes.
    • Editing scene properties in the scene list dialog despite no scene selected.

    It also fixes the scene label not being added for single-frame scenes. Some of these issues were caused by the PyQt6 refactor, but a couple were present beforehand.

    Fixes Irrational-Encoding-Wizardry/vs-preview#62.

    opened by JustinTArthur 0
  • Fix crash when Frame Props dialog is cleared during output switching.

    Fix crash when Frame Props dialog is cleared during output switching.

    Crash was due to sub-layouts being included in the layout's items being iterated and sub-layouts don't contain a singular widget. Sub-layouts are now removed, cleared, and deleted. Widgets removed from the layout are deleted as before.

    widget.deleteLater() will remove the parent relationship automatically so widget.setParent(None) is unnecessary.

    Fixes Irrational-Encoding-Wizardry/vs-preview#63

    opened by JustinTArthur 0
  • Crash when switching between output nodes with Frame Props dialog.

    Crash when switching between output nodes with Frame Props dialog.

    QLayout::removeWidget: Cannot remove a null widget.
    Traceback (most recent call last):
      File "vspreview/main/window.py", line 557, in switch_output
        self.switch_frame(self.current_output.last_showed_frame)
      File "vspreview/main/window.py", line 530, in switch_frame
        toolbar.on_current_frame_changed(frame)
      File "vspreview/toolbars/main/toolbar.py", line 146, in on_current_frame_changed
        self.frame_props_dialog.update_frame_props(self.main.current_output.props)
      File "vspreview/toolbars/main/dialog.py", line 117, in update_frame_props
        self.framePropsVLayout.clear()
      File "vspreview/core/abstracts.py", line 106, in clear
        widget.setParent(None)  # type: ignore
    AttributeError: 'NoneType' object has no attribute 'setParent'
    
    opened by JustinTArthur 0
  • Scene Tool Crashing

    Scene Tool Crashing

    Hello when i tried to use it it crashes with two crashes.

    CRASH: Traceback (most recent call last):
      File "C:\Program Files\Python310\lib\site-packages\vspreview\toolbars\scening\dialog.py", line 150, in on_label_changed
        index = self.tableview.selectionModel().selectedRows()[0]
    IndexError: list index out of range
    

    NEW CRASH:

    Traceback (most recent call last):
      File "C:\Program Files\Python310\lib\site-packages\vspreview\main\timeline.py", line 272, in mouseMoveEvent
        QToolTip.showText(event.globalPosition(), notch.label)
    TypeError: showText(QPoint, str, widget: QWidget = None, rect: QRect = {}, msecShowTime: int = -1): argument 1 has unexpected type 'QPointF' 
    
    
    opened by Jumaron 1
  • Video is always scaled when Windows DPI scaling is enabled

    Video is always scaled when Windows DPI scaling is enabled

    Per the title, I've noticed that in recent versions (using latest version from PyPi as of 12/28, about 10 minutes ago), vspreview's video output* is now automatically scaled when Windows DPI scaling is enabled, and I can't find a way to disable it (I have fiddled with the DPI option in settings, too, to no effect). This means that unless I disable DPI scaling in Windows, I can't view my filterchain without vspreview's scaling. A workaround would be greatly appreciated.

    ** Edit: I'm dumb, setting a custom zoom level allows bypassing this. Just assumed it'd be upscaled and then downscaled.

    opened by dixie-flatliner 0
Releases(v0.3.9)
  • v0.3.9(Dec 16, 2022)

  • v0.3.1(Dec 7, 2022)

    What's Changed

    • bump tag exists action version by @mukunku in https://github.com/Irrational-Encoding-Wizardry/vs-preview/pull/43
    • Update package and dependencies by @Setsugennoao in https://github.com/Irrational-Encoding-Wizardry/vs-preview/pull/47
    • Add timecodes logic, set_timecodes by @Setsugennoao in https://github.com/Irrational-Encoding-Wizardry/vs-preview/pull/49
    • Use vsengine by @Setsugennoao in https://github.com/Irrational-Encoding-Wizardry/vs-preview/pull/52

    Full Changelog: https://github.com/Irrational-Encoding-Wizardry/vs-preview/compare/v0.2.9...v0.3.1

    Source code(tar.gz)
    Source code(zip)
  • v0.2.9(Oct 17, 2022)

  • v0.2.7(Jul 31, 2022)

  • v0.2.6(Jun 17, 2022)

    Small update for view modes, but mostly for nicer code

    • Swap the fft switch for a view mode combox
    • Add rfs style scening import
    • View mode caching fix
    • Fix clip titles being overridden at each new frame rendered
    • Fix oob last showed frame
    • Fix None title for VideoOutput
    • Lots of documentation!
    • Normalize ranges when importing from vsedit bookmarks
    • Fix global storage not getting loaded when local storage is missing and overriding it with defaults
    Source code(tar.gz)
    Source code(zip)
    vspreview-0.2.6-py3-none-any.whl(100.40 KB)
  • v0.2.5(Jun 1, 2022)

    Some bug fixes and regression fixes

    • Document shortcuts
    • Sync frames when switching view modes
    • Continue playback after switching view modes
    • Add keybind 'SHIFT + F' to switch to FFTSpectrum view mode
    • Fix to_rgb regression, not dithering output
    • Fix Transfer in Frame Props appearing as 'UnspecifiedReserved'
    • Fix possible crash on GraphicsView when triggering a mouse button release event without having a press event before
    Source code(tar.gz)
    Source code(zip)
    vspreview-0.2.5b-py3-none-any.whl(99.90 KB)
  • v0.2.4(May 29, 2022)

    Woo! First release on GitHub Changes from v0.2.3a0 are:

    UI/UX:

    • Add color management (on Windows)
    • Add copy button to pipette
    • Add ViewModes
      • FFTSpectrum

    Development:

    • Update dependencies
      • Make numpy hard dep
      • Add vsengine
      • Add vsdfft
    • A lot of code cleanup

    From the last version of Endilll's original fork, this is the non exaustive list of changes:

    • VapourSynth APIv4, Python 3.10 support
    • Lots of bugfix and crash fix
    • No more memory leaks
    • Faster playback, memory sharing issues fixed
    • AUDIO SUPPORT!
    • Settings
      • Custom settings for toolbars like zoom levels for the main one
    • Auto-fit zoom button
    • Global settings storage
    • Frame Props tab viewer
    • Faster reloading
    • Fix reloading while in playback
    • Faster storage saving
    • "Minimap", drag navigator like VSEdit
    • Respect cursor position when zooming in and out
    • Set initial position of window
    • VFR Support
    • Crop assistant like VSEdit
    • "From end list" modifier when switching outputs
    • Comp toolbar
    • Rework on misc toolbar
    • New filetypes supported for importing scenes
    • Support for long clips (1+ days)
    • Added a --vscode-setup command
    • Cache pipette frames, much faster now

    ...and many more things I forgot!

    Source code(tar.gz)
    Source code(zip)
    vspreview-0.2.4-py3-none-any.whl(99.69 KB)
Owner
Irrational Encoding Wizardry
A bunch of autists making encodes better for muggles.
Irrational Encoding Wizardry
This script will detect changes in your session using Discords built in Gateway.

Detect Session Gateway This script will detect changes in your session using Discords built in Gateway. What does this log? Discord build version Oper

Omega 5 Dec 18, 2021
Modified Version Of Media Search bot

Modified Version Of Media Search bot

1 Oct 09, 2021
The Main Pythonic Version Of Twig Using Nextcord

The Main Pythonic Version Of Twig Using Nextcord

8 Mar 21, 2022
Demo of using Telegram to send alert message

MIAI_Telegram Demo of using Telegram to send alert message Video link: https://youtu.be/oZ9CsIrlMgg #MìAI Fanpage: http://facebook.com/miaiblog Group

4 Jun 20, 2021
Embed the Duktape JS interpreter in Python

Introduction Pyduktape is a python wrapper around Duktape, an embeddable Javascript interpreter. On top of the interpreter wrapper, pyduktape offers e

Stefano 78 Dec 15, 2022
TM1py is a Python package that wraps the TM1 REST API in a simple to use library.

By wrapping the IBM Planning Analytics (TM1) REST API in a concise Python framework, TM1py facilitates Python developments for TM1. Interacting with T

Cubewise CODE 147 Dec 15, 2022
Wedding website for July 2022.

Capstone Project: a real wedding website! User Stories A user should be able to signup for the website A user should be able to login to the website i

1 Nov 04, 2021
A Python Library to Make Quote Images

Quote2Image A Python Library to Make Quote Images How To Use? Download The Latest Package From Releases Extract The Zip File And Place Every File In I

Secrets 28 Dec 30, 2022
wrapper for facebook messenger

pyfacebook pyfacebook library for python. Requirements common Help Got a question? File a GitHub issue. Contributing Bug Reports & Feature Requests Pl

Luis Mayta 3 Nov 12, 2021
WhatsApp Status Tracker With Python

Warning!! This Repo is Purly educational purpose Don't use this to stalk on others, which is subjective to crime Pre-Req: Telegram bot of your own wit

Vignesh Karunagaran 10 Dec 09, 2022
Use Node JS Keywords In Python!!!

Use Node JS Keywords In Python!!!

Sancho Godinho 1 Oct 23, 2021
A tool that helps keeping track of your AWS quota utilization

aws-quota-checker A tool that helps keeping track of your AWS quota utilization. It'll determine the limits of your AWS account and compare them to th

Max 63 Dec 14, 2022
Sielzz Music adalah proyek bot musik telegram, memungkinkan Anda memutar musik di telegram grup obrolan suara.

Hi, I am: Requirements 📝 FFmpeg NodeJS nodesource.com Python 3.8 or higher PyTgCalls MongoDB Get STRING_SESSION from below: 🎖 History Features 🔮 Th

1 Nov 29, 2021
Python SDK for 42DI

42di Python SDK Install pip install git+https://github.com/42di/python-sdk import import di #42di import pandas_datareader as pdr Init SDK project =

42DI 2 Nov 03, 2021
Grape - A webbrowser with its own Search Engine

Grape 🔎 A Web Browser made entirely in python. Search Engine 🔎 Installation: F

Grape 2 Sep 06, 2022
The wrapper you need for the osu!api v2

oppy (op.py) oppy is the wrapper for use on the osu! v2 API. Version 1.0.0 Installation To install please use pip to install oppy pip install op.py To

Wayde 2 May 01, 2022
Build better AWS infrastructure

Sceptre About Sceptre is a tool to drive AWS CloudFormation. It automates the mundane, repetitive and error-prone tasks, enabling you to concentrate o

sceptre 1.4k Jan 04, 2023
Telegram bot with various Sticker Tools

Sticker Tools Bot @Sticker_Tools_Bot A star ⭐ from you means a lot to us! Telegram bot with various Sticker Tools Usage Deploy to Heroku Tap on above

Stark Bots 20 Dec 08, 2022
Telegram bot for logistic - Telegram bot for logistic

Демонстрационный телеграм-бот для нужд транспортной компании Цель проекта Реализ

M1chigun 1 Feb 05, 2022
Notion API Database Python Implementation

Python Notion Database Notion API Database Python Implementation created only by database from the official Notion API. Installing / Getting started p

minwook 78 Dec 19, 2022