Skip to main content

Commandline program for creating Python script for VSPipe

Project description

vsoneliner

vsoneliner generates VapourSynth script file for VSPipe from commandline. It is for the situation where only the simplest VapourSynth script is needed, and where writing and keeping a script file becomes cumbersome.

Install vsoneliner:

python -m pip install vsoneliner

An Example of using vsoneliner using fish shell:

INPUT=(realpath "input.mkv") vspipe (python -m vsoneliner "import mvsfunc as mvf" "r\"$INPUT\" |> core.lsmas.LWLibavSource |> mvf.Depth\$(depth=10) |> .set_output()") -c y4m - | x264 --demuxer y4m --output "output.mkv" -

Excerpt:

python -m vsoneliner "import mvsfunc as mvf" "r\"$INPUT\" |> core.lsmas.LWLibavSource |> mvf.Depth\$(depth=10) |> .set_output()"
  • Each positional argument to vsoneliner corresponds to one line in the resulting Python script. In this example, we have two lines: import mvsfunc as mvf and r"INPUT" |> core.lsmas.LWLibavSource |> mvf.Depth$(depth=10) |> .set_output().
  • vsoneliner by default imports from vapoursynth import core and import vapoursynth as vs, but any additional imports have to be written manually, such as import mvsfunc as mvf in the example.
  • vsoneliner accepts Coconut language in the commandline. Coconut language's syntax is a strict superset of Python, which means if you don't want to learn it, you can write vanilla Python code and it will work just fine. Here in this example, r"INPUT" |> core.lsmas.LWLibavSource |> mvf.Depth$(depth=10) |> .set_output() transpiles to mvf.Depth(core.lsmas.LWLibavSource(r"INPUT"), depth=10).set_output().
  • vsoneliner saves the commands to a Python file with .vpy file extension and then print the path to the file to stdout before exiting. Use $() in a POSIX shell to feed this file to vspipe. vsoneliner also accepts --verbose argument, with which vsoneliner will also print the path to the file to stderr.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vsoneliner-0.0.2.post1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vsoneliner-0.0.2.post1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file vsoneliner-0.0.2.post1.tar.gz.

File metadata

  • Download URL: vsoneliner-0.0.2.post1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for vsoneliner-0.0.2.post1.tar.gz
Algorithm Hash digest
SHA256 6bf8c08927379ead0373c633fbdfeb77c62f769be73c363577814d436befdf7f
MD5 1f7d0e06a85db84ba04ab8b3a34a62cf
BLAKE2b-256 d98014e44b05260f33cbb3d100536ff23eeccbc7c07548093b83a31dbfd2a579

See more details on using hashes here.

File details

Details for the file vsoneliner-0.0.2.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for vsoneliner-0.0.2.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 728c35ea0f1b2f2f96948b60b87de6274f21710cccecd6ad0790301fb86833e6
MD5 22bdcc7ab5d34690ed5cfe231c459929
BLAKE2b-256 ecb35201970596959fc82fb3ab920addb32ec388b37898f53caa30b4e589aa8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page