How to Choose the Best API for Video Streaming

How to Choose the Best API for Video Streaming

Any entrepreneur or developer may reach a time when they must make critical decisions. These decisions that can shape their business or product moving forward. Choosing a Video Streaming API is one of these important decision points.

The API that you choose to integrate live video streaming will influence your product outcomes in many ways. The features that are available to you will depend on the capabilities of the platform. Your chosen Video Streaming API will be woven deeply into almost every line of your code. Your ability to expand is determined by the limitations of this underlying technology.

Essentially, when you build a system around an API, you’re making an investment. With that said, you want to be sure you’re making the right decision. This is true whether you’re buying into a specific platform or you’re subscribing to a premium, private API.

But how can you compare features among various live streaming APIs? We haven’t seen this comparison done before, so we’re doing it ourselves. Entrepreneurs may want to read the first half of this essay, while developers may want to skip directly to the comparison section.

[Tweet “When you build a system around an API, you’re making an investment.”]

Brief overview: What does an API do?

How APIs workAn API, or Application Programming Interface, is like a standardized language. It allows computer programs to communicate with each other in fast, reliable ways.

In the world of streaming video, APIs come in a few different flavors.

The difference between a player API and a live streaming API

Confusingly, live streaming and on-demand video platforms often have multiple APIs. Usually, there are two general categories: a Live Streaming API and a Player API. Sometimes, there are others. For example, some platforms have separate APIs for analytics, user tracking, thumbnail manipulation, and so on.

What is a Live Streaming API?

The first and more powerful API is the Live Streaming API. This is designed to interface with the backend of a live streaming system.

In general, this API allows you to manipulate your live streams programmatically. Some of the functions that are generally accessible via a Live Streaming API include:

  • Creating a new live stream
  • Starting or stopping streaming
  • Changing stream name and description
  • Changing settings for privacy and monetization (if available)
  • Renaming and manipulating recorded live streams

[Tweet “Broadcast APIs allow you to write code & manipulate your live streams programmatically.”]

What is a “Player” API?

Player APIs are focused on the video player. Specifically, they allow users to customize the appearance and features of the default video player. For a live streaming platform, the built-in video player can often be customized to:

  • Add or remove buttons for sharing, sound controls, HD toggle, and so on
  • Customize autoplay behavior
  • Show or hide number of current viewers
  • Embed logo
  • Change player size to a specific width, or to a dynamic size based on the device being used
  • Insert advertisements or station breaks dynamically into a live stream
  • Switch between multiple live feeds (for example, different camera angles on the same event) from one player window
  • Or, you can use a complete third-party video player (learn more about 3rd party video players here).

In short, a player API enables you to use custom video players and branding. A live streaming API enables you to start, stop, and control live streams programmatically.

Customized video player from video.js

An example of a player API and a live streaming API in use

The French TV station IDF1 is a great example of APIs in action. They utilize both a player and a live streaming API. The Player API allows them to use a custom video player built for their platform. Branding, menu options, and controls are all custom designed.

The Live Streaming API allows them to integrate content management with existing systems. It also enables simultaneous live streaming to multiple sources. The same output can go to both traditional linear television and OTT (over the top) online distribution.

Check out their website to see the APIs in action. (Although truly, you won’t see the APIs. But that is the sign of a well-integrated system—it’s invisible!)

How to choose the right Live Streaming API for your needs

Projects and priorities change, but choosing a Live Streaming API is often a long term decision.

[Tweet “Switching APIs after integration is hard—so choose correctly the first time!”]

The API code for your video streaming host will be integrated throughout your platform. It’s certainly possible to switch providers later, but it’s a big hassle. In some cases, you get locked into a bad choice. Then you have to live with the consequences for a long time.

According to Eran Galperin of Binpress, there are 7 elements to consider when choosing an API. Here’s our take on her categories.

1. Do the features match your needs?

Most APIs contain the same basic features. However, each platform has its own “twist.” Determining which is best for you depends on how it meshes with your goals.

Some APIs may deliver features that you consider extraneous. However, another organization might consider that feature to be essential. Your perspective on these features may change over time.

Make sure to fully consider which features are critical for you. You may also want to list features that are nice, but don’t seem essential. Then, you can assess your Live Streaming API choices based on these options.

2. Is there comprehensive documentation?

Using a new API is like learning a new language. It’s hard to pick up the skill without formal resources. Sure, you can muddle your way through after some experimentation, but you’ll learn a lot faster by hitting the books.

In API terms, this means you should look for comprehensive documentation from the provider. These should explain what the calls are, and give examples of usage. Ideally, documentation should also provide a sandboxed testing environment. This allows you to test out commands without fear of messing things up.

Example API commands

3. What data formats does the API use?

In the past, XML formats were commonly used for APIs. Today, JSON is the king of the hill. This format is lighter on resources, simpler to read, and easier to write. It’s just a better alternative all around.

Some APIs return data in other formats, such as in the form of URL encoded strings. Before choosing a platform, check which data formats it uses. Will these integrate well into your existing systems? Are your developers happy with these choices? Are they simple?

If not, you may want to look elsewhere. Otherwise, you may end up spending more time than desired interpreting results and parsing code.

4. Do the naming conventions make sense to you?

Each API will use a different naming convention to describe and interact with different parts of the system.

Before investing in an API, take a look at the parameter and method names it uses. Do they make sense? Do they match your sense of style in coding? If so, it’ll simplify the process of writing and interpreting code. It’s good to have happy coders.

You could have even bigger issues, though. As Galperin writes, “Some API providers today try to be clever and require the usage of custom headers and HTTP verbs that are not trivial to program against. That might be right up your alley, or might be a pain in the ass, depending on your point of view.”

5. Does the API have limits on requests?

One concern with APIs—especially public facing APIs—is DDOS attacks, or spamming the system. A flood of requests can overload the servers and slow things down for other users. This could be intentional, or simply the result of bad code.

To avoid excessive usage, many APIs use a threshold system. This limits the number of requests per API key or IP address per day.

These limits make sense from a provider’s perspective. However, as a client, you don’t want to be surprised by limits like this. Investigate if API limits exist on a given platform. If so, will your application fit underneath that headroom? If not, can you get an exception?

What about if you have huge success, or get hit by the Slashdot effect? Keeping these questions in mind when selecting a platform can help prevent future problems.

6. What programming languages are supported?

APIs are agnostic when it comes to programming languages. However, that doesn’t mean language isn’t important.

Many APIs include SDKs and sample code that are written in and for specific languages. By using these same languages, you can save a lot of time. You can also prevent bugs by recycling some of that sample code into production use. This saves money, speeds up development, and results in a better product at the end.

7. Is there a support system and community forum for this API? 

Support forum and FAQsFinally we come to support—where you go when things go wrong. Any complex system like an API may have bugs. Things go wrong occasionally with so many working parts. Errors in your code or in the system itself can cause things to grind to a halt.

Most APIs are extremely robust. However, with a quality customer support platform, you can quickly fix problems that do occur. Do the platforms you are considering have robust technical support? How about support communities to share issues and best practices with others who are using the same Live Streaming API?

These considerations may swing your preference towards one Live Streaming API over another.

We’ll also add one more consideration of our own…

8. Is my Live Streaming API RESTful?

REST refers to representational state transfer, an architectural style for web communication. It’s a standardized approach that uses components, connectors, and data elements in a distributed hypermedia system. The entire internet uses it, but it’s also been adapted for APIs.

A RESTful API is fast, scalable, simple, and reliable. Importantly, it’s also predictable. Not all APIs stick to the REST standard, but it’s the most popular style today. When in doubt, look for a RESTful API over a different architecture.

[Tweet “8 things to consider when choosing a #live #streaming API:”]

Comparing Live Streaming APIs

The specific features and organization of each API is unique. There’s no way to reprint the entire documentation for APIs in this essay. Instead, here’s a brief overview of the main elements of popular Live Streaming APIs.

Click the links associated with each Live Streaming API to learn more. Before making a decision, take the time to study the features of different platforms in-depth.

comparing live streaming APIs

Ustream

According to Programmable Web, the Ustream Live Streaming API allows you to:

“Access Ustream’s database and allow broadcasters and end-users to share, show, or browse [y]our videos. Programmatically search broadcasters for a specific name, retrieve a popular show, and start streaming a show.”

TechCrunch reports that Ustream’s Live Streaming API will be free for developers building their apps while they’re in testing and for release if they’re willing to have Ustream-owned ads run on top of broadcasts. Paying for premium access on top of the API will cut them out, as well as give access to Ustream’s advanced analytics packages.”

See documentation on the API page, and example code on GitHub.

Livestream

According to Programmable Web:

“The Livestream API tools, the Livestream Player API and Livestream Channel API, can work together to provide information about videos and channels and a platform on which to play those videos.”

Learn more on the Livestream API overview page.

YouTube Live

Programmable Web summarizes the YouTube Live API in this way:

“YouTube Live Streaming allows you to create, update, and manage live events on YouTube. Music executives, artists, and independent entrepreneurs could benefit from this Live Streaming API because they could schedule broadcasts to associate them with video streams. Some of the options to use this API include to enable users to pre-define broadcast settings, associate video streams and broadcasts, enable broadcasters to define information about a broadcast using the YouTube Data API at the same time, and simplify transitions between broadcast states, such as testing and live.”

Learn more on the YouTube Live Streaming API documentation page.

Brightcove

Brightcove splits their APIs into a number of categories. Of the CMS API, Programmable Web writes:

“The Brightcove CMS API allows developers to create video objects and retrieve video information by integrating its services.”

The Videocloud Media API is described as follows:

“Brightcove Videocloud Media API allows you to interact with the functions of video, cloud, and media in REST protocol. Developers can use an API Token to access the content. Guides include topics to add transcription from remote assets, embed video cloud media, and create videos with remote assets.”

Learn more on the Brightcove VideoCloud API overview page.

DaCast

According to Programmable Web:

DaCast’s new RESTful Live Streaming API can be easily used to create and delete live streams and retrieve all of the information needed. It is designed specifically for quick and easy integration of all of the features of the DaCast platform into a wide variety of cloud video applications, services and digital media workflows.”

Learn more by reading the comprehensive documentation, and using the sandboxed testing environment.

[Tweet “Comparison of broadcaster APIs from 6 popular live streaming video hosts:”]

Conclusion: Making the choice

Using an API is exciting, but also daunting. Choosing a Live Streaming API is a big decision. It can have ramifications for your whole organization.

However, with the right decision-making framework, you can make the correct choice. We hope this article has enlightened you on some important aspects to consider.

We’re interested in hearing from our audience on this one. What APIs have you used in the past? What features are important to you? How do you plan on integrating live video with your existing systems? What challenges do you face? What new features are you looking for in a Live Streaming API?

Let us know in the comments! We’ll respond, and look forward to the dialogue.

Future of Live video streaming