如何流式传输到流名称来自YouTube在线流API

时间:2018-12-07 05:54:57

标签: ffmpeg youtube youtube-api youtube-livestreaming-api

我正在调用此API https://developers.google.com/youtube/v3/live/docs/liveStreams/insert吗?从Livestream API获取流名称

{
 "kind": "youtube#liveStream",
 "etag": "\"etag"",
 "id": "-ABa1o",
 "snippet": {
  "publishedAt": "2018-12-07T05:41:12.000Z",
  "channelId": "UC-
  "title": "Hello World",
  "description": "Snippet description of testing",
  "isDefaultStream": false
 },
 "cdn": {
  "format": "360p",
  "ingestionType": "rtmp",
  "ingestionInfo": {
   "streamName": "9qq0-ct85-ctub-",
   "ingestionAddress": "rtmp://a.rtmp.youtube.com/live2",
   "backupIngestionAddress": "rtmp://b.rtmp.youtube.com/live2?backup=1"
  },
  "resolution": "360p",
  "frameRate": "30fps"
 },
 "status": {
  "streamStatus": "ready",
  "healthStatus": {
   "status": "noData"
  }
 },
 "contentDetails": {
  "closedCaptionsIngestionUrl": "http://upload.youtube.com/closedcaption?cid=9qq0-ct85-ctub-",
  "isReusable": true
 }
}

我看到这样的响应,当我使用OBS流式传输到此RMTP URL时,它没有在流中设置的标题,您可以看到响应。我正在获取流名称,但不确定是否正确。

如果我将路径称为rtmp://a.rtmp.youtube.com/live2/steamnamefromurl/mykey 它有效,但没有我通过调用API设置的标题。任何人都请检查该页面,并帮助我解决问题。我要寻找的是为流设置标题和描述,或者验证我做的正确。

0 个答案:

没有答案