# RTSP source

Media Blocks SDK .Net

The RTSP source supports connection to IP cameras and other devices supporting the RTSP protocol.

Supported video codecs: H264, HEVC, MJPEG. Supported audio codecs: AAC, MP3, PCM, G726, G711, and some others if FFMPEG redist is installed.

# Block info

Name: RTSPSourceBlock.

Pin direction Media type Pins count
Output audio depends from decoder one or more
Output video depends from decoder one or more
Output subtitle depends from decoder one or more

# The sample pipeline

RTSPSourceBlock:VideoOutputVideoRendererBlock RTSPSourceBlock:AudioOutputAudioRendererBlock

# Sample code

var pipeline = new MediaBlocksPipeline();

var rtspSettings = new RTSPSourceSettings(new Uri("rtsp://login:pwd@192.168.1.64:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1"), true)
            {
                Login = "login",
                Password = "pwd"
            };

var rtspSource = new RTSPSourceBlock(rtspSettings);

var videoRenderer = new VideoRendererBlock(pipeline, VideoView1);
pipeline.Connect(rtspSource.VideoOutput, videoRenderer.Input);

var audioRenderer = new AudioRendererBlock();
pipeline.Connect(rtspSource.AudioOutput, audioRenderer.Input);      

await pipeline.StartAsync();

# Sample applications

# Platforms

Windows, macOS, Linux, iOS, Android.