Video HDR
Capturing Videos in High-Dynamic-Range (HDR) with HLG/HDR encodings and 10-bit
Video HDR captures Frames in a higher dynamic range, which allows much brighter highlights and deeper shadows.
Enable Video HDR
To enable Video HDR, find a CameraFormat that supports video HDR via supportsVideoHDR:
const device = ...
const format = useCameraFormat(device, [
{ videoHDR: true }
])const device = ...
const format = getCameraFormat(device, [
{ videoHDR: true }
])Tip
To use 10-bit Video HDR, select a CameraFormat that has a 10-bit nativePixelFormat instead.
Then, enable Video HDR in your Camera session:
function App() {
const device = ...
const format = useCameraFormat(device, [
{ videoHDR: true }
])
const enableVideoHDR = format.supportsVideoHDR
return (
<Camera
style={StyleSheet.absoluteFill}
isActive={true}
device={device}
format={format}
enableVideoHDR={enableVideoHDR}
/>
)
}function App() {
const device = ...
const format = useCameraFormat(device, [
{ videoHDR: true }
])
const enableVideoHDR = format.supportsVideoHDR
const camera = useCamera({
isActive: true,
device: device,
format: format,
enableVideoHDR: enableVideoHDR
})
}const session = ...
const device = ...
const format = useCameraFormat(device, [
{ videoHDR: true }
])
const enableVideoHDR = format.supportsVideoHDR
const controllers = await session.configure([
{
input: device,
outputs: [],
config: {
format: format,
enableVideoHDR: enableVideoHDR
}
}
], {})Implementation details
Video HDR is implemented in four different ways, possibly combined.
Higher Bit-Depth
Some Video HDR pipelines capture Frames with a higher bit-depth (10-bit instead of 8-bit) allowing for a wider color-spectrum.
| Bit Depth | Different Colors | Maximum Brightness |
|---|---|---|
| 8-bit | 256 | ~100 nits |
| 10-bit | 1024 | ~1000-4000 nits |
Different Transfer Function
Video SDR (standard dynamic range) uses a simple gamma curve for color mapping (e.g. BT.1886), which is limited in brightness range.
Video HDR often use a different transfer functions - often PQ (HDR10/Dolby) or HLG, which fundamentally changes how brightness is encoded.
Different Color Spaces
The transfer functions often also affect color-spaces - while Video SDR typically uses 'srgb', an HDR pipeline uses a wider color-space like 'hlg-bt2020'.
Extended Dynamic Range
Many Apple devices support capturing video using "Extended Dynamic Range", which internally doubles Video Frame Rate (see "FPS") to capture an under-exposed, an over-exposed and a regularly-exposed Frame in one go and fuses them together to create a more widely-exposed Frame - this is similar to how "Photo HDR" works.