Skip to main content

kVideoColorFormat

Electron APIs / recorder / kVideoColorFormat

type kVideoColorFormat =
| "NV12"
| "I420"
| "I444"
| "P010"
| "I010"
| "P216"
| "P416"
| "BGRA";

Supported video color formats used during video encoding or capture.

Each format defines how color and luminance information is represented in memory. Choice of format can affect performance, quality, and hardware compatibility.

ValueDescription
'NV12'8-bit YUV format with planar Y and interleaved UV planes. Commonly used in hardware-accelerated video processing.
'I420'8-bit planar YUV format with 4:2:0 chroma subsampling. Widely supported and efficient for compression.
'I444'8-bit planar YUV format with full 4:4:4 chroma (no subsampling). Offers highest color fidelity, useful for post-production.
'P010'10-bit packed YUV 4:2:0 format. Suitable for high dynamic range (HDR) workflows.
'I010'10-bit planar YUV 4:2:0 format. Provides better color depth while retaining planar layout.
'P216'16-bit packed YUV 4:2:2 format. Offers higher color resolution, used in professional capture scenarios.
'P416'16-bit packed YUV 4:4:4 format. Ideal for precise color reproduction and advanced editing.
'BGRA'8-bit packed RGB format with alpha channel. Used in real-time rendering and desktop capture.

Example

const colorFormat: kVideoColorFormat = "NV12";