【问题标题】:Youtube liveStreams insert getting error since Oct 1st 2020自 2020 年 10 月 1 日以来,Youtube liveStreams 插入出现错误
【发布时间】:2020-10-10 20:12:31
【问题描述】:

自 10 月 1 日以来,我们在创建 liveStreams 插入时遇到错误...广播创建正常,但是当到达 liveStreams 时出现此错误:

"{\n  \"error\": {\n    \"code\": 500,\n    \"message\": \"Internal error encountered.\",\n    \"errors\": [\n      {\n        \"message\": \"Internal error encountered.\",\n        \"domain\": \"global\",\n        \"reason\": \"backendError\"\n      }\n    ],\n    \"status\": \"INTERNAL\"\n  }\n}\n""

我们的代码是默认的:

        $streamSnippet = new Google_Service_YouTube_LiveStreamSnippet();
        $streamSnippet->setTitle('New Stream');

        // Create an object for content distribution network details for the live
        // stream and specify the stream's format and ingestion type.
        $cdn = new Google_Service_YouTube_CdnSettings();
        $cdn->setFormat("720p"); //1080p
        $cdn->setIngestionType('rtmp');

        // Create the API request that inserts the liveStream resource.
        $streamInsert = new Google_Service_YouTube_LiveStream();
        $streamInsert->setSnippet($streamSnippet);
        $streamInsert->setCdn($cdn);
        $streamInsert->setKind('youtube#liveStream');

        // Execute the request and return an object that contains information
        // about the new stream.
        $streamsResponse = $youtube->liveStreams->insert('snippet,cdn', $streamInsert, array());

我们的 PHP Lib 版本是“dev-master”版本...我也尝试过使用较旧的版本,例如 2.4.0,但没有...同样的错误。

任何想法谷歌团队或任何人?

【问题讨论】:

    标签: youtube-livestreaming-api


    【解决方案1】:

    找到问题了。

    $cdn->setFormat("720p");
    

    不再支持。

    改为:

    $cdn->setFrameRate("30fps");
    $cdn->setResolution("720p");
    

    并且工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-29
      • 2022-07-20
      • 1970-01-01
      • 2012-01-19
      • 2020-05-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多