LAN streaming¶
Expose a local stream to phones, televisions, laptops, and other devices on the same network with one flag:
The CLI reports both the local URL and discovered network addresses:
Open the LAN: URL on the other device. If several network adapters are present, the primary route is printed first.
Python¶
from easy_rtsp import Stream
stream = Stream.from_webcam(0, lan_access=True).serve("live")
for url in stream.lan_viewer_urls:
print(url)
stream.wait()
Browser playback¶
Enable WebRTC when the receiving device should use a browser:
Open the printed LAN WebRTC: URL. The equivalent Python properties are webrtc_play_url and lan_webrtc_play_urls.
Firewall ports¶
| Mode | Default inbound ports |
|---|---|
| RTSP over TCP | TCP 8554 |
| WebRTC signaling | TCP 8889 |
| WebRTC media | UDP or TCP 8189 |
Use your configured --server-port or --webrtc-port when those defaults are overridden.
Trusted networks only
The generated LAN server does not configure authentication. Anyone who can reach the host on that network may be able to view or replace the configured publisher path. Do not expose it directly to the public internet.
When another device cannot connect¶
- Confirm both devices are on the same non-guest network.
- Try the first printed LAN address.
- Allow MediaMTX through the host firewall, or allow the ports above.
- Temporarily disable a VPN to rule out route and virtual-adapter conflicts.
- Check whether the router enables client isolation, common on guest Wi-Fi.
See Troubleshooting for deeper checks.