FAQ¶
Frequently asked questions about MediaX.
General¶
What is MediaX?¶
MediaX is a C++ library for real-time video streaming over RTP networks. It supports uncompressed and compressed video formats with optional hardware acceleration.
What standards does MediaX support?¶
- DEF STAN 00-082 - UK Defence Standard for video over IP (GVA/VIVOE)
- RFC 4421 - RTP Payload Format for Uncompressed Video
- RFC 3984 - RTP Payload Format for H.264 Video
- RFC 7798 - RTP Payload Format for H.265/HEVC Video
- RFC 5371 - RTP Payload Format for JPEG 2000
- RFC 4566 - Session Description Protocol (SDP)
- RFC 2974 - Session Announcement Protocol (SAP)
- AIA GigE Vision 2.x - Industrial camera control (GVCP) and streaming (GVSP)
- EMVA GenICam 3.x - Camera XML device description (SFNC)
What platforms are supported?¶
- Ubuntu 22.04 LTS (amd64)
- Ubuntu 24.04 LTS (amd64)
- Ubuntu 26.04 LTS (amd64)
- AlmaLinux 9 (amd64)
- AlmaLinux 10 (amd64)
- Raspbian 12 (arm64 — Raspberry Pi 4/5)
- NVIDIA Jetson (arm64)
- Other Linux distributions (build from source)
Is MediaX open source?¶
Yes, MediaX is open source. See the LICENSE file for details.
Video Formats¶
Which video format should I use?¶
| Use Case | Recommended Format |
|---|---|
| Lowest latency | Uncompressed (RGB24, YUV422) |
| Limited bandwidth | H.264 or H.265 |
| Best compression | AV1 |
| Frame-accurate editing | JPEG 2000 |
| Grayscale sensors | Mono8 or Mono16 |
| Industrial cameras (GigE Vision) | RGB8, BayerRG8, Mono8, YCbCr422 |
What's the difference between RGB24 and YUV422?¶
- RGB24: 3 bytes per pixel, best for computer graphics
- YUV422: 2 bytes per pixel (33% smaller), standard for video
Most cameras output YUV. RGB is better for rendering and display.
How much bandwidth do I need?¶
Uncompressed video bandwidth formula:
Bandwidth = Width × Height × Bytes_per_pixel × FPS × 8 bits
Examples:
| Format | Resolution | FPS | Bandwidth |
|---|---|---|---|
| RGB24 | 1920×1080 | 30 | 1.49 Gbps |
| YUV422 | 1920×1080 | 30 | 995 Mbps |
| H.264 | 1920×1080 | 30 | 5-10 Mbps |
Networking¶
What IP addresses should I use?¶
For multicast streaming, use addresses in these ranges:
239.192.0.0/16- Organization-local (recommended)239.255.0.0/16- Site-local
Example: 239.192.1.1
For unicast, use the receiver's IP address directly.
What ports should I use?¶
Use even-numbered ports above 1024. Common choices:
- 5004 (default for many RTP applications)
- 5006, 5008, 5010 (additional streams)
RTP uses even ports; RTCP uses the next odd port.
Does MediaX support unicast?¶
Yes. Set the hostname to the receiver's IP address instead of a multicast address.
Can multiple receivers view the same stream?¶
Yes, using multicast. All receivers join the same multicast group and receive the same stream without additional bandwidth on the sender.
Hardware Acceleration¶
What hardware acceleration is supported?¶
| Technology | Vendor | Codecs |
|---|---|---|
| VAAPI | Intel, AMD | H.264, H.265, AV1 |
| NVENC | NVIDIA | H.264, H.265 |
| V4L2 | Raspberry Pi | H.264 |
How do I enable hardware acceleration?¶
Hardware acceleration is automatic when available. Verify with:
# VAAPI
vainfo
# NVIDIA
nvidia-smi
What if hardware acceleration isn't available?¶
MediaX falls back to software encoding/decoding. This uses more CPU but works on any system.
Python Bindings¶
How do I install Python bindings?¶
Python bindings are included when building with -DBUILD_PYTHON=ON.
They install to /usr/local/lib/python3/dist-packages/mediax/.
Why do I need sys.path.append?¶
The install location isn't in Python's default path. Add it before importing:
import sys
sys.path.append('/usr/local/lib/python3/dist-packages')
import mediax
Can I use MediaX with NumPy?¶
Yes. Convert NumPy arrays to bytes for transmission:
import numpy as np
frame = np.zeros((480, 640, 3), dtype=np.uint8)
payloader.Transmit(frame.tobytes(), True)
Convert received bytes back to NumPy:
frame = np.frombuffer(buffer, dtype=np.uint8).reshape((480, 640, 3))
Qt6 Integration¶
What Qt6 modules are required?¶
- Qt6 Widgets
- Qt6 Multimedia
Can I use MediaX with QML?¶
The current bindings are for Qt Widgets. QML integration requires wrapping the C++ classes as QML types.
GigE Vision¶
What is GigE Vision?¶
GigE Vision is an AIA standard for industrial camera control and streaming over Gigabit Ethernet. It provides plug-and-play camera discovery (GVCP on UDP/3956) and low-latency frame streaming (GVSP).
What port does GigE Vision use?¶
GVCP (control) uses UDP port 3956 (IANA assigned). The GVSP streaming port is negotiated at connect time and defaults to 55100 in MediaX.
Can I use MediaX to emulate a GigE Vision camera?¶
Yes. Use mediax::gige::GigEDevice to create a software camera that:
- Responds to GVCP discovery and register read/write
- Serves a GenICam XML device description
- Streams frames over GVSP to any compliant host
See the GigE Vision user guide and GigE examples.
Can I receive from a real GigE Vision camera?¶
Yes. mediax::gige::GigEReceiver implements the host side of GigE Vision:
it sends a discovery broadcast, takes control of the device, configures the
stream channel, and receives GVSP frames.
How do I convert Bayer frames from a GigE camera?¶
#include "utils/colourspace_cpu.h"
mediax::video::ColourSpaceCpu cs;
mediax::gige::gvsp::GvspFrameData frame;
receiver.Receive(&frame, 2000);
if (frame.pixel_format == mediax::gige::GvspPixelFormat::kBayerRg8) {
std::vector<uint8_t> rgb(frame.width * frame.height * 3);
cs.BayerToRgb(frame.height, frame.width,
frame.pixels.data(), rgb.data(),
mediax::video::BayerPattern::kRggb);
}
SAP/SDP¶
What is SAP?¶
Session Announcement Protocol (SAP) broadcasts stream availability on the network. Receivers can discover streams automatically without manual configuration.
How often are SAP announcements sent?¶
By default, every 1 second. This is configurable.
Can I disable SAP?¶
Yes. Simply don't create a SapAnnouncer. Receivers will need manual stream configuration instead.
Performance¶
What's the maximum resolution supported?¶
MediaX has no hard limit. Practical limits depend on:
- Network bandwidth
- CPU/GPU processing power
- Memory for frame buffers
4K (3840×2160) and 8K (7680×4320) are achievable with appropriate hardware.
What's the typical latency?¶
| Format | Typical Latency |
|---|---|
| Uncompressed | < 1 frame (33ms @ 30fps) |
| JPEG 2000 | 1-2 frames |
| H.264 | 2-5 frames |
| H.265 | 3-6 frames |
Actual latency depends on network conditions and buffering.
How many streams can run simultaneously?¶
Limited by:
- Network bandwidth
- CPU/GPU resources
- File descriptors (OS limit)
Tens of streams are typical on modern hardware.
Support¶
Have more questions?
- Website: https://astutesys.com/support
- Email: support@astutesys.com