Files
usda-vision/rtsp_access_guide.md
salirezav b7adc3788a Implement RTSP streaming functionality for cameras
- Added endpoints to start and stop RTSP streaming for cameras in the API.
- Enhanced CameraManager and CameraStreamer classes to manage RTSP streaming state and processes.
- Updated API documentation to include new RTSP streaming commands.
- Modified Docker configurations to include FFmpeg for RTSP streaming support.
- Adjusted MediaMTX settings for improved stream handling and timeout configurations.
2025-11-01 12:35:25 -04:00

1.8 KiB

RTSP Streaming Access Guide (Tailscale)

Your Tailscale IP

100.93.40.84

Access URLs

Replace exp-dash with 100.93.40.84 in all URLs when accessing from outside the VM.

1. MediaMTX Web Interface (Best for Testing)

http://100.93.40.84:8889/static/

This shows all available streams with a built-in player.

2. Direct WebRTC Player for Camera1

http://100.93.40.84:8889/camera1/webrtc

This is a browser-based player that works without VLC.

3. RTSP URL (for VLC/ffplay)

rtsp://100.93.40.84:8554/camera1

For VLC:

  • File → Open Network Stream
  • URL: rtsp://100.93.40.84:8554/camera1
  • Or use: rtsp://100.93.40.84:8554/camera1?transport=tcp

For ffplay:

ffplay -rtsp_transport tcp rtsp://100.93.40.84:8554/camera1

Important Notes

  1. Stream Timeout: MediaMTX closes streams after ~10 seconds if no one is watching. Make sure to:

    • Start RTSP first: curl -X POST http://exp-dash:8000/cameras/camera1/start-rtsp
    • Then quickly open the viewer within 10 seconds
  2. Ports Exposed:

    • 8554: RTSP
    • 8889: WebRTC/HTTP API
    • 8189: WebRTC UDP
  3. Network: Tailscale creates a VPN, so you can access these URLs from anywhere, as long as your client device is also on the same Tailscale network.

Testing Steps

  1. Start the stream:

    curl -X POST http://exp-dash:8000/cameras/camera1/start-rtsp
    
  2. Quickly open a viewer (within 10 seconds):

    • Open browser: http://100.93.40.84:8889/static/
    • Or: http://100.93.40.84:8889/camera1/webrtc
  3. Check status:

    ./check_rtsp_status.sh
    

Troubleshooting

If you see "no stream is available":

  • The stream might have timed out (waited >10 seconds without viewer)
  • Restart the stream and quickly connect
  • Check logs: docker compose logs api --tail 20 | grep RTSP