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 (or rather, one exec) 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.tar.gz (3.2 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-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vsoneliner-0.0.2.tar.gz
  • Upload date:
  • Size: 3.2 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.tar.gz
Algorithm Hash digest
SHA256 70e3a3af45936cb87a3fde02b52e86128d03826588acc2e24a7ed5ba719f063e
MD5 9065ef5244f270726ff1d33b40d567fd
BLAKE2b-256 c0f8d47d21b6504eca056488abc6730609525d0d037b09fa186d201f86abdb45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vsoneliner-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for vsoneliner-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a62f0fa4f209ea68e637238d7d51dc4ff4173d8d20df10b4075ae44ccd8062d7
MD5 acf3acd55b9588a54d39681ea4892d22
BLAKE2b-256 8a890870397e3bf3d72fffe290a73b445e7553005231c89cd08fe1b39e7c1c0f

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