4.3 KiB
SRS Smoke Test Profile
Status
OPTIONAL / NON-BLOCKING
Use these checks when you want to verify RTMP interoperability or a real cvmmap-to-SRS forward path. They are not part of the mandatory acceptance matrix.
Covered Paths
- Synthetic RTMP smoke using
rtmp_output_tester - Live cvmmap ingest -> FFmpeg encoder -> RTMP -> SRS HTTP-FLV forward
Prerequisites
- Project built under
./build - Local SRS checkout at
~/Code/srs, or overrideSRS_ROOT ffprobe,ffmpeg, andcurlavailable inPATH- For the live test, a running cvmmap producer. Pass the URI explicitly.
Reproducible Test: Synthetic RTMP Matrix
This is the fast interoperability smoke for the RTMP sink implementations:
cmake -B build -S .
cmake --build build
./scripts/rtmp_srs_smoke.sh
Useful overrides:
ENCODER_DEVICE=nvidia ./scripts/rtmp_srs_smoke.sh
SRS_ROOT=~/Code/srs ./scripts/rtmp_srs_smoke.sh
What it verifies:
libavformatRTMP output withh264ffmpeg_processRTMP output withh264libavformatRTMP output withh265ffmpeg_processRTMP output withh265- Pullback from SRS HTTP-FLV with
ffprobe
Reproducible Test: Live cvmmap Forward
This is the end-to-end live test for a real cvmmap source:
cmake -B build -S .
cmake --build build
./scripts/live_srs_forward_smoke.sh 'cvmmap://zed@/tmp/cvmmap'
The script defaults to:
CODEC=h264ENCODER_BACKEND=ffmpegENCODER_DEVICE=nvidiaRTMP_TRANSPORT=libavformatRTMP_MODE=enhancedINGEST_MAX_FRAMES=120STREAM_NAME=<instance>_live, derived fromINPUT_URI
Useful overrides:
INPUT_URI='cvmmap://zed@/tmp/cvmmap' ./scripts/live_srs_forward_smoke.sh
./scripts/live_srs_forward_smoke.sh 'cvmmap://front_cam@/tmp/cvmmap' front_cam_smoke
ENCODER_DEVICE=software ./scripts/live_srs_forward_smoke.sh 'cvmmap://zed@/tmp/cvmmap'
STREAM_NAME=zed_test INGEST_MAX_FRAMES=300 ./scripts/live_srs_forward_smoke.sh 'cvmmap://zed@/tmp/cvmmap'
SRS_ROOT=~/Code/srs ./scripts/live_srs_forward_smoke.sh 'cvmmap://zed@/tmp/cvmmap'
What it does:
- Reuses a healthy local SRS instance if one is already listening on
127.0.0.1:1985 - Otherwise starts SRS from
~/Code/srs - Writes a temporary SRS config with:
daemon offmax_connectionsreduced to avoid the common localulimit -n 1024failure
- Publishes the cvmmap stream to
rtmp://127.0.0.1/live/<stream> - Verifies the forwarded HTTP-FLV mount at
http://127.0.0.1:8080/live/<stream>.flv - Attempts to decode a short sample through
ffmpeg - Stores logs and probe output under
build/live_srs_forward_smoke_*
Expected success signals:
- The script exits
0 ffprobe_httpflv.logreports the expected codec and dimensionsstreamer.logshowsRTMP_OUTPUT_READYstreamer.logends withPIPELINE_METRICSandRTMP_OUTPUT_METRICS
The HTTP-FLV probe is the authoritative pass/fail signal. The optional ffmpeg decode sample is best-effort because a very short bounded publish can disappear before the second client attaches.
Example Live Result
For a ZED source running at cvmmap://zed@/tmp/cvmmap, the successful forward probe looked like:
index=0
codec_name=h264
width=1280
height=720
avg_frame_rate=30/1
Artifacts
Both smoke scripts write evidence under build/:
srs-smoke.loglive_srs_forward_smoke_*/streamer.loglive_srs_forward_smoke_*/ffprobe_httpflv.loglive_srs_forward_smoke_*/ffmpeg_decode_httpflv.loglive_srs_forward_smoke_*/srs_api_streams.json
Troubleshooting
| Issue | Cause | Action |
|---|---|---|
| SRS exits immediately | max_connections too high for local ulimit |
Use the script-generated config or raise ulimit -n |
| HTTP-FLV never mounts | Publish failed or source is idle | Check streamer.log and confirm the cvmmap URI is active |
| NVENC unavailable | FFmpeg cannot open h264_nvenc / hevc_nvenc |
Set ENCODER_DEVICE=software |
| RTMP probe hangs | Live RTMP playback probe can block on some builds | Use the HTTP-FLV verification path; this is what the script treats as authoritative |