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
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
A python interface for interacting with the Ethereum blockchain and ecosystem.

Web3.py A Python library for interacting with Ethereum, inspired by web3.js. Python 3.6+ support Quickstart Get started in 5 minutes or take a tour of

3.9k Jan 03, 2023
Many discord bots serving different purposes

Discord_Botlari Farklı amaçlara hizmet eden bir çok discord botu En kapsamlı Bot Game Bottur. bir oyun botudur discord sunucularında kullanılır. (tüm

1 Dec 21, 2021
A simple python discord bot with commands for moderation and utility.

Discord Bot A simple python discord bot with commands for moderation, utility and fun. Moderation $kick user reason - Kick a user from the server

syn 3 Feb 06, 2022
Python package and CLI for user-friendly integration with SAS Viya

sasctl A user-friendly Python interface for SAS Viya. Full documentation: https://sassoftware.github.io/python-sasctl Table of Contents Overview Prere

SAS Software 30 Dec 14, 2022
Cogs for Red-DiscordBot

matcha-cogs Cogs for Red-DiscordBot. Installation [p]repo add matcha-cogs

MatchaTeaLeaf 2 Aug 27, 2022
An advanced telegram country information finder bot.

Country-Info-Bot-V2 An advanced telegram country information finder bot Made with Python3 (C) @FayasNoushad Copyright permission under MIT License Lic

Fayas Noushad 16 Nov 12, 2022
An automated tool that fetches information about your crypto stake and generates historical data in time.

Introduction Yield explorer is a WIP! I needed a tool that would show me historical data and performance of my staked crypto but was unable to find a

Sedat Can Yalçın 42 Nov 26, 2022
Wakatime Response In javascript and python

Project Title Wakatime Response In javascript and python Description just for refrence Getting Started Dependencies For Python: requests json For Java

Gjenius20 1 Dec 31, 2021
Converts a text file of songs to a playlist on your Spotify account.

Playlist Converter Convert a text file of songs to a playlist on your Spotify account. Create your playlists faster instead of manually searching for

Priya Aggarwal 18 Dec 21, 2022
Finds Jobs on LinkedIn using web-scraping

Find Jobs on LinkedIn 📔 This program finds jobs by scraping on LinkedIn 👨‍💻 Relies on User Input. Accepts: Country, City, State 📑 Data about jobs

Matt 44 Dec 27, 2022
A discord bot that manages your server's hedge fund

Can't Hide Money Bot A discord bot that manages your server's hedge fund Installing Install wkhtmltopdf sudo apt-get install wkhtmltopdf OR brew insta

Kelvin Abrokwa-Johnson 0 Oct 16, 2021
rewise is an unofficial wrapper for google search's auto-complete feature

rewise is an unofficial wrapper for google search's auto-complete feature

Somdev Sangwan 71 Jul 19, 2022
Image-Bot-Discord - This Is a discord bot that shows the specific image you search from Google

Advanced Discord.py Image Bot CREDITS Made by RLX and Mathiscool README by Milrato Installation Guide in .env Adjust the TOKEN python main.py to start

RLX 3 Jan 16, 2022
Change the name and pfp of ur accounts, uses tokens.txt for ur tokens.

Change the name and pfp of ur accounts, uses tokens.txt for ur tokens. Also scrapes the pfps+names from a server chosen by you. For hq tokens go to discord.gg/tokenshop or t.me/praisetelegram

cChimney 36 Dec 09, 2022
❝𝐓𝐡𝐞 𝐌𝐨𝐬𝐭 𝐏𝐨𝐰𝐞𝐫𝐟𝐮𝐥𝐥 𝐆𝐫𝐨𝐮𝐩 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭 𝐁𝐨𝐭❞

❝𝐓𝐡𝐞 𝐌𝐨𝐬𝐭 𝐏𝐨𝐰𝐞𝐫𝐟𝐮𝐥𝐥 𝐆𝐫𝐨𝐮𝐩 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭 𝐁𝐨𝐭❞

Abdisamad Omar Mohamed 5 Jun 24, 2022
The elegance of Airflow + the power of AWS

Orkestra The elegance of Airflow + the power of AWS

Stephan Fitzpatrick 42 Nov 01, 2022
Georeferencing large amounts of data for free.

Geolocate Georeferencing large amounts of data for free. Special thanks to @brunodepauloalmeida and the whole team for the contributions. How? It's us

Gabriel Gazola Milan 23 Dec 30, 2022
AWS Glue PySpark - Apache Hudi Quick Start Guide

AWS Glue PySpark - Apache Hudi Quick Start Guide Disclaimer: This is a quick start guide for the Apache Hudi Python Spark connector, running on AWS Gl

Gabriel Amazonas Mesquita 8 Nov 14, 2022
How to make a QR Code of your own in python

QR CODE Bilgilendirme! " pip install qrcode pillow " kurmalısınız.

Aktali 1 Dec 24, 2021