All About the Facebook Live API

Wowza Media Server is integrated with Cloud Server Wowza. Contact us to find out our latest offers!

The Facebook Live API helps simplify streaming for any content creator via quick integration into their camera, encoder or professional video workflow, and offers developers endless possibilities for customizing streaming.

Today, the Wowza ClearCaster™ appliance leverages the enhanced Facebook Live Encoder API to simplify streaming and connectivity to the platform for content creators of all backgrounds—with or without streaming knowledge. It allows broadcasters to use the Facebook user interface they’re already familiar with to connect their equipment and control streaming to Facebook Live.

In this video from the NAB Show 2018, see the wonders of the Facebook Live API revealed by the people who know about it most, including Facebook:

  • Cobra Commander of Facebook Videos Special Forces, Colleen Henry
  • Wowza CTO and co-creator of ClearCaster, Charlie Good
  • ClearCaster Product Lead, Anthony Lazaro

Full Video Transcript:

 

Anthony Lazaro:

Welcome to Wowza Studio Sessions live at NAB. Today we’re going to talk about Facebook Live, the Facebook Live API, building on the Facebook Live API, and I probably have two of the best people to talk to about that with us.

My name is Anthony Lazaro. I’m the Product Lead for Wowza ClearCaster. With me I have Colleen Henry who is kind of master in commander of all things Facebook. Colleen can you maybe intro yourself with your title?

Colleen Henry:

My title at work is Cobra Commander of Facebook Videos Special Forces. And mostly I just go and do whatever needs to be done to make live streaming work. Typically high end live streaming, like our own company events or things that … not a ton of events but the events that get viewed a lot. And I build a lot of the tooling around that.

Anthony Lazaro:

Awesome. So I was kind of close. And then I have Charlie Good, CTO and co-founder of Wowza-

Charlie Good:

Banana guy, probably one of the only CTOs left that writes code-

Anthony Lazaro:

It’s a lot of code.

Colleen Henry:

John Carmack, though.

Charlie Good:

There you go. I just can’t get away from it, so-

Anthony Lazaro:

Let’s just kick off with Facebook Live, Facebook Live API. Colleen, quick, what’s going on with the Facebook Live API, who can build it and use with it? What are cool things that are being done?

Colleen Henry:

There’s a bunch of really cool things that can be done with the Facebook Live API. Traditionally, if you had a platform like Livestream or Twitch or YouTube, you would just generate an RTMP URL and you’d get a traditional encoder and you’d manually configure it with all these settings that nobody understands, and then you would push it in and then your stream would just start instantly.

Problem is that that’s not a fantastic workflow for people who don’t know what they’re doing, or the first time they’re doing it, or even when you hit go, when are you actually started? So we actually collaborated with Wowza to create this reference design where they built the encoder and we built the APIs to try and make a workflow that’s really easy and works really well for people and is really high quality and high reliability. So we took away all the things that you can do to really accidentally misconfigure something and we really walk you through the process so that everything’s easy. You never have to manually configure anything, you don’t have to copy and paste anything. And the result of that is the Wowza ClearCaster.

Now there are other companies that are totally building on top of these APIs. They’re all public, but we partnered with you guys to … well first you had to dog through the initial versions of it and help us make it better. And now you’re setting the standard for how live streaming can be done.

Anthony Lazaro:

And that’s a little bit of the live video API versus the live encoding API. And Charlie I imagine you’ve built against both. Maybe you wanna describe, as someone who’s built into the live encoding API, how that works a little bit from your side?

Charlie Good:

Yeah, I think the magic … so the old methodology was you created a broadcast through making API calls. You’d get really back an RTMP URL. You’d be guessing what are the appropriate settings for Facebook. So you’re hoping that you’re setting the right frame rate and frame size and number of reference frames and number of view frames. That’s gonna give you a decent publish stream into Facebook. And then you would push it into Facebook. That was the traditional way to do it.

So with the new live API, it’s much more of a rich API to work against and all that configuration, all those complex decisions that you used to make and guess as to what were the best settings for Facebook, are all done behind the scenes. So now the encoder gets paired directly with Facebook and it will show up in the Facebook API. It could be used on the Live Create page.

When we actually do go live going to the preview state, we’re doing a handshake with Facebook telling us … we tell Facebook the size of the video and the frame rate and it comes back and tells us what are the appropriate frames encoding settings to use for that live stream. And that’s all just kind of magical. It makes it … for the user literally all they’re doing is going to the Live Create page and selecting their encoder and going live. And it’s the coolest thing ever.

Colleen Henry:

And your UI literally is Facebook.

Anthony Lazaro:

Right.

Colleen Henry:

So you pair it and when you go to an event, you don’t need to figure out what’s the IP address of the encoder and go to some web interface and then go somewhere and copy and paste into it. You just pair it sorta like a Roku. You get a six digit code and then go to Facebook and say “Encoder, turn on.” And you see a preview and then you say “Start.” And it sends a command and then encoder counts down and then it goes live.

Anthony Lazaro:

And the UI in Facebook, that Live Create page. There’s so much that you can do there. I think one thing that you guys launched recently was the Live Crossposting. What is Live Crossposting?

Colleen Henry:

Previously what you would’ve done with the Facebook Live API is that you would generate on lots of different pages an individual stream and then you would from your encoder send to all of those pages the same video. Or you would set it up to like a Wowza streaming agent or Wowza cloud and then syndicate to all of those pages.

That’s not really the way you want to do it. You don’t want to transfer video multiple times. You wanna have one asset. You wanna have one set of caching … or one set of assets caching on the CDN. So now you can actually say “Oh, these are all the page that I control. I’m gonna send in one stream but I just want it to appear in lots of different places.”

Anthony Lazaro:

It’s awesome. It saves a bunch of on premise work and also just makes it super easy, I think. Similar to how the paired encoder eliminates all the stream keys and configuration there.

Charlie Good:

Plus the bandwidth savings. If you were going to five pages, you needed five times the bandwidth to dev that. Unbelievable.

Anthony Lazaro:

And other APIs I’ve heard people ask about, one was geoblocking. And so that’s advanced and I think Charlie you might’ve coded against that and that’s also in the Facebook API?

Charlie Good:

Yeah, so that’s recently showed up in the Facebook UI. And as well in our UI. It gives you the ability to both geoblock and block in other aspects of a profile, to further control who’s watching your live streams. It’s really neat. Again, it’s like a free CDN for your customers to be able to reach their audience. And now you make sure you’re not reaching the audience you don’t want to reach if you don’t have the rights to the content in certain countries, you can block those countries and stream everywhere else.

Anthony Lazaro:

Yeah, earlier I was talking with someone who was streaming a lot of Rugby championships and I think that they contracted with television networks to go to certain countries but countries where they didn’t have any contract in place they were using Facebook Live as a way to build awareness for the sport, et cetera, And engage an audience that way.

Colleen, maybe speak to a little bit of the Facebook infrastructure from a end to end latency and even quality. I do think that Facebook is at an advantage to other platforms in terms of its end-to-end latency and what’s going on there, so do you wanna just speak to-

Colleen Henry:

So if you’re gonna … one way you could describe it is it’s photon to photon. Photons go into the glass, they hit the camera sensor and then the end photons come out of the screen. So exactly how fast that is, end-to-end right now varies a little bit whether you’re on web or Android or iOS. We’re working a lot on make it a much lower latency than it is now. I think we’re around like nine seconds right now.

You kind of what to be six or less for true interactivity. But it’s just not that bad with the ClearCaster the way that things come in to the RTMPS actually almost none of the latency is between the encoder and the platform. It’s that we’re trying to actually optimize for really scalable delivery right now so that if your broadcast becomes huge it doesn’t explode. But we’re working on techniques to make things much lower latency and scalable.

Anthony Lazaro:

Awesome. And Charlie, as someone building, how have you thought about interactivity and helping to increase that engagement with some of the tools Facebook provides?

Charlie Good:

Part of the product is a talent view right? So the talent can see what’s going on, they can see themselves on the screen as well as get feedback from the reactions and the comments as the presentation’s going. So really it provides a rich experience. I can see what questions are being asked or cues that are being sent my way as I’m doing a presentation, and then I can react to those directly in the event while it’s going on. We think that’s important. That’s one of the values of working with Facebook. It’s audience, and it’s interactivity, and engagement. And those are things that I think that we accomplish with the integration between the ClearCaster and the Facebook platform.

Anthony Lazaro:

And one other thing, I know the ClearCaster does to help with engagement is it can broadcast in square-

Colleen Henry:

Which kills us! But if you look at the numbers, people actually like vertical and square videos on their cell phone. A lot of people on Facebook are consuming on their cell phone. So it results in higher engagement.

But as we’re old school, we prefer our video to be 16 by 9, maybe even 2, 3, 5. But people really enjoy their 1:1 video it seems.

Charlie Good:

Yeah. It does hurt a little bit every time we find someone turns on that setting. That’s alright.

Colleen Henry:

But it does get higher engagement. Or also like captions, for example. Captions is another way to get much higher engagement. And one of the things ClearCaster does is if you plug in an SDI feed with captions on it you just get captions on Facebook Live.

Anthony Lazaro:

And I know for square, too, it’s a little bit tricky to broadcast in square because you don’t use square video. Only to Facebook or social would that be a prohibited … permitted format. So-

Colleen Henry:

But it makes so much sense when most people are viewing on a cell phone.

Anthony Lazaro:

It does.

Charlie Good:

Right.

Anthony Lazaro:

So how does that get enabled within the ClearCaster. What did you do to build in square?

Charlie Good:

We’re actually cropping the frame. So you take a 16 by 9 source. We’re cropping off the left and the right to get the result in square video. We are displaying that back on the talent views, so you can make sure you stay on the screen as you’re giving the presentation. You can see what’s going on.

Anthony Lazaro:

Awesome. And another thing that I know is going on with the API is redundancies. So Colleen do you want to speak to redundancy?

Colleen Henry:

Yeah, something that I’ve wanted for at least two years now and we’ve been fighting for. We’re finally coming out with, which is the ability to have two encoders streaming to, over separate internet connections ideally, two different entry points. And then if one goes down it automatically fails over to the backup. But something that’s unique that we put in is that if you want to force it to fail over to the other connection, you can actually press a button and it switches nearly instantaneously.

So let’s say you know you have to unplug one encoder. You don’t have to unplug and wait for it to time out. You can just press the button and switch it over. And then you can switch over to it now. And you guys have actually already implemented it in your UI.

Charlie Good:

Right, yeah. So we have the ability to do that today.

Anthony Lazaro:

So how does it work in the ClearCaster in terms of what do you have to go through to set up redundancy?

Charlie Good:

That’s what’s kind of brilliant. Plug in the two ClearCasters. You’re probably going to want to separate the power, separate the network. And SDI feed into each box. All the time code synchronization and the complexities of doing a redundant stream are handled by the ClearCaster. We’re doing that behind the scenes. So once you set up and pair those two encoders, they will show up when you go to create that live broadcast and you literally select one as your primary, one as your backup and go. And then the streams will both be published to Facebook at the same time. It’s a hot, hot kind of set up.

And then at anytime if you want to switch you can force a switch or if the network goes back or if the conditions are such that the stream no longer is healthy for the primary stream it’ll switch to the backup.
It’s brilliant. Like I mean-

Anthony Lazaro:

The switching’s super fast, seeing the demos of it. It’s awesome.

Charlie Good:

And flawless. Like if you do a manual switch, it’ll switch over without any hiccups or anything. It just switches immediately. It’s pretty brilliant.

Anthony Lazaro:

Cool. So what else is coming? Maybe take a step back, Facebook Live. Where’s some of the movement of where you’re focusing, in terms of either API enhancements or infrastructure enhancements?

Colleen Henry:

Quality and reliability are two of the biggest things in my personal world at work. I know there’s a lot of different feature sets that are coming and I probably shouldn’t speak to them. But I can speak to the fact that we’re always trying to improve quality and reliability.

One of the cool things about the ClearCaster is that since it gets all of its settings from what it should be doing, we’re actually working on making it so that when the encoder sends us those we verify that’s what we got, and then we’ll actually patch through the encoding. So there won’t be multi-generations photocopy of a photocopy problem. Multi-generation loss. It’ll just be the stream that comes in is the measuring stream that we can redeliver which will give us way better quality and also enable things like being 4K and 1080p60.

Anthony Lazaro:

Awesome. And what use cases are you really excited about for the 4K or the 1080p60?

Colleen Henry:

For 4K I think spherical is the main use case. You know like a stereocube, or a spherical cube map, 4K actually looks pretty good in a VR headset, but I would say 1080p60 is definitely for sports, right? Eventually we’ll do 4K60 at some point but I think that high frame rate 1080 is a very realistic, today, high quality thing and most people aren’t used to seeing video that good.

Anthony Lazaro:

Yep. Awesome. And Charlie what are you focused on in terms of ClearCaster-

Charlie Good:

Future?

Anthony Lazaro:

Future, yeah.

Charlie Good:

So many things. We have so many ideas. It’s amazing. Colleen and I are just obsessed with quality. So we’re going to continue to push the boundaries for 1080p60 video, for 4K video, for 1080p30 video. So we’re always trying to come up with better ways to send it in, better encoding parameters. You know improvements on both sides, both on the ClearCaster side as well as on the Facebook side.

Colleen Henry:

Well and one of the fun things, because of the negotiation right, is that when I fix something on my platform to support better quality, your box just does it.

Charlie Good:

Right.

Colleen Henry:

People don’t have to go change anything. You don’t have to change anything. It automatically just happens. So if I flip on 4K tomorrow and somebody has a 4K source, it’s on.

Charlie Good:

Yeah. And then the other thing is we want to do titling. So we’re going to integrate with some of the titling vendors out there to enable you to put overlays on top of the video. Titles, slates, those sort of things. We’re actually demoing that here at the show. And that’s pretty cool.

We’re also looking at comment moderation. Because again, the interactivity piece of it, we think’s very important. And so if you’re in an event that has a lot of viewers where the comments are coming in and the reaction fast and furious, we want to be able to have a third person actually doing the comment moderation and making sure that the person that’s giving the presentation isn’t overwhelmed. I’m trying to think of the other things we’re thinking about.

Colleen Henry:

Still want the turntable.

Charlie Good:

Yes-

Colleen Henry:

You know that one?

Charlie Good:

That’s right.

Colleen Henry:

My dream is I want to have a little controller that’s like a DJ turntable that slowly turns as the comments go by but then you can stop it and rewind it to go back in the comments to see it. I know I’m never going to get it but that’s my dream. I want-

Anthony Lazaro:

Does it need to be a physical turntable?

Charlie Good:

Absolutely. Yeah, yeah.

Colleen Henry:

It needs to be a turntable and it needs to be physically rotating and ideally blinking.

Charlie Good:

And then if you want you could do it with your foot. Like if you wanna do it kind of off camera, absolutely.

Anthony Lazaro:

Your hands are probably on other appliances so it would make sense to have something on your foot.

Charlie Good:

And we’re even looking at … I mean this is even worse than square video, which is vertical video as well. So we probably will add that in the near future.

Anthony Lazaro:

Cool. And you know, one last thing I think. It’s one of the neater things I see coming out of ClearCaster that I just don’t know that I see a lot of other places. And it’s a little geeky, but the logging that we do in the NTP data. It’s pretty crazy what we’re able to see and help diagnose in there.

Charlie Good:

Yeah, so we-

Colleen Henry:

I love it. Whenever there’s somebody who’s like “Oh, we’re having an issue with something.” I say “Cool, just go hit send your logs and call them up.” And you guys have 24/7 support. And you’re like “Oh, Facebook’s broken.” Which, usually it’s us, not you. But yeah, you can figure that out, ’cause you guys are logging everything.

Charlie Good:

Yeah and also we’re sending telemetry data about the network performance and the performance of the encoder-

Colleen Henry:

Oh yeah, which we’re receiving, too.

Charlie Good:

Back to Facebook as well as back to Wowza. And so that rich set of data will enable us to help you do your events. So if you want event support, we’ll be able to look and see what does the bandwidth look like? What does the frame rate look like? Are there any errors in the encoding? It’s like that kind of level of detail that we want to make sure where we can monitor your event through the entire thing.

Colleen Henry:

From the Facebook side having that data is really important because traditionally whenever an event doesn’t go quite perfectly the people on the platform side just blame the encoder. But now we actually have all the data that we need to know that it was our fault and that we can actually … that we should fix it.

Anthony Lazaro:

Yeah I mean, what’s really cool, it’s like making the entire workflow, especially in coding appliance which is sometimes viewed kind of as a dumb box that does powerful stuff, intelligent. And linking it all together.

Charlie Good:

And it helps that we’ve been doing this, I know with Wowza we’ve been doing this 10 years right? So now to have the full chain. Like we’ve built a streaming engine, we have a player. We’ve now built an encoder. We think we know fairly well what needs to happen each one of those stages to create a very reliable and robust stream. And now we’re doing that, which is exciting.

Anthony Lazaro:

Awesome. Well thanks Colleen. Thanks Charlie for joining.That was Facebook Live, Facebook Live API coming at you from NAB Live.

Wowza Media Server is integrated with Cloud Server Wowza. Contact us to find out our latest offers!
>