DEV Community

Tim for Ant Media Server

Posted on • Edited on

Build a custom live streaming engine with Ant Media Server plugins

Image description
When content management solutions introduced a plugin ecosystem, it revolutionised how we can customise and extend websites.

The ability to easily install a plugin that provides some specific functionality for a specific use case feels like a dream and it still is.

WordPress has taken it to another level with enough plugins to totally transform a WordPress blog into a fully-fledged social media network, video hosting platforms like Youtube or a highly scalable e-commerce store.

With the rise of live streaming, the large players in the space such as Wowza, Agora and Castr are offering services to allow influencers, live auction houses and live shopping services to name just a few use cases to integrate live streaming into their applications.

But, you are still restricted to what the service has to offer. For example, what about integrating ad insertion, AI or a unique, amazing effect you want to apply to a live stream. It's not possible unless the service offers an API or a way of interacting with the live stream. At least, not until now!

Ant Media Server Streaming Engine

If you haven't heard of Ant Media Server, let me briefly explain it.

Ant Media Server is a live streaming engine built from Java that can be hosted on your own servers to enable a fully featured live streaming engine service.

Features include:

  • Multiple ingest formats like SRT, RTMP, WebRTC

  • WebRTC ~0.5 second latency

  • Restreaming to multiple endpoints e.g. social networks

  • Live stream recording locally or directly to Amazon S3

  • Multiple SDKs: Android, iOS, Flutter, React, React Native

  • Scaling and clusting to 500K viewers+

The software can support all of the most popular use cases you can think of and has an extremely reasonable licensing package. There is also a 1-click installation in the most popular cloud marketplaces like Amazon, Digital ocean and Vultr.

Ant Media Server Plugins, Applications and Marketplace

But Ant Media have now introduced a full-blown plugin architecture that can enable the customisation of the system.

They have launched a marketplace and there are already a few unique plugins that can be downloaded for free to extend the default offering.

A few plugins/applications from the marketplace include:

  • Portmeet - a Zoom-like application that enables a conferencing solution

  • Filter Plugin - add filters to the ongoing stream

  • OBS Castify - WebRTC for OBS (20MS P2P latency)

  • Stamp Plugin - add overlays to the video stream

  • DuetMaster - play a piano duet in Real-time

These are a few plugins and applications that are currently available in the marketplace ready to download and extend your Ant Media Server instance.

How to get started building plugins and applications

While the documentation for plugins and applications is not yet the best, there are a few resources available to get started.

There is a blog post plugin development guide and also a Youtube video Introducing the Plugin Mechanism but not much else yet.

What's the difference between plugins and Applications

A plugin is what will interact with the live stream and perform some pre-processing or capture some kind of data.

An application is a way to build a custom user interface to interact with the live streaming engine.

An example is the DuetMaster application in the marketplace.

It's a custom interface that uses the live streaming engine to send and process the data sent and received from the Ant Media Server instance to enable you to play the virtual piano with someone.

I think the marketplace and the flexibility of Ant Media Server are going to become more and more essential for the ever-growing demand for live streaming.

Top comments (0)