Click here to Skip to main content
Click here to Skip to main content

RTSP Server Made Easy with LEADTOOLS 18

, 1 May 2014
RTSP Server Made Easy with LEADTOOLS 18

Editorial Note

This article is in the Product Showcase section for our sponsors at CodeProject. These reviews are intended to provide you with information on products and services that we consider useful and of value to developers.

Introduction

Real Time Streaming Protocol (RTSP) is a popular method of implementing video on demand, security and more, but can be an extremely demanding end to end engineering task. Creating an RTSP Server capable of streaming high quality audio and video data securely and concurrently to hundreds of clients is no small undertaking and can take years to research and develop.

LEADTOOLS, the world’s leading provider of award-winning SDKs for multimedia raster, document and medical imaging, has released in Version 18 its new RTSP Server technology. In addition to the high level development libraries to expedite the server side development, LEAD’s top-notch play, capture, conversion and DVR can be utilized to develop a high end RTSP client application. Codecs, multiplexers and demultiplexers for h.264, MPEG-4, MPEG-2, JPEG, AAC, AMR and more ensure that your videos are encoded and decoded with the best quality, compression and speed the market has to offer, making LEADTOOLS the complete package for all of your Multimedia development needs.

Key RTSP Server and Client Features in LEADTOOLS Multimedia SDKs

  • Develop a fully-featured and secure RTSP Server with minimal coding
  • Play, pause and stop any RTSP source
  • Connect to any RTSP source with UDP or HTTP protocols
  • Use HTTP Tunneling to stream data from RTSP cameras on another network
  • Supports many popular audio and video compression formats including
    • H.264
    • MPEG-4
    • JPEG
    • AAC
    • AMR
    • G.711
  • Capture and convert streams for archival, burning to DVD or integration with DVR
  • High level .NET, COM and C/C++ interfaces for DirectShow and Media Foundation application development

The RTSP Code

In any RTSP server application, the foundational feature is streaming to and communicating with the client(s). There are many protocol directives including DESCRIBE, SETUP, PLAY, PAUSE and more. The LEADTOOLS RTSPServer object handles them for you with only a few basic lines of code.

class RTSPServerClass
{
   RTSPServer _server = null;
   public void StartServer()
   {
      _server = new RTSPServer(); // create the server instance
      _server.SetSourceFolder(0, @"c:\MyFiles"); // specify c:\MyFiles as the source folder
      _server.TargetAddress = "127.0.0.1"; // will listen on 127.0.0.1
      _server.StartServer(554); // start listening on port 554
   }
 
   public void StopServer()
   {
      _server.StopServer(554);
      _server.Dispose();
   }
}

Now you have a fully functional and compliant RTSP Server to which any media player with RTSP support can connect.

Security is often the most difficult and important aspect of any network-based application, especially when the transmission of sensitive or private information is involved. LEADTOOLS encapsulates all of the necessary security handshakes and communication for you as well. Simply set up the RTSPSecurity object and pass it to the RTSPServer and your server is now secure with either Basic or Digest authentication. The example below sets the security globally, but it can also be set on a per folder basis so that different users are granted access to different materials.

using (RTSPSecurity security = new RTSPSecurity())
{
   security.RealmName = "LEAD RTSP Server Demo";
  
   // Set the security type
   security.AuthenticationRequired = RTSPAuthenticationType.Basic;
   //security.AuthenticationRequired = RTSPAuthenticationType.Digest;
 
   // add only one user
   security.AddUser("User", "Password");
 
   // set this as the security information for all the folders
   _server.SetSecurity(-1, security);
}

Download the Full RTSP Example

You can download a fully functional demo which includes the features discussed above. To run these examples you will need the following:

Support

Need help getting this sample up and going? Contact our support team for free technical support! For pricing or licensing questions, you can contact our sales team (sales@leadtools.com) or call us at 704-332-5532.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

LEADTOOLS Support
Help desk / Support LEAD Technologies, Inc.
United States United States
With a rich history of over twenty years, LEAD has established itself as the world's leading provider of software development toolkits for document, medical, multimedia, raster and vector imaging. LEAD's flagship product, LEADTOOLS, holds the top position in every major country throughout the world and boasts a healthy, diverse customer base and strong list of corporate partners including some of the largest and most influential organizations from around the globe. For more information, contact sales@leadtools.com or support@leadtools.com.
Group type: Organisation (No members)


Follow on   Twitter   Google+

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 1 May 2014
Article Copyright 2013 by LEADTOOLS Support
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid