YouTube API:如何在上传的视频完成编码后指定 API 回调? [英] YouTube API: How to specify an API callback after an uploaded video has finished encoding?

查看:21
本文介绍了YouTube API:如何在上传的视频完成编码后指定 API 回调?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 YouTube/Gdata API(在 Python 中)上传视频.

I am uploading videos using the YouTube/Gdata API (in python).

通过 API 上传视频后,我会收到包含视频数据(Youtube 链接、ID 等)的响应.但是,该视频在由 YouTube 编码期间(通常为几分钟)无法公开访问.

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).

我可以指定一个回调网址,让 YouTube 在处理完视频后可以发布到该网址吗?

推荐答案

否.

您需要使用视频 ID 进行投票并检查视频的状态"以检测何时不再存在处理".

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

这篇关于YouTube API:如何在上传的视频完成编码后指定 API 回调?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆