Assets (content_info.json) in ew-vod2cbm

The video content of a ew-vod2cbm consists of VoD video assets. Assets are added to the server and then added to the schedule of a channel (this is done either using the Schedule API or the Config) to the schedule of a channel. The way an asset is specified for vod2cbm, is using a file path or URL to either a directory that contains a content_info.json file or directly to a DASH OnDemand manifest (must end with file extension .mpd). The content_info or manifest file of the asset contains the necessary metadata to start processing it.

Asset requirements

The media tracks must be in one of the supported codecs and formats.

All assets of a channel must have a GoP duration that is “compatible” with the value specified in the channel configuration. Compatible here means that the channel GoP duration must be a multiple of the asset GoP duration. For example, an asset with 1s GoP duration is compatible with a channel with 2s GoP duration. That value is specified in the channel configuration as gopDurMS. As a schedule is updated, all included assets’ metadata as well as the first part of each video track is loaded in order to derive a GoP duration for that asset. The metadata is cached for future use, while the actual video and audio media data is not.

Another requirement is that all media samples in an mp4 files must have the same duration. This is normally no problem if the content has fixed frame rate and a timescale that is compatible with the frame rate and audio sample rate.

Padding the last asset GoP

It is not a requirement that the last GoP of an asset has the same duration as the others. It is natural that the last GoP is shorter. Using the boolean padLastGop parameter in the channel/schedule configuration it is possible to determine whether that last GoP will either be discarded or padded with silent audio and black video frames to become as long as the others. The GoP duration in this context is the channel’s GoP duration.

The padding influences the length of the asset. As an example, consider an asset that has 32.5s duration, and has an IDR-frame every 1s. If used in a channel with GoP duration 2s, the asset length is considered to be 32s if padLastGop is false, and 34s if padLastGopis true. In the latter case, the last 1.5s will be padded with silent audio and black video frames to achieve the full duration of an 2s GoP. The GoP duration of 1s of the actual asset, does not matter here, since all segments are built from GoPs of the duration specified in the channel’s configuration. If the channel entry for the asset specifies a length that wraps the asset to start from the beginning, the padding is included in the video so that a padded entry wraps later than a non-padded entry.

The padding content

The silent audio is built by repeating silent audio frames from the corresponding audio codec and setting the timing parameters appropriately.

The black video is built by taking frames from a 500frames long I-P-P-P- sequence of AVC or HEVC video. Since the content is just a black frame, the resolution does not influence the image quality, so a fixed resolution of 640x360 pixels is currently used. Since this content generally doesn’t match with the content of the variant being played, all video is sent using inband signaling parameter sets, that is avc3 for H.264/AVC hev1 for H.265/HEVC.

Asset Track Matching

Matching of tracks in assets for ew-vod2cbm