RTSP (Real Time Streaming Protocol) is a network control protocol designed for streaming media servers. It’s commonly used in IP cameras, surveillance systems, and professional broadcasting equipment.
Ant Media Server supports RTSP URL parameters for advanced configuration:
rtsp://camera.ip/stream?param=value# Allowed media types (video, audio, or both)rtsp://192.168.1.100:554/stream?allowed_media_types=videortsp://192.168.1.100:554/stream?allowed_media_types=audiortsp://192.168.1.100:554/stream?allowed_media_types=video+audio
# Test RTSP connectivityffprobe -rtsp_transport tcp rtsp://192.168.1.100:554/stream# Check camera is reachableping 192.168.1.100# Test porttelnet 192.168.1.100 554nc -zv 192.168.1.100 554# Try different transportsffplay -rtsp_transport tcp rtsp://192.168.1.100:554/streamffplay -rtsp_transport udp rtsp://192.168.1.100:554/stream
Authentication Errors:
# Verify credentialsffprobe rtsp://admin:password@192.168.1.100:554/stream# URL encode special characters in password# Example: password with @ symbolrtsp://admin:p%40ssword@192.168.1.100:554/stream
# Disable bufferingsettings.streamFetcherBufferTime=0# Use TCP for reliabilityrtsp_transport=tcp# Minimize HLS latencysettings.hlsTime=2settings.hlsListSize=3
Handle Multiple Streams:
# Monitor system resourcestop -p $(pgrep -d',' java)# Check stream countcurl http://localhost:5080/WebRTCAppEE/rest/v2/broadcasts/count# Optimize encoder settings for IP camerassettings.encoderSettings=[]# Use direct copy when possible
#!/bin/bash# Start cameras during business hoursSTART_HOUR=9END_HOUR=18CURRENT_HOUR=$(date +%H)if [ $CURRENT_HOUR -ge $START_HOUR ] && [ $CURRENT_HOUR -lt $END_HOUR ]; then # Start all cameras for i in {1..10}; do curl -X POST "https://your-server.com:5443/WebRTCAppEE/rest/v2/broadcasts/camera$i/start" doneelse # Stop all cameras for i in {1..10}; do curl -X POST "https://your-server.com:5443/WebRTCAppEE/rest/v2/broadcasts/camera$i/stop" donefi
RTSP server functionality for accepting RTSP streams (publishing) requires custom development or third-party integration. Ant Media Server natively supports RTSP as a client (pulling) but not as an RTSP server (receiving).
For RTSP publishing, consider:
Use RTMP for publishing to Ant Media Server
Use WebRTC for browser-based publishing
Use SRT for reliable contribution feeds
Deploy an RTSP server (like rtsp-simple-server) and pull from it