cyndilib.wrapper.ndi_structs#
FrameType#
- class cyndilib.wrapper.ndi_structs.FrameType(enum.Enum)#
Enum signifying NDI® frame types
- unknown#
Effectively means that the frame type is
None
- video#
Specifies a
VideoFrame
- audio#
Specifies an
AudioFrame
- metadata#
Specifies a
MetadataFrame
- error#
Indicates an error occurred (when returned from an NDI® function)
FrameFormat#
- class cyndilib.wrapper.ndi_structs.FrameFormat(enum.Enum)#
Enum specifying the field type of a video frame
- progressive#
A progressive frame (non-fielded)
- interleaved#
A fielded (interlaced) frame using field 0 for even lines and field 1 for odd
- field_0#
Indicates the current data contains the even field
- field_1#
Indicates the current data contains the odd field
FourCC#
- class cyndilib.wrapper.ndi_structs.FourCC(enum.Enum)#
Enum specifying various FourCC types for video formats
- UYVY#
Non-planar
YCbCrformat using4:2:2. For every two pixels there are twoYsamples and one of each color samples.The ordering for these is
(U0, Y0, V0, Y1)where each component is uint8.- line stride
xres * sizeof(uint8_t) * 4- Size in bytes
line_stride * yres
- UYVA#
Planar
YCbCr + Alphaformat using4:2:2:4. The first plane is formatted as inUYVYand the second plane contains the alpha value for each pixel as uint8.- line stride
- First Plane
xres * sizeof(uint8_t) * 4- Second Plane
xres * sizeof(uint8_t)
- Size in bytes
- First plane
xres * sizeof(uint8_t) * 4 * yres- Second plane
xres * sizeof(uint8_t) * yres
- P216#
Semi-planar
YCbCrformat using4:2:2with 16bpp. The first plane contains theYvalues with one uint16 sample for every pixel. The second plane contains the color samples as interleaved pairs within a single uint16 per pixel.The ordering for the second plane may be simpler to describe as
(<uint8_t>U, <uint8_t>V).- line stride
- First plane (
Y) xres * sizeof(uint16_t)- Second plane (
UV) xres * sizeof(uint8_t) * 2(note this is the same as the first plane)
- First plane (
- Size in bytes (per plane)
xres * sizeof(uint16_t) * yres
- PA16#
Semi-planar
YCbCr + Alphaformat using4:2:2:4. The first two planes are formatted as described inP216and the third plane contains the alpha value for each pixel as uint16.- line stride (per plane)
xres * sizeof(uint16_t)- Size in bytes (per plane)
xres * sizeof(uint16_t) * yres
- I420#
Planar
YCbCrformat using4:2:0video format with 8bpp. The first plane contains theYvalues with one uint8 sample for every pixel. The second plane contains theCb(U) samples and the third contains theCr(V) values (also as uint8).Since chroma subsampling is done both horizontallly and vertically, the ordering may be best described here: https://wiki.videolan.org/YUV#I420
- line stride
- First plane
xres * sizeof(uint8_t)- Second and third planes
xres / 2 * sizeof(uint8_t)
- Size in bytes
- First plane
xres * sizeof(uint8_t) * yres- Second and third planes
xres / 2 * sizeof(uint8_t) * yres / 2
- YV12#
Identical to
YV12, except the order of the chroma pairs are reversed (hence the name “YV”) making the plane order(Y, Cr, Cb)or(Y, V, U).
- NV12#
Planar
YCbCrformat using4:2:0with 8bpp. The first plane contains theYsamples as uint8 and the second contains the chroma pairs as interleaved uint8.As with
I420andYV12, the chroma subsampling is done within 2x2 groups of pixels and can be described here: https://wiki.videolan.org/YUV#NV12Instead of using separate (smaller) planes for the
UVcomponents, they are combined into a single plane with the same size as theYplane.- line stride (both planes)
xres * sizeof(uint8_t)- Size in bytes (both planes)
xres * sizeof(uint8_t) * yres
- RGBA#
Non-planar
RGBAformat using4:4:4:4. For each pixel, the red, green, blue and alpha components are stored using one uint8 value for each (ordered as(R, G, B, A)).- line stride
xres * sizeof(uint8_t) * 4- Size in bytes
xres * sizeof(uint8_t) * 4 * yres