Streaming Formats

MediaX supports multiple video encoding formats for different use cases.

Format Comparison

Encoder Format AMD Intel Jetson ARM64 Notes
RGB24 Uncompressed RFC 4175
YUV422 Uncompressed RFC 4175
Mono8 Uncompressed RFC 4175
Mono16 Uncompressed RFC 4175
x264 H.264 Software encoder
openh264 H.264 Cisco encoder
VAAPI H.264/H.265 Intel hardware
NVENC H.264/H.265 NVIDIA hardware
AV1 AV1 Requires Rust

Uncompressed Formats

Best for low-latency, high-quality video where bandwidth is available.

RGB24

24-bit RGB color, 8 bits per channel.

stream_info.encoding = mediax::rtp::ColourspaceType::kColourspaceRgb24;

Bandwidth: ~221 Mbps at 1080p30

YUV422

YCbCr 4:2:2 color sampling, commonly used in broadcast.

stream_info.encoding = mediax::rtp::ColourspaceType::kColourspaceYuv422;

Bandwidth: ~166 Mbps at 1080p30

Mono8

8-bit grayscale, used for thermal and infrared cameras.

stream_info.encoding = mediax::rtp::ColourspaceType::kColourspaceMono8;

Bandwidth: ~50 Mbps at 1080p30

Mono16

16-bit grayscale, higher dynamic range for scientific imaging.

stream_info.encoding = mediax::rtp::ColourspaceType::kColourspaceMono16;

Bandwidth: ~99 Mbps at 1080p30

Compressed Formats

Use when bandwidth is limited or for storage efficiency.

H.264

Most widely supported compressed format.

// Using Intel VAAPI
mediax::RtpSapTransmit<mediax::rtp::h264::gst::vaapi::RtpH264GstVaapiPayloader> rtp(...);

// Using x264 software encoder
mediax::RtpSapTransmit<mediax::rtp::h264::gst::x264::RtpH264GstX264Payloader> rtp(...);

Bandwidth: 2-20 Mbps (configurable)

H.265 (HEVC)

Better compression than H.264, requires more processing.

mediax::RtpSapTransmit<mediax::rtp::h265::gst::vaapi::RtpH265GstVaapiPayloader> rtp(...);

Bandwidth: 1-10 Mbps (configurable)

AV1

Newest codec, excellent compression, royalty-free.

Note

AV1 requires building with -DBUILD_RUST=ON

mediax::RtpSapTransmit<mediax::rtp::av1::gst::RtpAv1GstPayloader> rtp(...);

Choosing a Format

Use Case Recommended Format
Low latency (<10ms) Uncompressed (RGB24/YUV422)
Bandwidth limited H.264 or H.265
Thermal cameras Mono8 or Mono16
Scientific imaging Mono16
Long-term storage H.265 or AV1
Maximum compatibility H.264

Support

Need help choosing a format?