CMS API sample: Video Renditions Inspector

Product(s)
Video Cloud
Brightcove Player
Role(s)
Player Developer
Topic(s)
Renditions
API(s)
CMS API

In this topic, you will learn to use the CMS API to inspect the renditions for all videos in an account.

Overview

This tool generates a report that includes the following:

  • Summary showing how many videos have no HLS or MP4 renditions or both
  • Report for each video showing the HLS and MP4 (HTTP) renditions (with the bitrate range and frame size for each)

The aim is to help you get ready to migrate from the Smart Player to the Brightcove Player by identifying videos that need to be transcoded to create HLS and/or MP4 renditions.

Obtain credentials

Like most of Brightcove's RESTful APIs, the CMS API requires OAuth access tokens to authorize requests. In order to get access tokens, you first need to obtain client credentials with permissions for kinds of operations you want to request.

  1. To obtain your credentials follow the instructions in Managing API Credentials. This is the recommended way of obtaining your client credentials. This sample only requires Video Read permissions, but in most cases, you will likely want to get all permissions:
    required permissions

    You can also obtain credentials using the OAuth API, following the instructions in one of the guides listed below:

Rendition inspector

You can use the app below to generate a report on the renditions for all videos in your account. Videos with no HLS or HTTP MP4 (progressive download) renditions will need to be retranscoded to work well in the new player. Videos with only low bitrate HLS renditions should be retranscoded as well.

See the Pen Video Renditions Inspector by Brightcove Learning Services (@rcrooks1969) on CodePen.

Using the CodePen

Here are some tips to effectively use the above CodePen:

  • Toggle the actual display of the player by clicking the Result button.
  • Click the HTML/CSS/JS buttons to display ONE of the code types.
  • Click Edit on CodePen in the upper right corner to fork this CodePen into your own account.

Proxy code

In order to build your own version the sample app on this page, you must create and host your own proxy. (The proxies used by Brightcove Learning Services only accept requests from Brightcove domains.) A sample proxy, very similar to the one we use, but without the checks that block requests from non-Brightcove domains, can be found in this GitHub respository. You will also find basic instructions for using it there, and a more elaborate guide to building apps around the proxy in Using the REST APIs.