YUV Viewer (formerly Elecard YUV Viewer) — Supported Formats & Settings
YUV Viewer is a lightweight utility for inspecting raw and encoded video frames in YUV and related color formats. This article summarizes the file formats, pixel formats, container/codec support, and the key settings you’ll use to view, analyze, and export frames.
Supported file types and inputs
- Raw YUV files (.yuv, .y, .raw) — planar and packed layouts.
- Single-frame image files used for testing (e.g., .bmp, .png) when imported for reference/overlay.
- Captures from video codecs where raw YUV can be extracted or piped into the tool (e.g., frames dumped from FFmpeg).
Pixel formats and color layouts
YUV Viewer supports a wide set of YUV pixel formats common in video development and testing. Expect support for:
- Planar formats:
- YUV420p / I420 — 4:2:0, separate Y, U, V planes.
- YV12 — 4:2:0 with swapped U/V plane order.
- YUV422p / I422 — 4:2:2 planar.
- YUV444p — full chroma resolution.
- Semi-planar formats:
- NV12 — 4:2:0 with interleaved UV.
- NV21 — 4:2:0 with interleaved VU.
- Packed formats:
- UYVY / YUY2 — 4:2:2 packed (YUYV/YUY2 variants).
- YVYU, VYUY — other byte-order packed variants.
- High-bit-depth and specialized formats (where supported):
- YUV10 / 10-bit planar variants.
- P010 / P016 — 10-/16-bit semi-planar used in HEVC/VVC workflows.
- RGB preview/capture modes to display converted frames.
Color range and matrix handling
- Supports both full (0–255) and limited/TV (16–235) ranges for 8-bit sources; analogous ranges for higher bit depth.
- Recognizes common color matrices and transfer characteristics:
- BT.601, BT.709, BT.2020 matrices for YUV-to-RGB conversion.
- Basic handling of gamma/transfer expectations (sRGB, linear) for preview correctness.
- Option to manually override range and matrix when metadata is absent or incorrect.
Resolution, stride, and alignment
- Manual entry of width, height, and frame size/stride for raw inputs that lack headers.
- Options for per-plane stride and line padding to accommodate capture dumps from hardware or encoder outputs.
- Handling of odd widths/heights and chroma subsampling alignment rules (e.g., even width for 4:2:0 chroma).
Frame sequence and indexing
- Open multi-frame raw YUV sequences with configurable frame count and starting index.
- Frame stepping: single-step forward/back, jump to frame number, play/pause for quick review.
- Support for indexing via filenames when frames exported as sequential images.
Viewing and display settings
- Zoom and pan controls with nearest/linear interpolation options.
- Pixel aspect ratio (PAR) / display aspect ratio (DAR) override to view non-square pixels correctly.
- Overlay grid, frame number, timestamp, and per-channel visualization toggles:
- Y-only, U-only, V-only.
- Chrominance difference or combined RGB preview.
- False-color heatmaps for luma clipping and chroma range violations.
Color tools and measurement
- Per-pixel readout: Y, U, V, and converted RGB values under cursor.
- Histogram views for Y, U, V channels and combined luminance distribution.
- Waveform / vectorscope (where available) for broadcast-level compliance checks.
- Min/max/average luminance and chroma stats for current frame or sequence.
Export and conversion
- Export current frame to PNG/BMP (converted to RGB) with optional gamma correction.
- Dump selected frames back to raw YUV with chosen format (planar/packed, bit-depth).
- Save measurement data (histograms, per-frame stats) as CSV for offline analysis.
Performance and compatibility notes
- Works best for uncompressed, developer-oriented inspection; not a full media player for all codecs.
- For codec-wrapped sources (MP4, MKV), use FFmpeg to extract raw frames to a supported YUV format, then open in YUV Viewer.
- High-resolution and high–bit-depth files may require increased memory and disable real-time playback.
Typical workflows
- Inspect a raw encoder output:
- Open .yuv, set width/height, choose pixel format and range, step through frames to verify chroma placement and alignment.
- Validate color conversion:
- Toggle matrices (BT.709 vs BT.601) and compare RGB preview; use waveform/vectorscope to check broadcast limits.
- Troubleshoot capture dumps:
- Adjust per-plane stride, override byte order (UYVY vs YUY2), and inspect histograms for clipping or bit-shift artifacts.
Quick settings checklist (recommended defaults)
- Set width/height and pixel format on open.
- Choose correct color matrix (BT.709 for HD, BT.601 for SD).
- Select limited range for broadcast material, full range for computer graphics.
- Enable per-pixel readout and histogram for debugging.
If you want, I can provide step-by-step instructions for extracting frames with FFmpeg for a particular codec and opening them in YUV Viewer.
Leave a Reply