This guide explains how to test SLAM XCAM RTMP streaming on a local network with MediaMTX, and how to use RTMP in real streaming environments. It is intended for users who want a repeatable way to check video, audio, bitrate stability, and weak-network recovery before going live on a public platform.
1. Recommended Test Structure
For troubleshooting, test in two stages. First use a local MediaMTX server on the same Wi-Fi network. After the local test is stable, test with the real streaming platform.
| Stage | Purpose | Recommended Tool |
|---|---|---|
| Local RTMP test | Verify camera output, audio/video tracks, bitrate, and recovery behavior without platform-side variables. | MediaMTX on a PC |
| Real RTMP use | Verify compatibility with the actual destination, CDN, transcoding, and viewer workflow. | YouTube Live, private RTMP server, MediaMTX on cloud/VPS, or other RTMP-compatible services |
2. Local RTMP Test with MediaMTX
Requirements
- A Windows PC and SLAM XCAM connected to the same Wi-Fi network.
- MediaMTX running on the PC.
- A browser, VLC, or another player for viewing the converted stream.
- The camera set to Live mode with RTMP selected.
Step 1: Find the PC IP Address
On Windows, open Command Prompt or PowerShell and run:
ipconfig
Find the active Wi-Fi adapter and note the IPv4 address. Example:
192.168.2.241
The camera and the PC should be in the same subnet. For example, PC 192.168.2.241 and camera 192.168.2.236 are in the same 192.168.2.x network.
Step 2: Start MediaMTX
Start MediaMTX on the PC. For local RTMP testing, the important listener is:
RTMP: 1935
For a better browser viewing experience, it is recommended to enable HLS remuxing from the beginning of the stream:
hlsAlwaysRemux: true
If the local Windows test server fails because MediaMTX tries to generate MoQ TLS certificates, disable MoQ for this local test:
moq: false
Step 3: Enter the RTMP URL in SLAM XCAM
Use the PC IP address in the camera RTMP URL:
rtmp://192.168.2.241:1935/live/stream
Replace 192.168.2.241 with your PC IP address.
Important: make sure there is no extra space or line break at the end of the URL. A URL copied with a hidden newline can cause the RTMP server to reject the connection.
Step 4: Confirm MediaMTX Receives the Stream
When the camera starts streaming successfully, MediaMTX should show a message similar to:
stream is available and online, 2 tracks (H265, MPEG-4 Audio)
is publishing to path 'live/stream'
This means both video and audio are being received.
3. How to Watch the Local Test Stream
For H.265 RTMP input, do not use RTMP playback as the main viewing method. Many RTMP/FLV readers do not pass H.265 video correctly. Instead, use MediaMTX HLS or WebRTC output.
| Viewing Method | URL Example | Notes |
|---|---|---|
| HLS | http://192.168.2.241:8888/live/stream/index.m3u8 |
Recommended for checking both video and audio. Works well for stable viewing. |
| WebRTC | http://192.168.2.241:8889/live/stream |
Lower latency. In some browsers, H.265 video may play but AAC audio may not be heard. |
| RTMP direct playback | rtmp://192.168.2.241:1935/live/stream |
Not recommended for H.265. Some players may show audio only or no picture. |
4. Why RTMP Direct Playback May Show No Picture
SLAM XCAM may stream with H.265 video and AAC audio. The camera can publish this stream to MediaMTX correctly, but RTMP/FLV playback compatibility for H.265 is limited. Some players may receive only the AAC audio track.
If MediaMTX shows that the stream has two tracks, but VLC direct RTMP playback has no picture, use HLS instead:
http://192.168.2.241:8888/live/stream/index.m3u8
5. Weak-Network Recovery Test
After local playback is working, test recovery behavior:
- Start RTMP streaming from SLAM XCAM.
- Open the HLS viewing URL and confirm video and audio are normal.
- Move the camera to a weaker Wi-Fi area for 1 to 2 minutes.
- Move the camera back to a strong Wi-Fi area.
- Check whether video recovers automatically without stopping and restarting the stream.
If the video stops but audio continues at a very low bitrate, this indicates an audio-only transport condition. The latest app recovery logic is designed to detect this condition and restart the streaming pusher automatically.
6. Real RTMP Use
After the local test is stable, use the actual RTMP destination provided by your live platform or server. Most RTMP services provide two fields:
| Platform Field | Example |
|---|---|
| Server URL | rtmp://live.example.com/app |
| Stream key | abcd-1234-efgh-5678 |
In SLAM XCAM, combine them into one RTMP URL if the app requires a single input field:
rtmp://live.example.com/app/abcd-1234-efgh-5678
Some services use a slightly different path format. Always follow the exact RTMP URL format shown by your streaming platform.
7. Recommended Bitrate Starting Points
For real-world live streaming, start conservatively and increase bitrate only after the network is proven stable.
| Mode | Codec | Recommended Starting Bitrate |
|---|---|---|
| 4K30 | H.265 | 14 to 24 Mbps |
| 4K50 | H.265 | 24 Mbps |
| 6K30 | H.265 | 30 to 36 Mbps |
If the network is unstable, reduce bitrate before changing other settings. A lower stable bitrate usually gives a better live viewing experience than a higher bitrate that causes black screens or repeated buffering.
8. Troubleshooting
The camera cannot connect to the local RTMP server
- Confirm the PC and camera are on the same Wi-Fi subnet.
- Confirm MediaMTX is listening on port
1935. - Check Windows Firewall and allow MediaMTX on the private network.
- Check that the RTMP URL has no hidden newline or trailing space.
HLS only works after refreshing the browser
Enable:
hlsAlwaysRemux: true
This makes MediaMTX generate HLS as soon as the RTMP stream is published.
VLC opens RTMP but shows no video
This is usually caused by H.265 over RTMP/FLV compatibility. Use HLS playback instead.
WebRTC has video but no sound
This can happen with browser/WebRTC audio compatibility. If HLS has both video and audio, the camera audio track is being transmitted correctly.
Video does not recover after weak network
Update to the latest app version with live-stream recovery enabled. Then repeat the weak-network test and check whether the video returns automatically after the network improves.
9. Recommended Test Baseline
Camera RTMP publish URL:
rtmp://192.168.2.241:1935/live/stream
Browser/VLC HLS playback URL:
http://192.168.2.241:8888/live/stream/index.m3u8
Low-latency browser playback:
http://192.168.2.241:8889/live/stream
Use the HLS URL as the main reference for stability testing because it can verify both video and audio.