A simple script for generating screenshots with Vapoursynth

Overview

Vapoursynth-Screenshots

A simple script for generating screenshots with Vapoursynth.


About

I'm lazy, and hate changing variables for each batch of screenshots I create. This script accepts input from the command line and generates screenshots using ScreenGen from the awsmfunc Vapoursynth script.

Included is a PowerShell wrapper script (all platforms) to make entering CLI arguments easier. Vapoursynth parses arguments from the global dictionary (so no argparse), which is pretty tedious to type. The PowerShell script gives you tab complete functionality and more input validation. It's optional - screenshots.vpy works just fine on it's own.

By default, screenshots are generated with character "tags", or letters that distinguish them and make them easy to sort. The script will check for existing tags and increment the characters so other screenshots in the same directory are not overwritten.


Dependencies


Tonemapping

If the input files are UHD, the script can tonemap them automatically using the tonemap plugin. Tonemapping algorithms:

  • Hable
  • Mobius
  • Reinhard

The default value is Mobius, but you can specify which one you want using the tonemap_type parameter. You can also specify the exposure (gain) for the screenshots using the exposure parameter.


Parameters

NOTE: PowerShell parameters are case insensitive, whereas Python's are not. Python parameters must be lowercase

Parameter Name Description
[-]source Path to the source file (or primary file)
[-]encode Path to the encode file (or secondary file)
[-]screenshots Optional path to screenshots. If one is not provided, the root of encode will be used
[-]frames A list of frame numbers for screenshots. Passed as a Python list, i.e. "[1,2,3,4]"
[-]offset Optional frame offset for test encodes
[-]title Title tag for frame info overlay. Applies to encodes. Default is "Encode"
[-]tonemap_type Tonemap algorithm to use (hable, mobius, reinhard). Default is mobius
[-]exposure Gain to apply to image. Default is 4.5

Examples

PowerShell

All PowerShell parameters can be used positionally. See Get-Help .\wrapper.ps1 or read the comments to see them all.

#Named parameters
PS > .\Wrapper.ps1 -Encode "C:\Path\file.mkv" -Encode "C:\Path\file2.mkv" `
                   -Frames 100,200,300 -Title "My Encode" -TonemapType hable
#Positional parameters
PS > .\Wrapper.ps1 "~/videos/source.mkv" "~/videos/encode.mkv" 100,200,300 "~/videos/screens" hable "My Encode"

VSPipe

#Pass parameters using --arg
~$ vspipe --arg "source=~/videos/source.mkv" --arg "encode=~/videos/encode.mkv" \
              --arg "frames=[100,200,300]" --arg "tonemap_type=hable" screenshots.vpy -
You might also like...
Hypothesis strategies for generating Python programs, something like CSmith

hypothesmith Hypothesis strategies for generating Python programs, something like CSmith. This is definitely pre-alpha, but if you want to play with i

A multi purpose password managing and generating tool called Kyper.

Kyper A multi purpose password managing and generating tool called Kyper. Setup The setup for Kyper is fairly simple only involving the command python

A tool for generating skill map/tree like diagram
A tool for generating skill map/tree like diagram

skillmap A tool for generating skill map/tree like diagram. What is a skill map/tree? Skill tree is a term used in video games, and it can be used for

Python script to commit to your github for a perfect commit streak. This is purely for education purposes, please don't use this script to do bad stuff.

Daily-Git-Commit Commit to repo every day for the perfect commit streak Requirments pip install -r requirements.txt Setup Download this repository. Cr

A script where you execute a script that generates a base project for your gdextension

GDExtension Project Creator this is a script (currently only for linux) where you execute a script that generates a base project for your gdextension,

Simple python script for AD enumeration
Simple python script for AD enumeration

AutoAD - Simple python script for AD enumeration This tool was created on my spare time to help fellow penetration testers in automating the basic enu

A simple script that can watch a list of directories for change and does some action
A simple script that can watch a list of directories for change and does some action

plot_watcher A simple script that can watch a list of directories and does some action when a specific kind of change happens In its current implement

A simple script that shows important photography times. written in python.
A simple script that shows important photography times. written in python.

A simple script that shows important photography times. written in python.

Comments
Owner
null
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
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
An ultra fast cross-platform multiple screenshots module in pure Python using ctypes.

Python MSS from mss import mss # The simplest use, save a screen shot of the 1st monitor with mss() as sct: sct.shot() An ultra fast cross-platfo

Mickaël Schoentgen 799 Dec 30, 2022
A simple Python script for generating a variety of hashes from safe urandom entropy.

Hashgen A simple Python script for generating a variety of hashes from safe urandom entropy. For whenever you need a random hash (e.g. generating an a

Xanspie 1 Feb 17, 2022
Islam - This is a simple python script.In this script I have written all the suras of Al Quran. As a result, by using this script, you can know the number of any sura at the moment.

Introduction: If you want to know sura number of al quran by just typing the name of sura than you can use this script. Usage in termux: $ pkg install

Fazle Rabbi 1 Jan 2, 2022
Python library for generating CycloneDX SBOMs

Python Library for generating CycloneDX This CycloneDX module for Python can generate valid CycloneDX bill-of-material document containing an aggregat

CycloneDX SBOM Standard 31 Dec 16, 2022
This program is meant to take the pain out of generating nice bash PS1 prompts.

TOC PS1 Installation / Quickstart License Other Docs Examples PS1 Command Help PS1 ↑ This program is meant to take the pain out of generating nice bas

Steven Hollingsworth 6 Jun 19, 2022
Generating rent availability info from Effort rent

Rent-info Generating rent availability info from Effort rent Pre-Installation Latest version of python Pip module json, os, requests, datetime, time i

Laixuan 1 Oct 20, 2021
A NetBox Plugin that gives a UI for generating, comparing and deploying configurations to devices.

netbox_config_plugin - A plugin to generate, compare and deploy configurations This plugin allows you to execute your code to generate a config for a

Jo 11 Dec 21, 2022
A feed generator. Currently supports generating RSS feeds from Google, Bing, and Yahoo news.

A feed generator. Currently supports generating RSS feeds from Google, Bing, and Yahoo news.

Josh Cardenzana 0 Dec 13, 2021