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_configconfigured for the target camera(s). See Video Encoding.An active
CameraControlclient requesting frames for the target camera(s), e.g. the control-mode (--control) invocation of Tutorial 01: Camera Client. Without one the camera produces no frames and the RTSP server has no video to serve.
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 |
|---|---|---|
|
|
Bind address |
|
|
RTSP port |
|
|
Shmem endpoint |
|
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
Important
VLC needs its live555 module to play standard RTSP streams, and the VLC
packaged in recent Debian and Ubuntu repositories is built without it. Check
with vlc --list | grep -i live555; if that prints nothing, use the snap
(sudo snap install vlc), the official Windows/macOS builds, or ffplay
below. Details in the Troubleshooting section.
ffplay
ffplay -fflags nobuffer 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.
VLC Fails with “Failed to setup RTSP session”
VLC plays standard RTSP with its live555 module. When that module is missing,
VLC falls back to two modules that speak other dialects: satip (SAT>IP
only, logs Failed to setup RTSP session) and access_realrtsp (RealMedia
only, logs only real/helix rtsp servers supported for now), then gives up
with nothing to play. The VLC in recent Debian and Ubuntu repositories is
built without live555, so this affects a stock install even though the server
is healthy. Use a live555-capable build (snap, official Windows/macOS) or
another player such as ffplay (see Viewing Streams above).
UDP Doesn’t Work Through SSH
SSH port-forwarding only supports TCP. Start the server with --tcp and connect sol3_rtsp_client with --tcp.