本頁面說明如何解決 Video Stitcher API 相關問題。這個頁面顯示的錯誤是 Video Stitcher API 專屬錯誤。如要瞭解 Google API 中的一般錯誤,請參閱 Cloud API 的「錯誤」頁面。
系統只會傳回第一個錯誤。如果要求遇到多個錯誤,您需要修正傳回的錯誤,並重試要求,查看下一個錯誤。
建立工作階段時無法擷取播放清單
當 Video Stitcher API 無法從指定的 sourceUri 擷取影片資訊清單時,就會發生下列問題。
{
"error": {
"code": 404,
"message": "got status code 403 when fetching playlist from URI \"https://example.com/manifest.m3u8\"",
"status": "NOT_FOUND",
}
}
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Troubleshoot\n\nThis page shows you how to resolve issues with the Video Stitcher API. The errors\nshown on this page are specific to the Video Stitcher API. For information on\ngeneric errors across Google APIs, see the Cloud APIs\n[Errors](/apis/design/errors) page.\n\nOnly the first error is returned. If a request encounters multiple errors, you\nneed to fix the returned error and retry the request to see the next error.\n\nUnable to fetch playlist when creating a session\n------------------------------------------------\n\nThe following issue occurs when the Video Stitcher API is unable to fetch the\nvideo manifest from the specified `sourceUri`. \n\n```\n{\n \"error\": {\n \"code\": 404,\n \"message\": \"got status code 403 when fetching playlist from URI \\\"https://example.com/manifest.m3u8\\\"\",\n \"status\": \"NOT_FOUND\",\n }\n}\n```\n\nTo resolve this issue, follow the steps below:\n\n1. Verify that the provided `sourceUri` links to a valid video manifest.\n\n - Use `curl` with the `sourceUri`. If the manifest is intended to be publicly accessible, ensure that the URL can be reached publicly.\n - If the `sourceUri` is correct and the video manifest requires URL signing, proceed to the next step.\n2. Ensure that the CDN key has been registered with the Video Stitcher API in the\n same region as the request.\n\n - [Verify that the CDN key configuration](/video-stitcher/docs/how-to/managing-cdn-keys#list_cdn_keys) matching the `sourceUri` hostname exists. If the configuration doesn't exist, [register the CDN key](/video-stitcher/docs/how-to/managing-cdn-keys#register_cdn_key) with the Video Stitcher API. Wait at least 5 minutes for the configuration to propagate to the service.\n - If the configuration exists, proceed to the next step.\n3. If you suspect the private key used for signing the URL is incorrect, you\n may want to\n [update the registered CDN key](/video-stitcher/docs/how-to/managing-cdn-keys#update_cdn_key)\n with the correct private key.\n\nCDN key is outdated\n-------------------\n\nIf you recently registered or updated a CDN key and the Video Stitcher API has not\nstarted signing URLs using the new configuration, then follow the steps below to\ndiagnose the issue:\n\n1. If the CDN key was recently registered with the Video Stitcher API, then wait\n at least 5 minutes to allow the update to propagate. If the issue persist,\n proceed to the next step.\n\n2. Verify that only one CDN key is registered for one hostname for the region.\n If multiple CDN keys have been registered with the same hostname, the\n Video Stitcher API will select one of the CDN keys to sign the URL with.\n\n - Ensure that only one CDN key has been registered with a specified hostname for a given region. [Delete the obsolete CDN key](/video-stitcher/docs/how-to/managing-cdn-keys#delete_cdn_key).\n\nNo ads inserted in a live session\n---------------------------------\n\nIf no ads were inserted in a live session, use the following steps to diagnose\nthe issue:\n\n1. Verify that the source livestreams inserted ad breaks in the manifest. The\n following [ad markers](/video-stitcher/docs/concepts/ad-markers) need to\n exist in the livestream video manifest to indicate to the Video Stitcher API\n to replace source video segments with ad segments.\n\n - If the source video manifest does not have any ad markers, either your\n encoder hasn't triggered an ad break or needs to be changed to insert\n the supported [ad markers](/video-stitcher/docs/concepts/ad-markers).\n\n - If ad markers are clearly visible in the source manifest, then proceed\n to the next step.\n\n2. Verify that the provided ad tag returns a non-empty VAST response.\n\n - Copy the ad tag into a web browser (for example, Chrome) address bar and\n verifies that it returns a non-empty VAST response. The following is an\n empty VAST response:\n\n \u003cVAST version=\"3.0\"/\u003e\n\n - If an empty VAST response is returned, then the issue is the ad tag.\n Verify that the ad tag is set up correctly with the ad servers.\n\n - If the VAST response is populated, use `curl` to request the ad tag.\n Some ad servers require the `User-Agent`\n [header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent)\n to be provided. Try the following `curl` command:\n\n curl \u003cvar translate=\"no\"\u003eAD_TAG_URI\u003c/var\u003e\n\n - If the `curl` command returns an empty VAST response, add the\n `User-Agent` header to the `curl` command:\n\n curl -H \"User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\" \\\n \u003cvar translate=\"no\"\u003eAD_TAG_URI\u003c/var\u003e\n\n - If a populated VAST response is returned, then the issue is that the\n `User-Agent` header needs to be passed to the Video Stitcher API when\n creating the live session. The Video Stitcher API uses that header when\n executing the ad tag to retrieve ads.\n\n - If an empty response is still returned, then the issue is with the given\n ad tag. Confirm with the customer that the ad tag is correct and that\n any\n [ad tag macro](/video-stitcher/docs/how-to/managing-live-sessions#ad-tag-macros)\n values are correct as well.\n\n - If the customer's ad tag issues have been resolved, but ads have not\n been inserted, proceed to the next step.\n\n3. [Inspect the live session](/video-stitcher/docs/how-to/managing-live-sessions#inspect-live-sessions).\n If the affected session is showing that ads are returned from the ad\n servers, then proceed to the next step.\n\n4. The next potential cause for missing ads is due to\n [ad re-encoding](/video-stitcher/docs/concepts/overview#ad_re-encoding). The\n API will re-encode ads during its first encounter to encode the ad to match\n the source video. Usually, ads take a few minutes to encode. Retry creating\n a new session after a few minutes to see if ads are inserted.\n\n If no ads were inserted, the issue may be due to an ad failing to encode.\n The ad media URLs may not be reachable. In this case, the customer needs to\n work with the ad provider to determine what's wrong with their ad media.\n\nNo ads inserted in a VOD session\n--------------------------------\n\n1. Verify that the provided ad tag returns a non-empty VAST or VMAP response.\n Use the provided ad tag with the following directions:\n\n - Copy the ad tag into a web browser (for example, Chrome) address bar and verifies that it returns a non-empty VAST, VMAP, or SmartXML response. The following is an empty VAST response:\n - Put the ad tag into a web browser (ie. Chrome, Firefox, etc) address bar\n and verifies that it returns a non empty VAST, VMAP, or SmartXML\n response. An empty VAST response looks like:\n\n \u003cVAST version=\"3.0\"/\u003e\n\n The following is an empty VMAP response: \n\n \u003cVMAP xmlns:vmap=\"http://www.iab.net/vmap-1.0\" version=\"1.0\"/\u003e\n\n - If an empty VAST response is returned, then the issue is the ad tag.\n Verify that the ad tag is set up correctly with the ad servers.\n\n - If the VAST response is populated, use `curl` to request the ad tag.\n Some ad servers require the `User-Agent`\n [header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent)\n to be provided. Try the following `curl` command:\n\n curl \u003cvar translate=\"no\"\u003eAD_TAG_URI\u003c/var\u003e\n\n - If the `curl` command returns an empty VAST response, add the\n `User-Agent` header to the `curl` command:\n\n curl -H \"User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\" \\\n \u003cvar translate=\"no\"\u003eAD_TAG_URI\u003c/var\u003e\n\n - If a populated VAST or VMAP response is returned, then the issue is that\n the `User-Agent` header needs to be passed to the Video Stitcher API\n when creating the VOD session. The Video Stitcher API uses that header\n when executing the ad tag to retrieve ads.\n\n - If an empty response is still returned, then the issue is with the given\n ad tag. Confirm with the customer that the ad tag is correct and that\n any\n [ad tag macro](/video-stitcher/docs/how-to/managing-vod-sessions#ad-tag-macros)\n values are correct as well.\n\n - If the customer's ad tag issues have been resolved, but ads have not\n been inserted, proceed to the next step.\n\n2. [Inspect the VOD session](/video-stitcher/docs/how-to/managing-vod-sessions#inspect-vod-sessions).\n If the affected session is showing that ads are returned from the ad\n servers, then proceed to the next step.\n\n3. The next potential cause for missing ads is due to\n [ad re-encoding](/video-stitcher/docs/concepts/overview#ad_re-encoding). The\n API will re-encode ads during its first encounter to encode the ad to match\n the source video. Usually, ads take a few minutes to encode. Retry creating\n a new session after a few minutes to see if ads are inserted.\n\n If no ads were inserted, the issue may be due to an ad failing to encode.\n The ad media URLs may not be reachable. In this case, the customer needs to\n work with the ad provider to determine what's wrong with their ad media."]]