Let us introduce to you our game-changing RTSP Output Live Streaming Plugin for Ant Media Server. With this integration users gain the remarkable ability to effortlessly link Ant Media Server with a wide array of RTSP-compatible devices, platforms, and systems.
Ant Media Server is an absolute powerhouse of a media server, capable of handling an impressive array of streaming protocols like WebRTC, RTMP, SRT, RTSP input, WebRTC, DASH and HLS output. But, hang on to your hats because there’s been one noticeable protocol missing from this star-studded lineup – RTSP output!
And here’s the thrilling news: we’ve been work hard to bridge this gap, and today, we are thrilled to unveil this update.
Note: The RTSP Output Plugin works with Ant Media Server v2.6.4 and above.
Table of Contents
Who can use RTSP Egress?
We explained what Real-Time Streaming Protocol is and how it works in our previous article. Make sure to check it out. Let’s just note here that RTSP remains a top protocol choice for IP cameras and therefore finds the most usage by video surveillance software and apps.
What are the benefits of using RTSP Output Live Streaming Plugin?
The RTSP Output Plugin seamlessly extends the capabilities of projects built on Ant Media Server enabling it to communicate with external devices and platforms through the RTSP protocol. The most common advantages are:
- Interoperability: Achieve interoperability with a wide range of RTSP-compatible devices and platforms.
- Remote Monitoring: Enable remote monitoring and surveillance applications with ease.
- Live Streaming: Facilitate live streaming from the Ant Media Server to various RTSP clients.
- Integration: Seamlessly integrate with video management systems, IP cameras, and video surveillance systems that typically use RTSP as an ingestion protocol for applying various analytics on the video stream.
Now, picture this: a high-stakes security surveillance system that heavily relies on IP cameras to vigilantly monitor critical areas. By seamlessly integrating Ant Media Server with this plugin, the security system gains a remarkable superpower. It can effortlessly stream video and audio data in real-time over RTSP, opening up a world of possibilities.
What does this mean in practical terms? Well, for starters, it enables smooth integration with third-party video management systems that are fully compatible with the RTSP protocol.
The best part? Our versatile plugin is no one-trick pony. It’s designed to ingest data in any protocol supported by Ant Media, whether it’s WebRTC, SRT, RTMP, or RTSP, and then effortlessly transform it into RTSP, RTMP, or even RTP if that’s what your heart desires. The possibilities are boundless, and the results are nothing short of spectacular!
How the RTSP Output Plugin works?
In the diagram below, you can see how our RTSP Output Plugin acts as a bridge between Ant Media Server and an RTSP-compatible system:
Getting Started with RTSP Output Plugin
How to install the RTSP Output Plugin?
- Go to GST-ANT-FUSION
- Download the dist.zip file according to your Antmedia Version
- Unzip the file dist.zip file
- Run
sudo sh gst_plugin_install.sh
- restart the server
sudo service antmedia restart
The plugin will be installed.
How to get an RTSP output Stream?
There are two ways to register a stream for RTSP output.
- If you want to have RTSP output for any stream, you can simply send a REST API request to enable RTSP for that particular stream.
- If you want to have RTSP output for every stream without having to call a REST API, you can simply set RTSP by default in the plugin configuration file. In this way, you don’t need to call the rest API, and the RTSP stream will be available for every stream that you publish to Ant Media Server.
REST API Method:
- You can send a video stream either with WebRTC, RTMP, RTSP, or SRT.
- Send a REST API request. RTSP supports both UDP and TCP, so you can set the protocol as TCP or UDP.
curl -X POST -H "Content-Type: application/json" -d '{"streamId":"stream111","pipeline_type":"RTSP_OUT","protocol":"TCP"}' http://localhost:5080/LiveApp/rest/pipeline/register-pipeline/
- Play the stream with ffplay..
- Change the IP Address in the command.
ffplay rtsp://127.0.0.1:8554/stream1
Enabling RTSP by Default In the Configuration File:
- Edit to
/usr/local/antmedia/gst-plugin.cfg
- Set RTSP in Default Protocols to 1 to set the desired protocol and port for RTSP output.
- Save the settings.
- Restart the server.
- Now for every stream that is published to the Ant Media server, The RTSP output stream will be available by default.
Current Limitations
- Currently, the plugin is under Beta Release.
- Currently, one stream can either be registered for RTSP, RTMP, or a custom Gstreamer pipeline. No two pipelines can be registered at the same time.
- For video, we support : H264 , H265 , VP8
- For audio, we support : AAC Opus
- The output stream for RTSP is non-muxed.
- RTSP can work on top of UDP as well as TCP. But UDP might give Artifact on the video.
Summary
The introduction of our RTSP Output Plugin for Ant Media Server marks a thrilling leap towards extending the horizons of this already formidable media server. With the integration of RTSP output, users gain the remarkable ability to effortlessly link Ant Media Server with a wide array of RTSP-compatible devices, platforms, and systems.
We extend an invitation for you to delve into the boundless opportunities that our plugin presents, actively participate in its ongoing development, and join us on this exciting journey to elevate and enrich media streaming experiences for everyone. Together, we can shape the future of media streaming! 🌟