Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

convert_bit_depth

convert_bit_depth(
  input: Clip,
  #{
    bits: Int,
    dither?: String,
  }
)

Changes a clip’s bit depth without changing its resolution or timing.

The input must be one fixed-format planar Gray, YUV, or planar RGB clip. The target depth must be one of PixelFlow’s supported bit depths: 8, 10, 12, 16, or 32 for float output. dither only affects lossy integer down-conversion and float-to-integer conversion.

Examples

output = source("input.mkv").std.convert_bit_depth(#{ bits: 10 })
output = source("input.mkv").std.convert_bit_depth(#{ bits: 8, dither: "none" })

Input

One fixed-format planar Gray, YUV, or planar RGB clip.

Output

A clip with the same family, resolution, timing, and metadata, converted to the requested sample depth.

Options

  • bits (Int) – Select the target bit depth.
  • dither (String, default: "fruit") – Select the dither mode for lossy conversions; supported values are "fruit" and "none".