VTSampler
Cross-platform GPU video format conversion and scaling on wgpu. One VTImage in, one out — similar in spirit to D3D11 Video Processor, but portable.
API reference: docs.rs/vtsampler · Local: cargo doc --open --no-deps
Features
- Formats: RGBA, BGRA, NV12, YUV420P (any → any)
- Scaling when input/output sizes differ
- Color: BT.601 / BT.709 limited range
- Backings: CPU, wgpu textures, D3D11 (Windows),
CVPixelBuffer(macOS)
Quick example
use ;
# async
Share your renderer's device with VTSamplerBuilder::with_arc_device.
Example program
Requires ffmpeg on PATH (downloads a sample image).
License
MIT Copyright (c) 2025 mycrl.