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 mvfandr"INPUT" |> core.lsmas.LWLibavSource |> mvf.Depth$(depth=10) |> .set_output(). - vsoneliner by default imports
from vapoursynth import coreandimport vapoursynth as vs, but any additional imports have to be written manually, such asimport mvsfunc as mvfin 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 tomvf.Depth(core.lsmas.LWLibavSource(r"INPUT"), depth=10).set_output(). - vsoneliner saves the commands to a Python file with
.vpyfile 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--verboseargument, with which vsoneliner will also print the path to the file to stderr.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bf8c08927379ead0373c633fbdfeb77c62f769be73c363577814d436befdf7f
|
|
| MD5 |
1f7d0e06a85db84ba04ab8b3a34a62cf
|
|
| BLAKE2b-256 |
d98014e44b05260f33cbb3d100536ff23eeccbc7c07548093b83a31dbfd2a579
|
File details
Details for the file vsoneliner-0.0.2.post1-py3-none-any.whl.
File metadata
- Download URL: vsoneliner-0.0.2.post1-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
728c35ea0f1b2f2f96948b60b87de6274f21710cccecd6ad0790301fb86833e6
|
|
| MD5 |
22bdcc7ab5d34690ed5cfe231c459929
|
|
| BLAKE2b-256 |
ecb35201970596959fc82fb3ab920addb32ec388b37898f53caa30b4e589aa8f
|