Log in

View Full Version : lvsfunc: Light's VapourSynth functions


LightArrowsEXE
8th June 2022, 04:31
Figured I'd throw my hat in the ring and upload my function collection here too. It's been around for a couple of years and has been a rollercoaster the entire way.

Source code (https://github.com/Irrational-Encoding-Wizardry/lvsfunc) | Documentation (https://lvsfunc.encode.moe/en/latest/) | Support (https://discord.gg/qxTxVJGtst) | Issues (https://github.com/Irrational-Encoding-Wizardry/lvsfunc/issues)

"lvsfunc" is a multi-use function and wrapper collection aimed at offering a one-stop-shop for a lot of common operations used for anime encoding.
It's been slowly getting worked on over the years, and will be actively maintained for the foreseeable future.

lvsfunc, at the time of writing, contains the following sub-modules. For a list of all the functions contained in each sub-module, please consult the documentation.


Anti-aliasing (https://lvsfunc.encode.moe/en/latest/submodules/aa.html)
Comparison (and analysis) (https://lvsfunc.encode.moe/en/latest/submodules/comparison.html)
Deblocking (https://lvsfunc.encode.moe/en/latest/submodules/deblock.html)
Dehaloing and edgecleaning (https://lvsfunc.encode.moe/en/latest/submodules/dehalo.html)
Dehardsubbing (https://lvsfunc.encode.moe/en/latest/submodules/dehardsub.html)
Deinterlacing, IVTC, and decombing (https://lvsfunc.encode.moe/en/latest/submodules/deinterlace.html)
Custom exceptions (https://lvsfunc.encode.moe/en/latest/submodules/exceptions.html)
Mask generation (https://lvsfunc.encode.moe/en/latest/submodules/mask.html)
Miscellaneous (https://lvsfunc.encode.moe/en/latest/submodules/misc.html)
Denoising and graining (https://lvsfunc.encode.moe/en/latest/submodules/noise.html)
Chroma reconstruction (through regression) (https://lvsfunc.encode.moe/en/latest/submodules/recon.html)
Clip rendering (https://lvsfunc.encode.moe/en/latest/submodules/render.html)
Upscaling and descaling (https://lvsfunc.encode.moe/en/latest/submodules/scale.html)
Custom types (https://lvsfunc.encode.moe/en/latest/submodules/types.html)
Utility functions (https://lvsfunc.encode.moe/en/latest/submodules/util.html)


Installation is simple. Open up a terminal and write:
pip3 install lvsfunc
This will download the latest release version. For the "nightly" or upstream builds, you can run the following command in your terminal:
pip3 install git+https://github.com/Irrational-Encoding-Wizardry/lvsfunc.git

Almost all the functions in lvsfunc are available in the global scope. It's good practice to call them from their specific sub-module, but the ability to just call them directly is there.


import lvsfunc as lvf

example_a = lvf.deinterlace.tivtc_vfr()
example_b = lvf.tivtc_vfr()


Support is primarily given through the Irrational-Encoding-Wizardry discord server (linked above), but I figured having an additional place for users to leave behind ideas, issues, complaints, etc. would be a good idea.

I am also open to porting commonly-used AVS(+) scripts. If you have any requests, please leave a reply here or ideally in the dedicated issue (https://github.com/Irrational-Encoding-Wizardry/lvsfunc/issues/74).

Hope you enjoy using lvsfunc!

Kogarou
8th June 2022, 18:39
1st :cool:

unix
11th June 2022, 09:24
Thank you sir =)

LightArrowsEXE
12th July 2022, 00:58
v0.4.3 is out.

## What's Changed
* Minor updates by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/103
* Source: Fix d2v files not working by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/105
* Update vsdpir with new zones parameter, update typing by @Setsugennoao in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/106
* add downloads counter by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/107
* Fix doc typing by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/108
* chickendream: Update warning, make it so res is used by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/109
* Update workflows by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/112
* Fine dehalo update by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/113
* Minor fixes by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/114
* pick_rgvs/rgsf: Fix wrong plugin call by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/117
* Rfs updates by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/116
* ivtc_crdits: Rename to pulldown_credits by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/118
* Flake8 docstrings by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/119
* Deprecate .kernels in favour of vs-kernels by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/111
* Update get_matrix, other related updates by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/122
* source: Rewrite function by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/123
* Update matrices by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/124
* check_patterns: New function by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/125
* vsdpir: Fix strength clip size error by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/126
* vsdpir: Default args for Backend if not in kwargs by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/127
* source: tail_lines params, check if FILM/ORDER exists by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/128
* Fix vsmlrt stubs by @Setsugennoao in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/129
* Fix trim shift in replace_ranges by @Setsugennoao in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/132
* Rework and speed up vsdpir function by @Setsugennoao in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/130
* setsu made flake8 upset by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/134
* Update release.yml by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/136
* Source updates by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/137
* Doc updates electric boogaloo + bonus fixes by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/138
* Pre-v0.4.3 by @LightArrowsEXE in https://github.com/Irrational-Encoding-Wizardry/lvsfunc/pull/139


Full Changelog: https://github.com/Irrational-Encoding-Wizardry/lvsfunc/compare/v0.4.2...v0.4.3

LightArrowsEXE
5th February 2024, 11:29
A whole slew of changelogs now that I've regained access to my forum account (please for the love of god update the forum version question's answer, admins).

For the full list of changelogs, see 0.4.3..0.8.1 (https://github.com/Jaded-Encoding-Thaumaturgy/lvsfunc/compare/v0.4.3..v0.8.1).

The gist of it is that most things were adopted by vs-jet packages. lvsfunc now serves primarily as a testing ground and a location for functions that may not be high-quality but a number of people still insist on using for some reason. As such, it's recommended you install the git latest version (https://github.com/Jaded-Encoding-Thaumaturgy/lvsfunc?tab=readme-ov-file#how-to-install) if you still plan on using lvsfunc, but to not depend on it in any packages.

The list of functions/classes still available:


comparison

compare
Comparer
comparison_shots (NEW!)
diff
Interleave
Split
stack_compare
Stack
Tile

deblock

autodb_dpir

exceptions

ClipsAndNamedClipsError

export (NEW!)

export_frames (NEW!)
get_random_frames (NEW!)

fun

minecraftify

grain (NEW!)

dynamic_scene_adaptive_grain (NEW!)

hdcam (NEW!)

hdcam_dering (NEW!)

misc

overlay_sign

presets (NEW!)

MVLightPreset (NEW!)

util

colored_clips
convert_rfs
get_match_centers_scaling (NEW!)



Furthermore, there is a branch in the works that adds support for parsing Wobbly output, simulating wibbly, gathering metrics to use in your scripts, etc. This branch can be found here (https://github.com/Jaded-Encoding-Thaumaturgy/lvsfunc/tree/wobbly-parser/lvsfunc/wobbly).

The following functions/classes were moved or removed:


based_aa => vsaa.based_aa (https://github.com/Jaded-Encoding-Thaumaturgy/vs-aa/blob/master/vsaa/funcs.py)
clamp_aa => vsaa.clamp_aa (https://github.com/Jaded-Encoding-Thaumaturgy/vs-aa/blob/master/vsaa/funcs.py)
nnedi3 => vsaa.Nnedi3 (https://github.com/Jaded-Encoding-Thaumaturgy/vs-aa/blob/master/vsaa/antialiasers/nnedi3.py)
eedi3 => vsaa.Eedi3 (https://github.com/Jaded-Encoding-Thaumaturgy/vs-aa/blob/master/vsaa/antialiasers/eedi3.py)
taa => vsaa.tranpose_aa (https://github.com/Jaded-Encoding-Thaumaturgy/vs-aa/blob/master/vsaa/funcs.py)


^ This list will be updated later today ^

Docstrings will also soon see an overhaul to hopefully be more informative and better inform users how to use the function, including giving more visual examples where possible (using ASCII because of rendering limitations), as well as example uses, improved typing, and more in-depth parameter description.

Vapoursynth development is far from dead. However, we'd like user feedback to help make our (as in, JET (https://github.com/Jaded-Encoding-Thaumaturgy)'s) packages more accessible. Please leave your feedback here, or tell us in our support server.