【问题标题】:Youtube Data API V3 - Uploading video through PHP code shows errorYoutube Data API V3 - 通过 PHP 代码上传视频显示错误
【发布时间】:2019-06-17 00:08:08
【问题描述】:

一年以来我一直在使用以下代码,但突然开始出现此错误。

我正在使用以下网址中提供的 PHP 代码示例

https://developers.google.com/youtube/v3/code_samples/php#upload_a_video

错误:

 {
    "error": {
        "errors": [{
            "domain": "youtube.thumbnail",
            "reason": "videoNotFound",
            "message": "The video that you are trying to insert a thumbnail image for cannot be found. Check the value of the requests \u003ccode\u003evideoId\u003c/code\u003e parameter to ensure that it is correct.",
            "locationType": "parameter",
            "location": "videoId"
        }],
        "code": 404,
        "message": "The video that you are trying to insert a thumbnail image for cannot be found. Check the value of the requests \u003ccode\u003evideoId\u003c/code\u003e parameter to ensure that it is correct."
    }
}

我在这个错误发生之前打印了声明,我可以看到视频 ID。而且我可以在我的视频网址上​​看到一个奇怪的行为。

https://www.youtube.com/watch?v=KV-5aiMDLDg

没有评论框,没有推荐的视频。

还有其他人面临这个问题,最近 Youtube 是否报告了错误/Bug?

【问题讨论】:

    标签: youtube-api youtube-data-api


    【解决方案1】:

    我遇到了完全相同的问题。代码一直运行良好,现在却失败了。在视频上传完成后,在设置缩略图之前,我添加了 20 秒的延迟,现在它似乎总是有效。所以它就像 Youtube 需要时间来消化视频。不过很想听到更好的解决方案。

    【讨论】:

      猜你喜欢
      • 2013-12-16
      • 2017-06-14
      • 1970-01-01
      • 2017-09-11
      • 2015-09-20
      • 2015-08-31
      • 2013-01-05
      • 2019-02-28
      • 2014-09-27
      相关资源
      最近更新 更多