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
A Python Tumblr API v2 Client

PyTumblr Installation Install via pip: $ pip install pytumblr Install from source: $ git clone https://github.com/tumblr/pytumblr.git $ cd pytumblr $

Tumblr 677 Dec 21, 2022
Easy to use API Wrapper for somerandomapi.ml.

Overview somerandomapi is an API Wrapper for some-random-api.ml Examples Asynchronous from somerandomapi import Animal

Myxi 1 Dec 31, 2021
Connects to a local SenseCap M1 Helium Hotspot and pulls API Data.

sensecap_api_checker_HELIUM Connects to a local SenseCap M1 Helium Hotspot and pulls API Data.

Lorentz Factr 1 Nov 03, 2021
RP2 is a privacy-focused, free, open-source US cryptocurrency tax calculator

Privacy-focused, free, open-source cryptocurrency US tax calculator, up to date for 2021: it handles multiple coins/exchanges and computes long/short-term capital gains, cost bases, in/out lot relati

eprbell 123 Jan 04, 2023
A python wrapper for interacting with the LabArchives API.

LabArchives API wrapper for Python A python wrapper for interacting with the LabArchives API. This very simple package makes it easier to make arbitra

Marek Cmero 3 Aug 01, 2022
Fetch Flipkart product details including name, price, MRP and Stock details in general as well as specific to a pincode

Fetch Flipkart product details including name, price, MRP and Stock details in general as well as specific to a pincode

Vishal Das 6 Jul 11, 2022
Instrument asyncio Python for distributed tracing with AWS X-Ray.

xraysink (aka xray-asyncio) Extra AWS X-Ray instrumentation to use distributed tracing with asyncio Python libraries that are not (yet) supported by t

Gary Donovan 12 Nov 10, 2022
This repository contains free labs for setting up an entire workflow and DevOps environment from a real-world perspective in AWS

DevOps-The-Hard-Way-AWS This tutorial contains a full, real-world solution for setting up an environment that is using DevOps technologies and practic

Mike Levan 1.6k Jan 05, 2023
A basic template for Creating Odoo Module

Odoo ERP Boilerplate A basic template for Creating Odoo Module. Folders inside this repository consist of snippet code and a module example. Folders w

Altela Eleviansyah Pramardhika 1 Feb 06, 2022
AWS EC2 S3 Automated With python

AWS_EC2_S3_Automated Description This programme is a Python3 script that utilizes Boto3 to automate the process of creating an AWS EC2 instance with a

niall_crowe 2 Nov 16, 2021
Leakvertise is a Python open-source project which aims to bypass these fucking annoying captchas and ads from linkvertise, easily

Leakvertise Leakvertise is a Python open-source project which aims to bypass these fucking annoying captchas and ads from linkvertise, easily. You can

Quatrecentquatre 9 Oct 06, 2022
Discord Mass Edit is a unique, purging related Discord tool that differs from the regular mass delete.

Discord Mass Edit is a unique, purging related Discord tool that differs from the regular mass delete. This tool will automatically edit every message in a chosen channel and change it to a random st

c0mpt0 1 Jul 27, 2022
This very basic script can be used to automate COVID-19 vaccination slot booking on India's Co-WIN Platform.

COVID-19 Vaccination Slot Booking Script This very basic CLI based script can be used to automate covid vaccination slot booking on Co-WIN Platform. I

605 Dec 14, 2022
ro.py is a modern, asynchronous Python 3 wrapper for the Roblox API.

GitHub | Discord | PyPI | Documentation | Examples | License Overview Welcome to ro.py! ro.py is an asynchronous, object-oriented wrapper for the Robl

ro.py 81 Dec 26, 2022
Terminal-Trade(Panel API) For Binance

Binance-Trade-Project Binance Futures Terminal-Trade(API) & Binance This Project Worth Around 500 Bucks. **I Did This Project For SomeOne And He

Cyber 9 Dec 30, 2021
Cogs for Red-DiscordBot

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

MatchaTeaLeaf 2 Aug 27, 2022
This discord bot will help you to control your target through PickleC2

PickleC2-Bot This discord bot will help you to control your target through PickleC2 WHAT's a PickleC2? PickleC2 is a simple C2 framework written in py

4 Jun 25, 2022
IACR Events Scraper

IACR Events Scraper This scrapes https://iacr.org/events/ and exports it as a calendar file. I host a version of this for myself under https://arrrr.c

Karolin Varner 6 May 28, 2022
a Music bot for discord

Bot this is a discord bot made by AnHalfGuy.py#6031(ID: 747864072879603743) and HastagStopAnimalAbuse#5617(ID :349916852308279306) This Bot Is For Mus

A Discord Bot Development 1 Oct 29, 2021
Trading bot - A Trading bot With Python

Trading_bot Trading bot intended for 1) Tracking current prices of tokens 2) Set

Tymur Kotkov 29 Dec 01, 2022