开发者

YouTube API: How to specify an API callback after an uploaded video has finished encoding?

开发者 https://www.devze.com 2023-04-08 04:58 出处:网络
I am uploa开发者_JAVA百科ding videos using the YouTube/Gdata API (in python). After a video has been uploaded via the API, I receive the a response with data about the video (Youtube link, id, etc).

I am uploa开发者_JAVA百科ding videos using the YouTube/Gdata API (in python).

After a video has been uploaded via the API, I receive the a response with data about the video (Youtube link, id, etc). However, the video is not publicly available while it is being encoded by YouTube (typically a few minutes).

Can I specify a callback url that YouTube can post to after it finishes processing the video?


No.

You need to poll using the video id to and check the 'state' of the video to detect when 'processing' is no longer present.


With Youtube's V3 API, you need to do something similar, but slightly different.

GET https://www.googleapis.com/youtube/v3/videos?part=processingDetails&id={VIDEO_ID}&key={YOUR_API_KEY}

Further details here: https://developers.google.com/youtube/v3/docs/videos/list

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号