Skip to main content

Blackmagic RAW (.braw) source plugin for VapourSynth — batteries included (bundles the Blackmagic RAW runtime)

Project description

brawsource (beta)

Dual VapourSynth / AviSynth+ source plugin for Blackmagic RAW (.braw), written in Zig against the official Blackmagic RAW SDK (CPU decode). Frame-exact random access, audio, frame properties from clip/frame metadata.

  • VapourSynth: braw.Source + braw.AudioSource — Linux, Windows, macOS (x64/arm64)
  • AviSynth+: BRAWSource (video + audio track) — Windows x64

sample.braw decoded in VS View, frame properties from the clip metadata

Runtime

The plugin loads the Blackmagic RAW runtime at run time. The release zips are batteries-included: they ship the runtime in a blackmagic_win_deps / blackmagic_linux_deps / blackmagic_mac_deps folder next to the plugin — extract into your plugin directory and you're done. For custom setups the same folder convention works with your own copy of the runtime; alternatively an installed Blackmagic RAW / DaVinci Resolve is found automatically, or use the libpath parameter / BRAW_LIBRARY env var.

x86_64 builds come in two flavors: the plain one runs on any CPU, the -v3 one (x86-64-v3: AVX2/F16C, Intel Haswell 2013+ / AMD Excavator+) has noticeably faster pixel-copy loops — prefer it on any recent machine.

Usage

clip  = core.braw.Source(source="clip.braw")        # bit depth automatic
audio = core.braw.AudioSource(source="clip.braw")
BRAWSource("clip.braw", bitdepth=32)                 # AviSynth, audio attached

Parameters (both frameworks):

Parameter Description
bitdepth 8, 16 or 32 (32 = float). Unset = auto: 16-bit, or 32-bit float for Linear gamma. fp=true with 16 = half float (VapourSynth only)
audio AviSynth only: attach audio track (default true)
scale decode at 1/2/4/8 resolution
pipeline decode on cpu (default), cuda (NVIDIA, Linux/Windows) or metal (Apple GPU, macOS). On Apple Silicon metal is 1.5-2.3x faster and leaves the CPU nearly idle; CUDA helps mainly at high resolution. See doc/gpu-benchmark.md
kelvin, tint, exposure, iso per-frame processing overrides
gamma, gamut, colorscience color science overrides (e.g. gamma="Rec.709"); invalid values error at open
highlightrecovery, gamutcompression processing toggles
allmetaprops expose every metadata key as BRAW_<key> frame prop
threads CPU decode threads (SetCPUThreads); 0 = all hardware threads. Lower it to leave cores free for downstream filters — the BRAW decoder otherwise saturates every core
libpath Blackmagic RAW library file or directory

Defaults decode "as shot": camera metadata plus an auto-applied <clipname>.sidecar next to the file (reported via the BRAWSidecarAttached prop; parameters override both).

Frame props: _DurationNum/Den, _AbsoluteTime, _Matrix, _Range (+_Transfer/_Primaries when the gamma/gamut has a standard code), plus BRAWTimecode, BRAWISO, BRAWWhiteBalanceKelvin/Tint, BRAWExposure, camera/clip info as BRAW*. Inspect everything with braw-probe --list-attrs --all-meta clip.braw.

Building

Zig 0.16; SDK headers are vendored, nothing else needed.

zig build                  # plugins into zig-out/{vapoursynth,avisynth}, braw-probe into zig-out/bin
zig build test             # unit tests
zig build release          # all targets, ReleaseFast, into zig-out/release/
tools/extract-sdk.sh       # unpack SDK/runtime into third_party/ (dev/tests)

License

Plugin code: see LICENSE. Vendored SDK headers (vendor/) are Copyright Blackmagic Design, license in their file headers. The Blackmagic RAW runtime ("API Libraries") is explicitly redistributable together with software built on the SDK (Blackmagic RAW SDK Developer License §1.1(d)), so plugin bundles may ship it in the blackmagic_*_deps folder. This repository just doesn't vendor the binaries — tools/extract-sdk.sh unpacks them locally, or take them from a Blackmagic RAW install.

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

vapoursynth_brawsource-0.3.1.tar.gz (132.9 kB view details)

Uploaded Source

Built Distributions

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

vapoursynth_brawsource-0.3.1-py3-none-win_amd64.whl (4.7 MB view details)

Uploaded Python 3Windows x86-64

vapoursynth_brawsource-0.3.1-py3-none-macosx_11_0_x86_64.whl (9.4 MB view details)

Uploaded Python 3macOS 11.0+ x86-64

vapoursynth_brawsource-0.3.1-py3-none-macosx_11_0_arm64.whl (9.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file vapoursynth_brawsource-0.3.1.tar.gz.

File metadata

  • Download URL: vapoursynth_brawsource-0.3.1.tar.gz
  • Upload date:
  • Size: 132.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for vapoursynth_brawsource-0.3.1.tar.gz
Algorithm Hash digest
SHA256 84bc6147214858167718dae5bbb62c719d6dcc9efbf55b0b763e10bd90ea005d
MD5 59578359595fc6e649d88b78e1262918
BLAKE2b-256 c6ef41d017e03258ace9c603e7283e2afd70b6971c28b14f82846649dbf9ccae

See more details on using hashes here.

File details

Details for the file vapoursynth_brawsource-0.3.1-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for vapoursynth_brawsource-0.3.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 731b328b078a0174cb43e8bc1d9569ccdb7c95b50bea0a05c12f93f995a485e5
MD5 9f17fad08372c587abebcaaa899184d2
BLAKE2b-256 57d6378f6d27dd5dd7d59dabf420aea7b9a9e95f17dafa617f923e286ff59818

See more details on using hashes here.

File details

Details for the file vapoursynth_brawsource-0.3.1-py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vapoursynth_brawsource-0.3.1-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1a04e5c6aaa52746fdff7e9c3641e4b4ff87626446f95b857015e0234d364274
MD5 98bf53a7df7c97c4d74a0343a6ffec11
BLAKE2b-256 158d556aae2aa6df65ed2e3db95950c17a9e81ed702715a6a5c6d7c1d22174f6

See more details on using hashes here.

File details

Details for the file vapoursynth_brawsource-0.3.1-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for vapoursynth_brawsource-0.3.1-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d590899d6173498ce623148d320d36e9841164fb65ec7d1520a5d10b68fc46fc
MD5 ca1f0d539136f073a99fc63b5cf829a7
BLAKE2b-256 58b7d99a3a18847b82d51a6ceeb456c59b328cc939e5cd9730897996f6150390

See more details on using hashes here.

File details

Details for the file vapoursynth_brawsource-0.3.1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vapoursynth_brawsource-0.3.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 78e2dba64492fd3a9bbe761685bdba111109c3560c35941f3c91a297fe4ba652
MD5 112cbc4851d51c584d8b26e111827f76
BLAKE2b-256 358c5d96224d3a7fe94b9955b98d83d2e210d9957010715efa3a051bd7a2db23

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