Published on November 6, 2018 (over 5 years ago)

Our Approach To Live

Nicholas Chadwick
By Nicholas Chadwick5 min readProduct

LinkWhat makes a great live streaming video API?

This is a question Mux tackled when building our live streaming API earlier this year. We began by looking at some of the most common scenarios folks asked us to support, and tried to create a live streaming API that would address most use cases. For example, we often hear customers ask ‘how do I build “Twitch for X”?’, a use case we think we support exceptionally well.

Much of the team has a background working at innovative live video companies like Twitch, YouTube, and Brightcove, so we knew we had a great shot at making a live API that would really stand out amongst the crowd.

LinkThe essentials

We started with the essentials - RTMP for accepting live broadcasts, and HLS output streams. These protocols are mature, and are considered the industry standard for delivering great live experiences.

RTMP has been around for almost 15 years now, and while it’s starting to show its age, it’s also the best supported format for accepting live streams. From open-source publishing tools to $10,000 broadcasting hardware, RTMP is the right choice for getting started with live. Don’t just take our word for it - companies like Facebook, Twitch, and Google all support RTMP as the main way to broadcast live.

For playback, HLS outputs are supported nearly everywhere. Great projects like hls.js provide support for browsers and there is native support on iOS and Android devices. This makes it a solid way to build live streaming experiences that work everywhere your users are, and lets you focus on building a great player experience rather than worrying about formats and support.

LinkNo charge for live streams you aren’t using.

Getting the foundation right is just the start; controlling costs is crucial to building the next big streaming platform. That’s why Mux doesn’t charge you for creating live streaming endpoints and stream keys. Instead, we charge you for the minutes you actually stream. This makes it incredibly easy to support your users - create a unique live “stream key” for each of your users, and let them configure their broadcasting software once. Each time they go live, we’ll send you a webhook so you can respond appropriately.

This lets you create potentially thousands of unique live streams without needing to worry about it burning through your budget.

LinkLive streams when you’re live, and assets once you’re done.

Live streams are a uniquely engaging way to interact with audiences. But once the live stream is over, it doesn’t mean that engagement has to end. Unlike other platforms, we wanted to allow seamless transitions from live content to static content, with no waiting for additional processing or complex workflows to manage. Instead, the moment a broadcast ends we make an asset available to stream. This way you can easily create experiences that show viewers the most recent broadcasts a streamer has made, and provides an easy way to engage users with older content.

Don’t need an asset after the stream? Just call DELETE!

LinkLive thumbnails

Our innovative live thumbnails let you create thumbnails on the fly as they’re needed, without requiring up-front decisions about timestamps or formats. This gives you the flexibility to create thumbnails whenever you need them, without making complex API requests beforehand. With live, we even let you create thumbnails as the stream is active, allowing you to create flexible experiences like live thumbnails that actually match the content that’s being streamed right now, not what the broadcaster was doing 2 hours ago.

You can even create an animated gif of a live stream for instant sharing, capturing the moment and making it easy for viewers to share and spread the love for your broadcaster’s content.

LinkWatermarks

As developers we often don’t control the branding and imagery that our end-users are going to be using as they stream. That’s where our overlay features come in; it allows you to customize the layout and positioning of watermarks on your live streams, making it easy to make sure that as your streams are shared, viewers know where the content came from.

LinkThe future

We’re currently working on driving our latency even lower, working with our friends at places like JWPlayer and building on pioneering work by Twitter’s Periscope. We’re also looking at exciting next-generation formats like SRT and WebRTC to push our quality even further.

And that’s just a start; more clipping options, dynamic watermarks, and even per-scene adaptation for live streaming are all things Mux is hoping to build soon.

LinkGet started for free

You can try Mux Live right now! All new accounts come with $20 of credits to get you started for no cost. We can’t wait to see what you build, and if you have any questions or feature suggestions please reach out to us, we love helping developers create amazing experiences.

Written By

Nicholas Chadwick

Nicholas Chadwick – Staff Software Engineer

Distributed Systems Engineer specializing in Video, previously worked on live streaming at Twitch, Zencoder and Gaikai. Dungeon Master.

Leave your wallet where it is

No credit card required to get started.