Protocol Support
Understanding UDP and RTMP protocols for video ingestion.
Table of contents
- Supported Protocols
- UDP Multicast
- RTMP Streaming
- Protocol Comparison
- Protocol Specifications
- Network Configuration
- Best Practices
- Diagnostic Commands
- Related Documentation
Supported Protocols
Encora Stream supports two primary protocols for ingesting live video streams:
- UDP Multicast: Traditional broadcast workflow protocol
- RTMP: Internet-based streaming protocol
UDP Multicast
Overview
UDP (User Datagram Protocol) multicast is widely used in professional broadcast environments for transporting MPEG-TS streams over IP networks.
URL Format
udp://@[multicast-address]:[port]
Examples
udp://@239.1.1.1:5000
udp://@239.255.0.1:1234
udp://@225.100.100.100:5004
Characteristics
| Feature | Description |
|---|---|
| Protocol | UDP (connectionless) |
| Format | MPEG-TS (Transport Stream) |
| Latency | Very low (< 1 second) |
| Reliability | No retransmission |
| Use Case | Professional broadcast, studio environments |
| Network | Requires multicast routing |
Network Requirements
Multicast Routing:
- Network switches must support IGMP (Internet Group Management Protocol)
- Routers must be configured for multicast forwarding
- VLANs may require multicast configuration
Bandwidth:
- Dedicated network bandwidth for video traffic
- Typical: 5-15 Mbps per HD stream
- Higher for 4K content (25-50 Mbps)
Quality of Service (QoS):
- Prioritize video traffic
- Minimize packet loss
- Reduce jitter and latency
Configuration Steps
1. Verify Network Support
Check if multicast is enabled:
# On Linux server
ip route show | grep multicast
2. Test Multicast Reception
Use ffprobe to verify stream:
ffprobe -v error -show_streams udp://@239.1.1.1:5000
3. Monitor Multicast Traffic
tcpdump -i eth0 host 239.1.1.1 and port 5000
Advantages
✅ Low Latency: Minimal delay from encoder to platform ✅ High Quality: No compression artifacts from protocol ✅ Network Efficient: One stream serves multiple receivers ✅ Professional Standard: Industry standard in broadcast
Limitations
❌ Network Dependent: Requires proper multicast configuration ❌ No Error Correction: Lost packets cannot be recovered ❌ Limited to LAN: Typically not routed over internet ❌ Complex Troubleshooting: Requires network expertise
Troubleshooting UDP
Issue: Stream not received
Check these items:
- Multicast routing enabled
ip route show | grep multicast - Firewall allows UDP
sudo iptables -L -n | grep udp - Encoder is transmitting
- Check encoder status
- Verify output configuration
- Monitor encoder network interface
- Correct network interface
- Verify interface receives multicast
- Check IGMP membership
- Monitor interface statistics
RTMP Streaming
Overview
RTMP (Real-Time Messaging Protocol) is a TCP-based protocol widely used for internet streaming, particularly with OBS, Wirecast, and cloud encoders.
URL Format
rtmp://[server]:[port]/[application]/[stream-key]
Examples
rtmp://encoder.example.com:1935/live/stream-key-123
rtmp://10.0.1.100:1935/live/channel01
rtmp://rtmp.streaming.com:1935/app/secret_key_xyz
Characteristics
| Feature | Description |
|---|---|
| Protocol | TCP (connection-oriented) |
| Format | FLV container (H.264 + AAC) |
| Latency | Low (2-5 seconds) |
| Reliability | Automatic retransmission |
| Use Case | OBS, cloud encoders, remote feeds |
| Network | Works over internet |
Port Configuration
Default Port: 1935
Firewall Rules:
# Allow RTMP traffic
sudo iptables -A INPUT -p tcp --dport 1935 -j ACCEPT
Authentication
Stream Keys:
- Use strong, random stream keys
- Rotate keys periodically
- Keep keys confidential
- Monitor for unauthorized use
Example Stream Key Format:
live_event_2024_secure_a1b2c3d4e5f6
Configuration Steps
1. Test RTMP Connection
Use ffprobe:
ffprobe -v error rtmp://encoder.example.com:1935/live/stream-key
2. Monitor RTMP Stream
Use ffplay for testing:
ffplay rtmp://encoder.example.com:1935/live/stream-key
3. Check RTMP Server Logs
Review server logs for connection attempts and errors.
Advantages
✅ Internet Friendly: Works over standard networks ✅ Reliable: TCP ensures packet delivery ✅ Widely Supported: OBS, Wirecast, vMix, etc. ✅ Firewall Friendly: Uses standard ports
Limitations
❌ Higher Latency: TCP overhead adds delay ❌ Bandwidth Overhead: Protocol metadata ❌ Single Receiver: One-to-one connection ❌ Internet Dependent: Requires stable internet
Troubleshooting RTMP
Issue: Cannot connect to RTMP server
- Verify server is reachable
telnet encoder.example.com 1935 - Check stream key
- Verify stream key is correct
- Check for typos
- Ensure no spaces or special characters
- Firewall configuration
- Port 1935 must be open
- Check both server and encoder firewalls
- Verify NAT configuration if applicable
- Encoder settings
- Verify RTMP URL is correct
- Check encoder output format (H.264 + AAC)
- Ensure encoder is streaming
Protocol Comparison
When to Use UDP
Choose UDP multicast when:
- ✅ Operating in a controlled LAN environment
- ✅ Using professional broadcast equipment
- ✅ Lowest possible latency is critical
- ✅ Network supports multicast routing
- ✅ High-quality, uncompressed feed required
When to Use RTMP
Choose RTMP when:
- ✅ Encoder is remote or internet-based
- ✅ Using OBS, Wirecast, or similar software
- ✅ Network multicast is not available
- ✅ Need simple, reliable connection
- ✅ Working with content creators
Protocol Specifications
UDP Multicast
Technical Specifications:
| Parameter | Value |
|---|---|
| Transport | UDP |
| Container | MPEG-TS |
| Video Codec | H.264, HEVC |
| Audio Codec | AAC, MPEG Audio |
| Multicast Range | 224.0.0.0 to 239.255.255.255 |
| Typical Bitrate | 5-50 Mbps |
RTMP
Technical Specifications:
| Parameter | Value |
|---|---|
| Transport | TCP |
| Container | FLV |
| Video Codec | H.264 |
| Audio Codec | AAC, MP3 |
| Default Port | 1935 |
| Typical Bitrate | 2-10 Mbps |
Network Configuration
Bandwidth Requirements
UDP Multicast:
- Dedicated VLAN recommended
- QoS priority for video traffic
- No bandwidth multiplication (efficient)
RTMP:
- Requires upload bandwidth at encoder
- Download bandwidth at platform
- Each stream needs full bandwidth
Firewall Configuration
UDP Multicast:
# Allow multicast traffic
sudo iptables -A INPUT -p udp -d 224.0.0.0/4 -j ACCEPT
RTMP:
# Allow RTMP port
sudo iptables -A INPUT -p tcp --dport 1935 -j ACCEPT
Best Practices
For UDP Multicast
- Use dedicated network for video traffic
- Configure QoS to prioritize video
- Test multicast routing before deployment
- Monitor packet loss continuously
- Document multicast groups used
For RTMP
- Use strong stream keys for security
- Monitor connection stability
- Implement reconnection logic in encoders
- Test with representative content before production
- Keep backup RTMP servers for redundancy
Diagnostic Commands
UDP Testing
Check stream availability:
ffprobe -v error -show_streams udp://@239.1.1.1:5000
Monitor packets:
tcpdump -i eth0 host 239.1.1.1
Test playback:
ffplay udp://@239.1.1.1:5000
RTMP Testing
Check stream availability:
ffprobe rtmp://server:1935/live/stream-key
Test playback:
ffplay rtmp://server:1935/live/stream-key
Monitor connection:
netstat -an | grep 1935
Related Documentation
- Configuration Guide - Set up input streams
- Testing Guide - Verify stream functionality
- Best Practices - Optimization tips
- Troubleshooting - Common issues