ภาพรวมของสตรีมแบบสด
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Pod Serve API ให้สิทธิ์เข้าถึงพ็อดโฆษณาวิดีโอแบบปรับอัตราบิต ซึ่งจัดเตรียมไว้ในลักษณะที่สามารถต่อเข้ากับเพลย์ลิสต์สื่อ HLS หรือ MPEG DASH ที่แสดงต่อผู้ใช้ได้โดยตรง
API นี้มีไว้สำหรับผู้เผยแพร่โฆษณาขั้นสูงและพาร์ทเนอร์เทคโนโลยีวิดีโอ
การใช้ API นี้ในวงกว้างต้องมีการออกแบบและปรับใช้เวิร์กโฟลว์การแสดงสื่อที่ซับซ้อนซึ่งอยู่นอกขอบเขตของเอกสารนี้
ข้อกำหนดเบื้องต้น
ก่อนที่จะประมวลผลสตรีมแบบสดผ่าน DAI Podserving API คุณจะต้องสร้างเหตุการณ์สตรีมแบบสดโดยใช้ UI ของ Google Ad Manager หรือ API กิจกรรมสด
คอมโพเนนต์
คอมโพเนนต์ 3 อย่างของการใช้งาน Pod Serve API มีอยู่ด้วยกัน 3 อย่าง ได้แก่ Google Ad Manager, โปรแกรมเล่นวิดีโอของไคลเอ็นต์ และเซิร์ฟเวอร์การจัดการไฟล์ Manifest

Ad Manager
Ad Manager มีหน้าที่แสดงโฆษณาต่อผู้ใช้และสามารถจัดการผ่าน Ad Manager SDK หรือเว็บอินเทอร์เฟซได้ บริการมีหน้าที่รับผิดชอบดังต่อไปนี้
- การรับคำขอสตรีมจากโปรแกรมเล่นวิดีโอของไคลเอ็นต์ การตัดสินใจโฆษณา
และเวอร์ชันแปลให้ตรงกับโปรไฟล์การเข้ารหัสเนื้อหาของคุณ
- การตอบสนองต่อคำขอกลุ่มโฆษณาจากโปรแกรมเล่นวิดีโอของไคลเอ็นต์ และจัดเตรียมส่วนที่เหมาะสมของพ็อดโฆษณาให้กับผู้ใช้ที่กำหนด
- การรับและประมวลผลคําสั่ง ping ของการติดตามจากโปรแกรมเล่นวิดีโอของไคลเอ็นต์
โปรแกรมเล่นวิดีโอไคลเอ็นต์
โปรแกรมเล่นวิดีโอของไคลเอ็นต์คือแอปหรือเว็บไซต์ที่ลูกค้าใช้ในการเล่นสตรีมวิดีโอที่เป็นผลลัพธ์ โปรแกรมเล่นจะมีหน้าที่รับผิดชอบดังต่อไปนี้
- การเริ่มต้นทรัพยากรสตรีมจาก Ad Manager และรับออบเจ็กต์สตรีมที่แสดงเซสชันการเล่นครั้งเดียวของเหตุการณ์สตรีมแบบสดที่ระบุ
- การขอไฟล์ Manifest ของสตรีมจากเซิร์ฟเวอร์การจัดการไฟล์ Manifest
ซึ่งเริ่มเล่น
- แบบสำรวจข้อมูลเมตาของพ็อดโฆษณาจาก Ad Manager เป็นระยะๆ ซึ่งอธิบายเหตุการณ์โฆษณาที่ฝังอยู่ในกลุ่มโฆษณาของสตรีม
- การรอฟังเหตุการณ์ข้อมูลเมตาที่กำหนดเวลาซึ่งสร้างโดยโปรแกรมเล่นที่มีรหัสสื่อโฆษณา เมื่อพบเหตุการณ์เหล่านี้ โปรแกรมเล่นจะส่งต่อเหตุการณ์ไปยัง Ad Manager เพื่อยืนยันว่าเหตุการณ์โฆษณาเกิดขึ้นเรียบร้อยแล้ว
หากต้องการดูข้อมูลเพิ่มเติมเกี่ยวกับการติดตั้งใช้งานโปรแกรมเล่นวิดีโอของไคลเอ็นต์ที่ถูกต้อง โปรดอ่านคู่มือการแสดงพ็อดสำหรับแพลตฟอร์มของคุณ
ดูการติดตั้งใช้งานที่กำหนดเองได้ที่คู่มือไคลเอ็นต์การแสดงพ็อดสำหรับ DAI API
เซิร์ฟเวอร์การจัดการไฟล์ Manifest
เซิร์ฟเวอร์การจัดการไฟล์ Manifest คือเซิร์ฟเวอร์ที่ทำหน้าที่โฮสต์ไฟล์ Manifest ของสตรีมที่ให้ไว้ในโปรแกรมเล่นวิดีโอของไคลเอ็นต์ เซิร์ฟเวอร์มีหน้าที่
ดังต่อไปนี้
- การจัดการการส่งไฟล์ Manifest ไปยังโปรแกรมเล่นวิดีโอของไคลเอ็นต์
- การขอเทมเพลตช่วงเวลาจาก Ad Manager (สำหรับสตรีม MPEG DASH เท่านั้น) เพื่อเติมข้อมูลด้วยกลุ่มโฆษณา
- การแทรก URL ของกลุ่มโฆษณาที่โฮสต์ไว้ใน Ad Manager ในไฟล์ Manifest ของสตรีมวิดีโอ (สำหรับ HLS) หรือช่วงเวลาโฆษณา (สำหรับ MPEG DASH) ระหว่างช่วงพักโฆษณา
- การแสดงไฟล์ Manifest ที่มีการแก้ไขไปยังโปรแกรมเล่นวิดีโอของไคลเอ็นต์
ดูข้อมูลเพิ่มเติมเกี่ยวกับการใช้งานเซิร์ฟเวอร์เครื่องมือจัดการไฟล์ Manifest ที่กำหนดเองได้ในคู่มือการจัดการไฟล์ Manifest
อภิธานศัพท์
- เหตุการณ์สตรีมแบบสด: เหตุการณ์ที่จัดเก็บข้อมูลการกำหนดค่าที่สำคัญสำหรับสตรีมแบบสด เช่น โปรไฟล์การเข้ารหัส กิจกรรมสตรีมแบบสดจะสร้างขึ้นโดยใช้ Ad Manager
- ออบเจ็กต์สตรีม: ออบเจ็กต์ที่แสดงเซสชันการเล่น 1 ครั้งของเนื้อหาวิดีโอที่เจาะจง พร็อพเพอร์ตี้ที่โดดเด่นประกอบด้วยรหัสสตรีมและ URL การยืนยันสื่อ
- พ็อดโฆษณา: การจัดกลุ่มวิดีโอโฆษณาที่แสดงในช่วงพักโฆษณา
- กลุ่มโฆษณา: ไฟล์กลุ่มสื่อสำหรับช่วงพักโฆษณา
- ข้อมูลเมตาของพ็อดโฆษณา: ข้อมูลเมตาสำหรับช่วงพักโฆษณาที่ใช้เพื่อแสดง UI โฆษณาในไคลเอ็นต์ เช่น ซ่อนปุ่มค้นหาระหว่างโฆษณา
- รหัสสื่อโฆษณา: ข้อมูลเมตาที่เข้ารหัสเป็นแท็ก ID3 ภายในไฟล์กลุ่มโฆษณา ข้อมูลเมตานี้ใช้ระบุเมื่อเกิดเหตุการณ์ที่เกี่ยวข้องกับโฆษณาในระหว่างการเล่น เช่น เริ่มต้นหรือตอนกลางโฆษณา
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-01 UTC
[null,null,["อัปเดตล่าสุด 2025-08-01 UTC"],[[["\u003cp\u003eThe Pod Serving API facilitates the integration of adaptive-bitrate video ad pods directly into HLS or MPEG DASH media playlists for advanced publishers and video technology partners.\u003c/p\u003e\n"],["\u003cp\u003eImplementing the Pod Serving API involves three core components: Google Ad Manager, which handles ad delivery and tracking; a client video player, which manages stream initialization and playback; and a manifest manipulation server, which modifies and serves the stream manifest.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the API, a livestream event must be created via the Google Ad Manager UI or the live-event API, serving as a configuration resource for the livestream.\u003c/p\u003e\n"],["\u003cp\u003eThe client video player is responsible for initializing the stream, requesting the manifest, polling for ad pod metadata, and forwarding timed metadata events to Ad Manager.\u003c/p\u003e\n"],["\u003cp\u003eThe manifest manipulation server handles manifest delivery, requests ad period templates, and inserts Ad Manager-hosted ad segment URLs or ad periods into the stream manifest during ad breaks.\u003c/p\u003e\n"]]],[],null,["# Overview for live streams\n\nThe Pod Serving API provides access to adaptive-bitrate video ad pods prepared\nin such a way that they can be stitched directly into a user-facing HLS or MPEG\nDASH media playlist.\n\nThis API is intended for advanced publishers and video technology partners.\nUsing this API at scale requires design and implementation of a sophisticated\nmedia serving workflow which is outside the scope of this documentation.\n\nPrerequisites\n-------------\n\nBefore processing a livestream through the DAI Podserving API, you\nwill need to create a\n[livestream event](/ad-manager/dynamic-ad-insertion/api/pod-serving/live/manipulator#livestreamevent)\nusing the Google Ad Manager UI, or the live-event API.\n\nComponents\n----------\n\nThere are three components that make up any implementation of the Pod Serving\nAPI: Google Ad Manager, a client video player, and a manifest manipulation\nserver.\n\n### Ad Manager\n\nAd Manager is responsible for delivering ads to the user and can be managed\nthrough either the Ad Manager SDK or its web interface. The service has these\nresponsibilities:\n\n- Receiving stream requests from the client video player, decisioning ads, and providing renditions to match your content encoding profiles\n- Responding to ad segment requests from the client video player and providing the appropriate portion of the ad pod for the given user\n- Receiving and processing tracking pings from the client video player\n\n### Client video player\n\nThe client video player is the app or website that clients use to play the\nresulting video stream. The player has these responsibilities:\n\n- Initializing a stream resource from Ad Manager and receiving a stream object that represents a single playback session of a specific livestream event.\n- Requesting a stream manifest from the manifest manipulation server, which starts playback\n- Periodically polling ad pod metadata from Ad Manager that describes the ad events embedded in the stream's ad segments\n- 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.\n\nTo learn more about the proper implementation of the client video player, see\nthe pod serving guide for your platform:\n\n- [Android](/ad-manager/dynamic-ad-insertion/sdk/android?service=pod)\n- [HTML5](/ad-manager/dynamic-ad-insertion/sdk/html5?service=pod)\n- [iOS](/ad-manager/dynamic-ad-insertion/sdk/ios?service=pod)\n- [tvOS](/ad-manager/dynamic-ad-insertion/sdk/tvos?service=pod)\n\nFor custom implementations, see our [pod serving client guide for the DAI\nAPI](/ad-manager/dynamic-ad-insertion/api/pod-serving/live/client).\n\n### Manifest manipulation server\n\nThe manifest manipulation server is the server in charge of hosting the\nstream manifest provided to the client video player. The server has these\nresponsibilities:\n\n- Handling manifest delivery to the client video player\n- Requesting a period template from Ad Manager (for MPEG DASH streams only), to populate with ad segments.\n- Inserting Ad Manager-hosted ad segment URLs into the video stream manifest (for HLS) or ad period (for MPEG DASH) during ad breaks.\n- Serving the modified manifest to the client video player.\n\nTo learn more about implementing a custom manifest manipulator server, see the\n[manifest manipulation\nguide](/ad-manager/dynamic-ad-insertion/api/pod-serving/live/manipulator).\n\nGlossary\n--------\n\n- **Livestream event**: An event that stores important configuration data for livestream, such as encoding profiles. Livestream events are created using Ad Manager.\n- **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.\n- **Ad pod**: Grouping of ad videos shown in an ad break\n- **Ad segments**: Media segment files for the ad break\n- **Ad pod metadata**: Metadata for the ad break used to render ad UI on the client; for example, hide seek buttons during ad\n- **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."]]