Skip to main content

VapourSynth plugin for working with digitized analog video signals

Project description

vapoursynth-analog

VapourSynth source and filters plugin for working with digitized analog video and signals.

See documentation for full details including API reference.

High-level Python API

If installed as a Python distribution (e.g. with pip), the vsanalog Python module wraps the plugin's lower-level API with a type-hinted interface that loads the plugin automatically.

The primary function provided by the high-level API is vsanalog.decode_4fsc_video(…), which decodes 4𝑓𝑠𝑐-sampled analog video signals to digital video clips. It reads time-base-corrected captures from ld-decode and vhs-decode then returns YUV444PS (32-bit float) for color decodes, GRAYS for monochrome.

Example:

import vapoursynth as vs
import vsanalog
import vsdeinterlace  # from vsjetpack

src = vsanalog.decode_4fsc_video(
    './Sources/my_home_video.luma.tbc',
    './Sources/my_home_movie.chroma.tbc',
    decoder='ntsc3d'
)
editable = src.resize.Point(format=vs.YUV444P16)
deinterlaced = vsdeinterlace.QTempGaussMC(editable).deinterlace()
deinterlaced.set_output(0)

Low-level VapourSynth Plugin API

Whether installed as a Python distribution or if the plugin library is dropped in a VapourSynth plugins directory, the plugin exposes a namespace named analog available on the vapoursynth.core object. Example:

import vapoursynth as vs
src = vs.core.analog.decode_4fsc_video(
  'my_big_production.tbc',
  dropout_correct=True
)
editable = src.resize.Point(format=vs.YUV444P16)
field_match_ref = src.resize.Point(format=vs.YUV444P8)
field_matched = field_match_ref.vivtc.VFM(clip2=editable)
detelecined = field_matched.vivtc.VDecimate()

Installing

The simplest way to install is via pip into a Python environment such as a venv:

pip install vsanalog

This installs both the native plugin and a Python module with type-hinted wrappers like vsanalog.decode_4fsc_video. The plugin is automatically loaded when you use the Python module.

Alternatively, obtain or build the plugin for your operating system and place vsanalog.dll, vsanalog.dylib, or vsanalog.so into your VapourSynth plugins directory. You'll need the following runtime dependencies:

  • VapourSynth (>= R55)
  • Qt6 (Core module)
  • FFTW3
  • SQLite3

Implementation Notes

Signal decoding functionality comes from ld-decode-tools’ ld-chroma-decoder. This was done to take advantage of great work already done on that project including the composite video separation/transformation decode processes, which would have been hard to replicate.

Using ld-decode-tools’ code directly (in a submodule here) forces a few design decisions:

  • To ease legal distribution of this plugin, I must make this project available under the GPL 3 license or one that’s compatible.
  • ld-chroma-decoder’s code relies on QtCore and Qt’s SQLite plugin which would make them dependencies. I had a machine learning model write a pure SQLite alternative to the JSON to SQLite metadata sidecar converter. By avoiding Qt’s SQLite plugin, the plugin is less likely to cause crashes from a symbol collision with another linked Qt such as PyQt’s when using vspreview.

Machine learning (Claude Opus 4.5 model) was heavily leveraged in the early development of this plugin to reduce the tedium of gluing the various components together.

Alternatives

  • jsaowji’s ldzeug2 is an excellent alternative VapourSynth video source for TBC files and provides neural network approaches to separating composited luma and chroma components—something that vapoursynth-analog doesn’t have. It moves more 4𝑓𝑠𝑐 processing to the Python domain for flexible scripting opportunities. It focuses on composite NTSC, ST 170, and Japan format signals.
  • ld-decode-tools comes with an ld-chroma-decoder tool to decode TBC files to component R′G′B′ or Y′Cb′Cr′ stream output for use in command line workflows and an ld-dropout-correct tool for generating a pre-corrected intermediate based on upstream dropout detection.
  • tbc-video-export is a convenient wrapper around ld-chroma-decoder and ffmpeg for producing digital video files from TBC files. It’s handy if you need to deliver a lossless interlaced intermediate to someone else for filtering or color grading.

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

vsanalog-0.2.3.tar.gz (96.7 MB view details)

Uploaded Source

Built Distributions

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

vsanalog-0.2.3-py3-none-win_amd64.whl (3.8 MB view details)

Uploaded Python 3Windows x86-64

vsanalog-0.2.3-py3-none-manylinux_2_34_aarch64.whl (19.2 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ ARM64

vsanalog-0.2.3-py3-none-manylinux_2_28_x86_64.whl (20.0 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

vsanalog-0.2.3-py3-none-macosx_15_0_x86_64.whl (6.1 MB view details)

Uploaded Python 3macOS 15.0+ x86-64

vsanalog-0.2.3-py3-none-macosx_14_0_arm64.whl (5.3 MB view details)

Uploaded Python 3macOS 14.0+ ARM64

File details

Details for the file vsanalog-0.2.3.tar.gz.

File metadata

  • Download URL: vsanalog-0.2.3.tar.gz
  • Upload date:
  • Size: 96.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vsanalog-0.2.3.tar.gz
Algorithm Hash digest
SHA256 5852dbeab596ee753ae97043645f416de4f0d33e69deac583d78c06503610913
MD5 fbcadaaf956cbfe26029ad0e1b9c9369
BLAKE2b-256 b64d1dfe7bda864709e4a5b95762a3b66e6c1c32fd6d91a6da3f3e944ad6a67b

See more details on using hashes here.

Provenance

The following attestation bundles were made for vsanalog-0.2.3.tar.gz:

Publisher: build.yml on JustinTArthur/vapoursynth-analog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vsanalog-0.2.3-py3-none-win_amd64.whl.

File metadata

  • Download URL: vsanalog-0.2.3-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vsanalog-0.2.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 f0531416f7c6e0e347132f5a23d546a842adb65930740b65655e81348884bb69
MD5 86419e3261bd5b7e59e1580f33955ef7
BLAKE2b-256 d5a9126ebbae171d085f494ba5c1e721c4b77209a056e55345dc96a8b0dc0acf

See more details on using hashes here.

Provenance

The following attestation bundles were made for vsanalog-0.2.3-py3-none-win_amd64.whl:

Publisher: build.yml on JustinTArthur/vapoursynth-analog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vsanalog-0.2.3-py3-none-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for vsanalog-0.2.3-py3-none-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 c6adec48b9ca0143d53746387e01a47397161ae5413feaee6cf93cbf01efc3ca
MD5 fd1a34d44b6efb492e6b666d8fb5bda2
BLAKE2b-256 ecc305ccbe0a19b9aaa998657286dad720032292a0567040afdbebeda00ef0c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for vsanalog-0.2.3-py3-none-manylinux_2_34_aarch64.whl:

Publisher: build.yml on JustinTArthur/vapoursynth-analog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vsanalog-0.2.3-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vsanalog-0.2.3-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 959e978bd1874a1eeee0c338afac860a74f23f6033617b1f8d3e34c29bed671d
MD5 77de433a1f118572421192d2b31984f1
BLAKE2b-256 65f4b263138fe4096a592a3c817b34ffdbbc7ffe1b6edfafd67cba4848c9059e

See more details on using hashes here.

Provenance

The following attestation bundles were made for vsanalog-0.2.3-py3-none-manylinux_2_28_x86_64.whl:

Publisher: build.yml on JustinTArthur/vapoursynth-analog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vsanalog-0.2.3-py3-none-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for vsanalog-0.2.3-py3-none-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 52abe423efdb53820ebe4e9194e97f4d45f0270761f716e3e52db41ed4e26ce8
MD5 12d78b5af0a6b9b43b61c994dbf829f9
BLAKE2b-256 264df7c6611f934fa2c981541f78e878e49bda1114fbe4940b6aa27342419641

See more details on using hashes here.

Provenance

The following attestation bundles were made for vsanalog-0.2.3-py3-none-macosx_15_0_x86_64.whl:

Publisher: build.yml on JustinTArthur/vapoursynth-analog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vsanalog-0.2.3-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for vsanalog-0.2.3-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 7b8f75de95318fab3bf02c4e2f21b6331d714b4de08d19b6c103237ab4d14205
MD5 238725226fd9becd10a975f0da4a63cd
BLAKE2b-256 60fc9dbdc4572c5b82f1615942dbd1ba17ae944427bffc7a5476f0253e032bce

See more details on using hashes here.

Provenance

The following attestation bundles were made for vsanalog-0.2.3-py3-none-macosx_14_0_arm64.whl:

Publisher: build.yml on JustinTArthur/vapoursynth-analog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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