Using Multi-Bitrate Streaming with Batch Provisioning

Applies to Roles
Publisher, Developer
Version
Brightcove 4
Modules
Edition
Pro, Enterprise

This document describes how to use multi-bitrate streaming if you want to upload your videos using FTP batch provisioning, rather than using the Media module. When you use FTP batch provisioning to upload your videos, you have the same options that you do when you upload videos with the Media module, except that the encoding of your video files must be either VP6 (FLV) or H.264 (MP4). See Using multi-bitrate streaming for information about how multi-bitrate streaming works and how you can use it with non-FLV master video files you upload using the Media module. See Using FTP batch provisioning for general information about how our FTP upload system works, including a description of how to create the XML manifest that controls how Brightcove handles your uploads.

Batch provisioning is available only for Brightcove Pro and Enterprise customers. If you are interested in upgrading your Brightcove account, please contact Brightcove for more information.

If you upload your files using FTP batch provisioning, you can choose whether you want Brightcove to transcode them into multiple renditions for multi-bitrate streaming, or whether you want to perform the transcoding yourself.

Transcoding options with batch provisioning

This section describes your options for specifying transcoding when you upload videos using the FTP batch provisioning system. In the asset tags of your FTP batch provisioning manifest, you can specify which transcoding options you want to apply to your videos:

Enable transcoding

To specify that you want your uploaded video to be transcoded by Brightcove, use the encode-to attribute in the asset tag. To have your video transcoded to VP6 (FLV):

<asset encode-to="FLV" ... > ... </asset>

To have your video transcoded to H.264 (MP4):

<asset encode-to="MP4" ... > ... </asset>

Multiple renditions

To specify that you want Brightcove to create multiple renditions from your uploaded video, use the encode-multiple attribute in the asset tag:

<asset encode-multiple="true" ... > ... </asset>

The default is false, so unless this attribute is set, Brightcove will transcode to a single video asset. This attribute must be used in combination with the encode-to attribute.

Preserve master H.264 video

You can use the h264-preserve-as-rendition attribute to store a copy of the original video file as a video asset. This attribute must be used in combination with the encode-to attribute and encode-multiple must be true. The default value for the h264-preserve-as-rendition attribute is false.

<asset
     encode-to="MP4" 
     encode-multiple="true" 
     h264-preserve-as-rendition="true" ... >
      ... 
</asset>

The source file must be a valid H.264 video. We will create multiple renditions of the original file, but will preserve the original and use it as an additional rendition. This option can be useful for providing the highest possible video quality.

Upload an H.264 video with no transcoding

If you want to create a video with FTP batch provisioning from an H.264 master file, but you do not want Brightcove to transcode the original file and you do not want Brightcove to create multiple renditions, use the h264-no-processing attribute. The default value for this attribute is false. If you set h264-no-processing="true" for an asset, you cannot also set encode-to="true", encode-multiple="true", or h264-preserve-as-rendition="true" for the same asset. The source file must be a valid H.264 video.

<asset h264-no-processing="true" ... > ... </asset>

Creating your own rendition files

Instead of using Brightcove's transcoding, you can create your own renditions of your videos and upload them using batch provisioning. To create multiple renditions of a video, use your video editing software to encode your source video file with multiple bit rate and resolution settings. Generate up to six FLV (VP6) or H.264 (.mp4) video files, using Brightcove's recommended specifications. Save each rendition with a file name that identifies for you both the video content and the bit rate/resolution specification.

Setting key frames in rendition files

When a viewer switches renditions (for example, when the viewer selects full screen), the Brightcove player uses key frames to locate the point to begin playback in the new rendition. Each rendition file should have the same key frame settings; otherwise, in-stream switching could get out of sync. The closer together the key frames are, the better the match between the old rendition and the new. For example, if you set key frames 10 seconds apart, the new rendition might start at a point up to 20 seconds away from the point the old rendition had reached before the switch. As a general rule, set the key frames for every second. Be aware, however, that adding key frames does increase the file size and can affect overall image quality.

Uploading renditions with batch provisioning

After you have created your own rendition files, you can add them to your Media Library, using the FTP batch provisioning feature. You describe each rendition in an asset XML element and specify all of a video's renditions in the video's title XML element.

Specifying a video's renditions

In your batch provisioning manifest, specify multiple renditions of an FLV or H.264 video using the rendition-refid element within the title element for the video. Use a separate rendition-refid element to specify the refid of each rendition of the video. For example:

<title name='MBR Title 1' refid='mbrtitle1' active='TRUE'>
    <short-description>My short description.</short-description>
    <rendition-refid>mbrasset1</rendition-refid>
    <rendition-refid>mbrasset2</rendition-refid>
    <rendition-refid>mbrasset3</rendition-refid>
  </title>

Specifying an FLV or H.264 rendition asset

Each rendition is specified in the batch provisioning manifest using the asset XML element. For example:

<asset
  refid='mbrasset1'
  type='VIDEO_FULL'
  hash-code='63a1200ade617219e1bf032377b1cc85'
  size='3774585'
  filename='5000FingersOfDrT_2.flv'
  encoding-rate='160000'
  frame-width='320'
  frame-height='240'/>

The multi-bitrate streaming feature adds the following attributes to the asset element:

attribute value
encoding-rate bits per second
For example, 150kbps is specified as 150000
frame-width pixels
frame-height pixels

Be sure to specify the 'encoding-rate' in bits per second, not kilobits or megabits per second. If you do not specify values for 'encoding-rate', 'frame-width' or 'frame-height', Brightcove attempts to parse them from the video file's metadata. If this metadata is not found, the encoding rate is calculated from the asset length and file size. The frame dimensions default in the player to the recommended encoding values.

To upload the renditions, use the Brightcove FTP server, as described in Using FTP Batch Provisioning. Remember to upload the rendition files before you upload the batch provisioning manifest XML file. Once you've uploaded the rendition files and the manifest, the video will be available in the Media Manager with the proper metadata defined in the manifest.

Adding a rendition to an existing video

To add a rendition to an existing video, use the Brightcove batch provisioning feature. For example, suppose you have a video named FOO with the single basic 480x360 resolution, 512kbps bit rate rendition. You want to add 2 additional renditions. Your batch provisioning manifest would include an element like this:

<title name='FOO' refid='mbrtitle1' active='TRUE'>
  <short-description>My short description.</short-description>
  <rendition-refid>foo_210kbps</rendition-refid>
  <rendition-refid>foo_360kbps</rendition-refid>
  <rendition-refid>foo_512kbps</rendition-refid>
</title>

Modifying existing videos with overlay-update

If you are adding renditions to an existing video, be aware of how the batch provisioning system handles overwriting of existing data. Consider using the overlay-update attribute of the title element in your batch provisioning manifest, which allows you to include in the manifest just the information you are adding. Read more about using the overlay-update attribute.

Removing a rendition from a video

To remove a rendition from a video, exclude it from the video's title element in your batch manifest. For example, suppose you have a video named FOO with 3 renditions; you want to remove 1 of the renditions. Your batch provisioning manifest would include an element like this:

<title name='FOO' refid='mbrtitle1' active='TRUE'>
  <short-description>What it is.</short-description>
  <rendition-refid>foo_360kbps</rendition-refid>
  <rendition-refid>foo_512kbps</rendition-refid>
</title>

This removes the foo_120kbps rendition that was previously associated with the video. A video must always have at least one rendition associated with it.

Deleting a rendition

Renditions follow the same rules as regular video file assets and cannot be deleted as long as they are associated with a video. Renditions are deleted like any other asset:

<delete-asset refid='mbrasset1aa'/>
Tags
high definition