Youtube API v3-立即获取"Live" rtmp和streamkey [英] Youtube API v3 - Get "Live Now" rtmp and streamkey

查看:326
本文介绍了Youtube API v3-立即获取"Live" rtmp和streamkey的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Youtube现在具有直播"部分,允许用户广播自己的直播会话.在此实时流"部分中,有2个选项:立即直播[测试版]"和事件".

Youtube now has a Live Streaming section that allows users to broadcast their own live stream sessions. In this "Live Streaming" section, there are 2 options: "Live Now [Beta]" and "Events".

  • Live Now是一种快速简便的方法,只需将视频编码器指向指定的RTMP Url和Stream Key,即可自动启动流式会话.它将自动检测传入的媒体并开始公开广播.

  • Live Now is a fast and easy way to start a streaming session automatically just by pointing your video encoder to te specified RTMP Url and Stream Key. It will automatically detect incomming media and start broadcasting publicly.

事件几乎是同一件事,但是具有高级设置,尽管它不会自动开始广播,并且您需要手动设置所有内容.

Events is pretty much the same thing, but with advance settings, although it will not start automatically to broadcast, and you need to set everything pretty much manually.

我知道Youtube API允许您检索Event的提取网址和流密钥,因此您可以广播到该目标,但是它还需要手动管理许多其他步骤(例如发布流,将广播与流绑定,检查状态,启动,停止等).另一方面,"Live Now"会自动创建所有内容.

I know Youtube API allows you to retrieve Event's ingestion url and streamkey, so you can broadcast to that target, but it also requires to manage many other steps manually (like publishing the stream, binding broadcasts with streams, check the status, start, stop, etc..). On the other hand "Live Now" makes everything automatically.

问题:如何从Youtube API v3中检索实时直播"摄取信息(rtmp url和streamkey)?

Question: How can I retrieve "Live Now" ingestion info (rtmp url and streamkey) from the Youtube API v3 ?

推荐答案

您无法检索实时直播"摄取信息,因为API不会区分实时直播"和事件".这两个选项是作为API的接口提供给最终用户的,因此他们不必编写自己的与API接口的应用程序.

You cannot retrieve "Live Now" ingestion info because the API does not differentiate between "Live Now" and "Events." Those two options are provided as interfaces on top of the API for an end user, so they don't have to write their own application that interfaces with the API.

您将必须手动设置liveBroadcastliveStream对象,并与 liveBroadcasts.bind ,测试您的视频流,并使用

You will have to manually set up liveBroadcast and liveStream objects, bind them with liveBroadcasts.bind, test your stream, and transition to live on the liveStream object using status.streamStatus.

这篇关于Youtube API v3-立即获取"Live" rtmp和streamkey的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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