Published on September 10, 2018 (over 5 years ago)

Introducing our Live Streaming API

Bonnie Pecevich
By Bonnie Pecevich5 min readProduct

If you’ve been trying to build live streaming into your application—whether it’s “Twitch for X”, online classrooms, a news & sports broadcasting platform, or something the world’s never seen before—you’ve likely realized how complex it could be. At Mux, we want to make it easy for any development team to build video, and that includes live streams. We’re excited to bring you Mux Video Live which gives you everything you need to push a live stream and playback high-quality video with a simple API call.

LinkBuilding live streams today

Live streaming is currently one of the hardest things to do well. The technical challenge can be significant enough to stop a project in its tracks.

Current tools require you to cobble together a solution from scratch for live encoding, live streaming, live workflow (thumbnailing, clipping, security), and turning a live event into a VOD archive. Doing this well takes months! Some of the requirements you’ll need to figure out include:

  • Which streaming protocol will you use? What are the tradeoffs for each?
  • Is your player compatible and are there any restrictions?
  • How will you optimize the encoding, bitrate, resolution, and framerate settings for optimal quality and low latency?

In addition, if your product features user-generated content (UGC), you’ll have to plan for scale in two different ways:

  • Can your platform handle potentially thousands of people streaming video from their camera or device into your application?
  • Can your platform survive millions of people viewing those live videos?

If you don’t get these right, it will certainly impact the quality of experience which is critical in live streaming. (Even YouTube doesn’t get it all right all the time.)

Worst case scenario of a full outage aside, unacceptable latency can ruin a live stream experience for both streamers and viewers.

Latency comes in two forms.

For the broadcaster, if there’s a lag time from when a streamer hits “go live” to when the broadcast actually starts, they could miss the opportunity to capture and share a moment that might not be able to be recreated.

On the other side, if the latency from the camera to the viewer is too high, viewers could have a degraded experience or miss out on seeing the content altogether. For example, because of a delayed stream, a viewer might catch the results of a sporting event on Twitter before being able to watch it themselves. Or they may play a game with live audience participation but end up feeling frustrated and abandon it.

LinkAnnouncing Mux Video Live

We want to help you make sure you deliver a superior live streaming experience each and every time so we’re excited to reveal the newest addition to Mux Video, our live streaming API. It allows you to easily build high-quality live streams into your application without having to be a video expert or hire one.

Mux Video Live lets you stream from just about anywhere—a mobile app, broadcast software like OBS, or hardware encoder—and broadcast to any device. As your application gains traction and viewership grows, we grow with you. There’s no cap on streams or viewers so you don’t have to worry about reaching max capacity or spinning up additional servers.

We built our live streaming API with the same focus on performance as our Video API. No matter where they are in the world, your viewers will enjoy a quality, reliable live stream experience delivered via high-performance content delivery networks (CDNs) using adaptive bitrate (ABR) streaming.

On top of all that, our live streams are ready to be broadcast as soon as your streamers are. Your users never have to worry about missing a moment. Plus, as an added bonus, we automatically record every live stream for you.

LinkHow it works

There are three steps to live streaming with Mux:

1. Create a live stream

Send a POST request to the /live-streams API endpoint and get back a Stream Key.

Example response:

text
{ "data": { "id": "QrikEQpEXp3RvklQSHyHSYOakQkXlRId", "stream_key": "super-secret-stream-key", "status": "idle", "playback_ids": [ { "policy": "public", "id": "OJxPwQuByldIr02VfoXDdX6Ynl01MTgC8w02" } ], "created_at": "1527110899" } }

2. Start streaming

Start streaming to a unique RTMP URL, using your Stream Key. Example RTMP URL:

rtmp://global-live.mux.com:5222/app/super-secret-stream-key

3. Play it!

Use your Playback ID to create a playback URL, and drop the URL in any modern player:

https://stream.mux.com/{PLAYBACK_ID}.m3u8

That’s all it takes! For full documentation, go here.

LinkThe future of video is live

The Mux live streaming API will do the technical heavy lifting so you can focus on building a great product and your users can focus on creating exciting content. We believe we’re only just scratching the surface of what live streaming can do. For example, we’re seeing more creative applications emerging that incorporate live interactions with users, like Crowdcast, a platform that lets creators foster meaningful relationships with their followers through live Q&A, interviews, and more. There’s so much potential for live video - we can’t wait to see what you make.

Sign up for Mux Video Live today! If you have any questions about how to build video into your project, we’re always happy to chat. Let us know how we can help you get started.

Written By

Bonnie Pecevich

Bonnie Pecevich – Sr. Product Marketing Manager

Focused on go-to-market strategy and developer marketing. Former Brownie Girl Scout and now just brownie eater.

Leave your wallet where it is

No credit card required to get started.