RTSP Streaming

sol3_rtsp_server is a GStreamer-based RTSP server that runs on the Sol3 device. It monitors the shared memory camera ecosystem and automatically creates RTSP mount points for any camera that emits encoded frames. No manual stream registration is required, as cameras are discovered on startup and polled periodically.

Prerequisites

  • Camera server running with venc_config configured for the target camera(s). See Video Encoding.

Starting the Server

sol3_rtsp_server is a standalone binary. Run it on the device:

/opt/sol3/bin/sol3_rtsp_server

By default it listens on all interfaces at port 8554. Options:

Flag

Default

Description

--host

0.0.0.0

Bind address

--port

8554

RTSP port

--endpoint

/run/sol3/camera

Shmem endpoint

--tcp

off

Force TCP interleaved transport (required for SSH tunnels)

RTSP URL Format

Each camera is mounted at /cam<N> where N is the camera ID from camera_server_config.json:

rtsp://<device-ip>:8554/cam<N>

For example, camera 2 on a device at 192.168.1.100:

rtsp://192.168.1.100:8554/cam2

The server logs the full URL for each discovered camera at startup.

Viewing Streams

sol3_rtsp_client

sol3_rtsp_client is a Python script that opens a tiled viewer window for one or more cameras simultaneously. Run it on the host machine:

# View one camera
sol3_rtsp_client --host 192.168.1.100 --cam-id 1

# View multiple cameras in a grid
sol3_rtsp_client --host 192.168.1.100 --cam-id 1,2,3,4 --cols 2

Over an SSH tunnel (requires --tcp on both server and client):

# On host: forward the RTSP port
ssh -L 8554:localhost:8554 <device>
sol3_rtsp_server --tcp

# Then view via localhost (in a new shell, not the ssh one)
sol3_rtsp_client --cam-id 1,2 --tcp

Use --dry-run to print the underlying gst-launch-1.0 command without executing it.

VLC

vlc rtsp://192.168.1.100:8554/cam1

gst-launch-1.0

gst-launch-1.0 rtspsrc location=rtsp://192.168.1.100:8554/cam1 latency=0 ! \
    decodebin ! \
    videoconvert ! \
    autovideosink

Tip

If port-forwarding over ssh, be sure to specify the --protocols=tcp flag

Troubleshooting

No Stream for a Camera

The server only mounts cameras that have VideoEncodedPacket outputs visible in shared memory. Confirm venc_config is set for the camera and the camera server is running.

Stream Connects but No Video

The server blocks on each camera until it receives the first keyframe with codec config (SPS/PPS). This can take up to one GOP interval. If video never appears, check that the camera is producing frames with journalctl -b -u sol3_gmsl_supervisor.

UDP Doesn’t Work Through SSH

SSH port-forwarding only supports TCP. Start the server with --tcp and connect sol3_rtsp_client with --tcp.