-
Notifications
You must be signed in to change notification settings - Fork 57
RTSP Server, SDP
When using network protocol SDP or RTSP, UltraGrid uses RTP as normally but 2 things act differently:
- codecs are packed according to the RFCs (that however limits available codecs that can be used - H.264 for video and OPUS or PCMU for audio)
- descriptive SDP file is produced - depending on the protocol used it is provided either as a file (or with a HTTP server) or utilized within a RTSP session
Note: Current implementation is able to handle only one receiver at the same time. To process multiple receivers, check Use Cases.
RTSP server can be run with following commands:
uv -t <your_capture> -c libavcodec:encoder=libx264 --video-protocol rtsp
or with audio
uv -t <your_capture> -c libavcodec:encoder=libx264 --video-protocol rtsp -s <audio_cap> --audio-codec u-law --audio-protocol rtsp
If you omit audio/video compression, some suitable will be chosen.
uv -t <video_capture> -s <audio_capture> --protocol sdp <receiver>
In this case, default compression will be chosen (can be changed similarly to RTSP, eg. also A-law or OPUS for audio). SDP file ug.sdp will be created which can then be played by the receiver given on command-line. Alternatively, the receiver can use (play) the URL provided by sender on terminal, eg.:
mplayer http://93.184.216.34:8554/ug.sdp
UltraGrid can also use a multicast address as a receiver. In that case all receivers that are able to receive multicast can join the multicast group:
uv -t <video_capture> -s <audio_capture> --protocol sdp 224.0.0.20 # sender IPv4
uv -t <video_capture> -s <audio_capture> --protocol sdp ff02::20 # sender IPv6
mplayer http://93.184.216.34:8554/ug.sdp # receivers IPv4
- 1 channel PCMA/PCMU 8000 Hz (G.711) -
--audio-codec u-law:sample-rate=8000
- 1 channel PCMA/PCMU or OPUS 48000 Hz
- 2 channel PCMA/PCMU 48000 Hz (
--audio-codec u-law --audio-capture-format channels=2
)
not working:
- OPUS with 2 or more channels
may be working:
- 1 channel OPUS with supported sampling rates (8, 12, 16, 24 and 48 kHz)
- multi-channel PCMA/PCMU with various sample rates
Only H.264 is currently supported. For best compatibility it is recommended to turn of Intra Frame Refresh and possibly reduce the bitrate.
If you have any technical or non-technical question or suggestion please feel free to contact us at