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
Stop writing scripts to interact with your APIs. Call them as CLIs instead.

Zum Stop writing scripts to interact with your APIs. Call them as CLIs instead. Zum (German word roughly meaning "to the" or "to" depending on the con

Daniel Leal 84 Nov 17, 2022
This is a simple collection of instructions and scripts to accompany the computerphile video about mininet and openflow.

How to get going. This project should work on Linux or MacOS. I used Ubuntu 20.04 and provide some notes here. Note, this is certainly not intended as

Richard G. Clegg 70 Jan 2, 2023
Light weight Scripts and Apps for checking availability of Covid Vaccines in India. Notifies when vaccine becomes avialable in your area.

vaccine-checker Light weight Scripts and Apps for checking availability of Covid Vaccines in India. Notifies when vaccine becomes avialable in your ar

Abishek V Ashok 8 Jun 16, 2021
A collection of scripts to steal BTC from Lightning Network enabled custodial services. Only for educational purpose! Share your findings only when design flaws are fixed.

Lightning Network Fee Siphoning Attack LN-fee-siphoning is a collection of scripts to subtract BTC from Lightning Network enabled custodial services b

Reckless_Satoshi 14 Oct 15, 2022
A collection of scripts to steal BTC from Lightning Network enabled custodial services. Only for educational purpose! Share your findings only when design flaws are fixed.

Lightning Network Fee Siphoning Attack LN-fee-siphoning is a collection of scripts to subtract BTC from Lightning Network enabled custodial services b

Reckless_Satoshi 14 Oct 15, 2022
Scripts to help you win the Pizza Express

Slice of the Prizes Slice of the Prizes is a Python Script designed to enter the "Slice of the Action" competition hosted by Pizza Express the competi

Luke Bendall 1 Nov 4, 2021
Prisma Cloud utility scripts, and a Python SDK for Prisma Cloud APIs.

pcs-toolbox Prisma Cloud utility scripts, and a Python SDK for Prisma Cloud APIs. Table of Contents Support Setup Configuration Script Usage CSPM Scri

Palo Alto Networks 34 Dec 15, 2022
🔮 A usefull set of scripts to dig into your Discord data package.

Discord DataExtractor ?? Discord DataExtractor is a set of scripts that allows you to dig into your Discord Data package. Repository guide ☕ Coffee_Ga

null 3 Dec 29, 2021
A tool to build scripts to toggle between minimal & default services in Windows based on user defined lists.

A tool to build scripts to toggle between minimal & default services in Windows based on user defined lists.

AMIT 29 Jan 1, 2023
Irenedao-nft-generator - Original scripts used to generate IreneDAO NFTs

IreneDAO NFT Generator Scripts to generate IreneDAO NFT. Make sure you have Pill

libevm 60 Oct 27, 2022
BasicVSR++ function for VapourSynth

BasicVSR++ BasicVSR++: Improving Video Super-Resolution with Enhanced Propagation and Alignment Ported from https://github.com/open-mmlab/mmediting De

Holy Wu 34 Nov 28, 2022
Image Restoration Using Swin Transformer for VapourSynth

SwinIR SwinIR function for VapourSynth, based on https://github.com/JingyunLiang/SwinIR. Dependencies NumPy PyTorch, preferably with CUDA. Note that t

Holy Wu 11 Jun 19, 2022
Using image super resolution models with vapoursynth and speeding them up with TensorRT

vs-RealEsrganAnime-tensorrt-docker Using image super resolution models with vapoursynth and speeding them up with TensorRT. Also a docker image since

null 4 Aug 23, 2022
Using VapourSynth with super resolution models and speeding them up with TensorRT.

VSGAN-tensorrt-docker Using image super resolution models with vapoursynth and speeding them up with TensorRT. Using NVIDIA/Torch-TensorRT combined wi

null 111 Jan 5, 2023
A simple script for generating screenshots with Vapoursynth

Vapoursynth-Screenshots A simple script for generating screenshots with Vapoursynth. About I'm lazy, and hate changing variables for each batch of scr

null 7 Dec 31, 2022
Collection of functions for working with interlaced content in VapourSynth.

vsfieldkit Collection of functions for working with interlaced content in VapourSynth. It does not have any hard dependencies outside of VapourSynth.

Justin Turner Arthur 11 May 27, 2022
A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.

PyArmor Homepage (中文版网站) Documentation(中文版) PyArmor is a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine

Dashingsoft 1.9k Jan 1, 2023
A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.

PyArmor Homepage (中文版网站) Documentation(中文版) PyArmor is a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine

Dashingsoft 1.9k Dec 30, 2022
SCTYMN is a GitHub repository that includes some simple scripts(currently only python scripts) that can be useful.

Simple Codes That You Might Need SCTYMN is a GitHub repository that includes some simple scripts(currently only python scripts) that can be useful. In

CodeWriter21 2 Jan 21, 2022
generate HPC scheduler systems jobs input scripts and submit these scripts to HPC systems and poke until they finish

DPDispatcher DPDispatcher is a python package used to generate HPC(High Performance Computing) scheduler systems (Slurm/PBS/LSF/dpcloudserver) jobs in

DeepModeling 23 Nov 30, 2022