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
Dodo - A graphical, hackable email client based on notmuch

Dodo Dodo is a graphical email client written in Python/PyQt5, based on the comm

Aleks Kissinger 44 Nov 12, 2022
A simple bot to upload file to various cloud servers.

Cloudsy Bot A simple bot to upload file to various cloud servers. Variables API_HASH Your API Hash from my.telegram.org API_ID Your API ID from my.tel

Flying Santas 8 Oct 31, 2022
Quickly edit your slack posts.

Lightning Edit Quickly edit your Slack posts. Heavily inspired by @KhushrajRathod's LightningDelete. Usage: Note: Before anything, be sure to head ove

Cole Wilson 14 Nov 19, 2021
A wrapper for the Discord Python Pixels API.

DPYPX A simple wrapper around Python Discord Pixels. Requires Python 3.7+ (3.x where x = 7). Requires pillow and aiohttp from pip. Example import dpy

Artemis 3 Oct 01, 2022
Trabalho N1 para a materia Tecnicas de Progamação da Anhembi Morumbi

Projeto da Anhembi Morumbi - Tecnicas de Programação. RPG de Console (CMD) Trabalho proposto pelo professor André Santana, na materia Tecnicas de Prog

Leonardo Silva M de Barros 3 Sep 12, 2021
Ever wanted a dashboard for making your antispam? This is it.

Ever wanted a dashboard for making your antispam? This is it.

Skelmis 1 Oct 27, 2021
Automation application was made by me using Google, Sheet and Slack APIs with Python.

README This application is used to transfer the data in the xlsx document we have to the Google Drive environment and calculate the "total budget" wit

3 Apr 12, 2022
Telegram Bot to Connect Strangers

Telegram Bot to Connect Strangers How to Run Set your telegram bot token as environment variable TELEGRAM_BOT_TOKEN: export TELEGRAM_BOT_TOKEN=your_t

PyTopia 12 Dec 24, 2022
Discord bots that update their status to the price of any coin listed on x.vite.net

Discord bots that update their status to the price of any coin listed on x.vite.net

5am 3 Nov 27, 2022
A demo without 🚀 science, just simple UTXO spending logic.

Stuck TX Demo Docker container that runs 4 dogecoind to demonstrate "the stuck tx problem". Scenario A wallet sends out 3 transactions to a recipient

Patrick Lodder 2 Nov 16, 2021
allow windows programs to call dssp/mkdssp command from wsl; rework biopython on windows (PDB -> dssp -> fasta)

dssp-wsl Converting PDB (Protein Data Bank) file format to DSSP file format is required for generating datasets of peptides and their secondary struct

Taine Zhao 1 Feb 23, 2022
Crosschat - A bot for cross-server communication

CrossChat A bot for cross-server communication. Running the bot To run the bot y

8 May 15, 2022
Mailjet API implementation in Python

READ THIS FIRST!! This repository isn't compatible with the current Mailjet API (v3) and, as a consequence, is considered deprecated and won't undergo

Rick van Hattem 18 Oct 21, 2022
Follow pixiv account from twitter profile

Follow pixiv account from twitter profile

Genshi 7 Apr 11, 2022
Mventory is an API-driven solution for Makerspaces, Tinkerers, and Hackers.

Mventory is an API-driven inventory solution for Makers, Makerspaces, Hackspaces, and just about anyone else who needs to keep track of "stuff".

Make Monmouth 107 Dec 21, 2022
SpautiNoFay - A simple and beautiful music player created with Python

SpautiNoFay A simple and beautiful music player created with Python Why SpautiNo

8 Jan 19, 2022
Python Client for Yandex Cloud Logging

Python Client for Yandex Cloud Logging Installation pip3 install python-yandex-cloud-logging Creating a Yandex Cloud Logging Group yc logging group c

MCode 0 Dec 08, 2021
un outil pour bypasser les code d'états HTTP négatif coté client ( 4xx )

4xxBypasser un outil pour bypasser les code d'états HTTP négatif coté client ( 4xx ) Liscence : MIT license Creator Installation : git clone https://g

21 Dec 25, 2022
Discord Voice Channel Automatic Online

Discord-Selfbot-voice Features: Discord Voice Channel Automatic Online FAQ Q: How can I obtain my token? A: 1. How to obtain your token in android 2.

Pranav Ajay 3 Oct 31, 2022
Polars-fun - Example notebooks for how to use pola.rs

polars-fun Polars is an awesome Rust DataFrame library with Python language bindings. This repo makes it easy to run Polars code on your local machine

Matthew Powers 2 Jun 28, 2022