The LEAD RTSP Sink is a DirectShow filter implementing an RTSP server. The data is streamed on a UDP port in RTP packets conforming to RFC 1889 and RFC 1890 in separate video and audio streams. You can use the LEAD RTSP Source filter for playing files from the RTSP Server.
The RTSP streaming technology is somewhat similar with the HTTP server technology, because it waits for connections and then it can stream various files present on the server. Multiple files can be streamed at the same time, independently of each other. Additionally, the clients can view different portions of the media (when the media is a file) or the live stream (if the source is a stream).
You can also implement RTSP server functionality using the Media Streaming SDK.
The simplest way to implement a live stream is to use the DVR engine and create a file with the LEAD DVR Sink filter.
Currently, the following formats are supported:
The LEAD RTSP Sink requires a specific form of H264 (AVC format stored in ISO files). So if the input file uses different H264 compression, you may need to use the LEAD H264 Transcoder.
The LEAD RTSP Sink requires a specific form of H265 (HEVC format stored in ISO files). So if the input file uses different H265 compression, you may need to use the LEAD H265 Transcoder.
The LEAD RTSP Sink requires a specific form of AAC compression (mp4a format stored in ISO files). So if the input file uses different AAC compression, you might need to use the LEAD AAC Transcoder.
Note that the LEADTOOLS Multimedia toolkit will automatically use these transcoder filters whenever necessary, so all you need to do is redistribute them with your application.
The filter implements multiple objects to achieve this:
The Server is listening for connections. Use the IFileSinkFilter::SetFileName method of the standard IFileSinkFilter interface to specify which address and port should be used for listening. Also, use the ILMRTSPServer interface to manage the server.
The Media object is streaming similar files. For example, you can implement a Media object for streaming all of the files from a specific folder. Use the ILMRTSPServerMedia interface to manage the Media object. Add Media objects to the Server using the ILMRTSPServer::AddMedia method.
The Session object manages one connection. Create the Session objects by implementing the ILMRTSPServerSession interface and associating them with the Session list in the Media object. Each Session object has a Convert or Capture object that has the RTSP Sink filter as the sink. Listen to the RTSP commands to Set up, Play and Pause a specific session and issue the appropriate commands to render, play or pause the corresponding DirectShow graph. The ILMRTSPCommandParser and ILMRTSPResponseBuilder interfaces can be used to parse the RTSP command received from the client.
The Security object manages security by implementing the ILMRTSPSecurity interface. The security settings can be the same for all of the Sessions or you can have different security settings for each Session.
Create the filter using the server CLSID (CLSID_LMRTSPServer) when you are going to use the filter as the main RTSP server.
Create the filter using the filter CLSID (CLSID_LMRTSPSnk) when you are going to use the filter as a sink in a DirectShow graph. See the Creating an RTSP Server using the RTSP Sink topic for more details on the various ways you can use this filter.
Technical details for the filter are provided in the following table:
|Input Media Types||Type:|
|Output Media Types||N/A|
|Property Page CLSID||N/A|
This filter is included as part of the following modules: