The Pod Serving API provides access to adaptive-bitrate video ad pods prepared in such a way that they can be stitched directly into a user-facing HLS or MPEG DASH media playlist.
This API is intended for advanced publishers and video technology partners. Using this API at scale requires design and implementation of a sophisticated media serving workflow which is outside the scope of this documentation.
Prerequisites
Before processing a livestream through the DAI Podserving API, you will need to create a livestream event using the Google Ad Manager UI, or the live-event API.
Components
There are three components that make up any implementation of the Pod Serving API: Google Ad Manager, a client video player, and a manifest manipulation server.
Ad Manager
Ad Manager is responsible for delivering ads to the user and can be managed through either the Ad Manager SDK or its web interface. The service has these responsibilities:
- Receiving stream requests from the client video player, decisioning ads, and providing renditions to match your content encoding profiles
- Responding to ad segment requests from the client video player and providing the appropriate portion of the ad pod for the given user
- Receiving and processing tracking pings from the client video player
Client video player
The client video player is the app or website that clients use to play the resulting video stream. The player has these responsibilities:
- Initializing a stream resource from Ad Manager and receiving a stream object that represents a single playback session of a specific livestream event.
- Requesting a stream manifest from the manifest manipulation server, which starts playback
- Periodically polling ad pod metadata from Ad Manager that describes the ad events embedded in the stream's ad segments
- Listening for timed metadata events raised by the player that contain ad media IDs. Upon encountering these events, the player forwards them to Ad Manager to verify that ad events have successfully occurred.
To learn more about the proper implementation of the client video player, see the pod serving guide for your platform:
For custom implementations, see our pod serving client guide for the DAI API.
Manifest manipulation server
The manifest manipulation server is the server in charge of hosting the stream manifest provided to the client video player. The server has these responsibilities:
- Handling manifest delivery to the client video player
- Requesting a period template from Ad Manager (for MPEG DASH streams only), to populate with ad segments.
- Inserting Ad Manager-hosted ad segment URLs into the video stream manifest (for HLS) or ad period (for MPEG DASH) during ad breaks.
- Serving the modified manifest to the client video player.
To learn more about implementing a custom manifest manipulator server, see the manifest manipulation guide.
Glossary
- Livestream event: An event that stores important configuration data for livestream, such as encoding profiles. Livestream events are created using Ad Manager.
- Stream object: An object that represents a single playback session of a specific video asset. Notable properties include the stream ID and the media verification URL.
- Ad pod: Grouping of ad videos shown in an ad break
- Ad segments: Media segment files for the ad break
- Ad pod metadata: Metadata for the ad break used to render ad UI on the client; for example, hide seek buttons during ad
- Ad media ID: Metadata encoded as ID3 tags within ad segment files. This metadata is used to identify when specific ad-related events have occurred during playback, such as ad start or midpoint.