Best practices for the Video Stitcher API

This page contains a summary of best practices for the Video Stitcher API. If you are just starting out with the Video Stitcher API, refer to the quickstart for live streams or the quickstart for VOD assets.

Condition VOD assets

Configure source encoders and transcoders to output manifests that support ad breaks between DASH periods and HLS segments. The Video Stitcher API won't split periods or segments to stitch ad breaks, so ad breaks are only stitched at period and segment boundaries.

For ad tags that return VMAP responses, each ad break specified in the VMAP should match with a period or segment boundary. Otherwise, ad breaks will be stitched at the closest boundary. See the quickstart for VOD assets for an example of an unintended misalignment.

Use multi-period DASH manifests for live and VOD assets

Configure source encoders and transcoders to output DASH manifests with multiple periods rather than a single period. For reasons similar to VOD conditioning, the Video Stitcher API won't split periods to stitch ad breaks, so a DASH manifest with multiple periods will have more opportunities to stitch ad breaks at the expected durations.

Use constant bitrates

To ensure a stable playback experience for live streams, configure the source encoder or transcoder to use constant bitrates when outputting stream manifests. This allows the Video Stitcher API to stitch ads more consistently to match the encoding profiles specified in the manifests.

Use supported ad markers

Consult the ad markers documentation to understand what ad markers are supported and how source encoders or transcoders should output ad markers to ensure ad breaks are stitched successfully.

Verify source playback

To ensure a stable playback experience for live and VOD streams, consider using widely available client players to verify that source streams are playable before stitching with the Video Stitcher API.

HLS:

DASH: