Youtube Data API V3-通过PHP代码上传视频显示错误

时间:2019-01-23 11:48:50

标签: youtube-api youtube-data-api

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

我正在使用以下网址中提供的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最近是否报告了错误/错误?

1 个答案:

答案 0 :(得分:1)

我遇到了完全相同的问题。代码一直运行良好,现在却失败了。在视频上传完成后,设置缩略图之前,我添加了20秒的延迟,并且现在似乎可以正常使用。因此,Youtube需要时间来消化视频。还是希望听到更好的解决方案。

相关问题