如何在我的 Roku 频道中流式传输 Youtube 视频? [英] How can I stream Youtube videos in my Roku Channel?

查看:31
本文介绍了如何在我的 Roku 频道中流式传输 Youtube 视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个 Roku 频道,该频道可以从 Youtube 频道流式传输视频内容.

I am trying to create a Roku channel that could stream video content from a Youtube Channel.

我知道一个 Linux 命令行程序 (youtube-dl) 可以让我以编程方式下载我可以通过 Youtube API 结果获得的 Youtube 视频 ID 引用的视频.我对 youtube-dl 的问题是,我不确定将它与 Youtube API 结合使用是否符合 YouTube 的服务条款.(https://developers.google.com/youtube/terms).如果以上可以合法进行,那么我的问题就解决了.

I am aware of a Linux command-line program (youtube-dl) that can let me programmatically download videos that I can potentially reference via Youtube video ids obtained by the Youtube API results. My issue with youtube-dl is that I am not sure if using it in conjunction with the Youtube API is in compliance with YouTube's terms of service. (https://developers.google.com/youtube/terms). If the above can legally be done, then my problem is solved.

我不知道我可以使用 Youtube API 获取原始 mp4 文件或任何其他支持的格式(在 Roku 播放器中)的任何其他方式,我可以轻松地在我正在构建的 Roku 频道中流式传输.

I am not aware of any other way that I can use the Youtube API to get raw mp4 files or any other supported format (in the Roku player) that I can easily stream in the Roku channel that I am building.

此外,Roku 不支持 Flash 或 HTML5,因此我无法像在网页中那样真正嵌入 Youtube 视频 URL,但 Youtube 有自己的 Roku 频道,所以我确定有办法做到这一点(也许不供开发者使用).

Also, Roku does not support either Flash or HTML5 so I cannot really embed a Youtube video URL like in a web page, but Youtube has their own Roku channel, so I am sure there is a way to do this (maybe not to available to developers).

我还知道一个名为 Plex 的应用程序,它可以让用户将 Youtube 视频导入他们的 Roku.(这需要用户在浏览器中安装插件)https://www.youtube.com/watch?v=k9OaezB3zas.(我不确定 Youtube 视频的内​​容是由 Plex 复制的还是直接从 Youtube 流式传输的).

I am also aware of an app called Plex that can let a user import Youtube videos into their Roku. (This requires the user to install a plugin into their browser) https://www.youtube.com/watch?v=k9OaezB3zas. (I am not sure if the content of the Youtube video is being copied by Plex or if they are streaming directly from Youtube).

Roku 支持的媒体类型有:

The media types supported by Roku are:

视频 — MKV (H.264)、MP4 (H.264)、MOV (H.264)、WMV(仅 VC-1,固件 3.1)音乐 — AAC、MP3、WMA、FLAC(固件 5.3 及更高版本)、WAV(固件 5.3 及更高版本)照片 — JPG、PNG、GIF(非动画)

Video — MKV (H.264), MP4 (H.264), MOV (H.264), WMV (VC-1, firmware 3.1 only) Music — AAC, MP3, WMA, FLAC (firmware 5.3 and later), WAV (firmware 5.3 and later) Photo — JPG, PNG, GIF (non-animated)

谢谢.

推荐答案

你的假设是正确的;从 YouTube 下载视频,然后自己通过 Roku 频道重新流式传输它们将违反 YouTube ToS(并且也可能侵犯版权,具体取决于内容、内容所有者、您的位置等).有许多 Roku 频道已经这样做了,但它们都因违反服务条款而被淘汰.

Your assumptions are correct; downloading videos from YouTube and then re-streaming them yourself via a Roku channel would be against the YouTube ToS (and could possibly be a copyright violation as well, depending on the content, the content owner, your location, etc). There have been a number of Roku channels that have done just this and they've all been scuttled for violating the ToS.

您也正确的是,YouTube API 不提供对 mp4 文件的直接访问,以允许您将流直接从 Roku 客户端代理到媒体资产(YouTube 的 Roku 频道没有该限制,因为考虑到他们是 YouTube ……,工程师不会通过 API.

And you are also correct that the YouTube API does not provide direct access to the mp4 files to allow you to broker a stream directly from a Roku client to the media asset (YouTube's Roku channel doesn't have that restriction, as the engineers don't go through the API given that, well, they are YouTube ...).

而且由于 Roku 不支持 Flash 或 HTML5,因此也无法嵌入 YouTube 视频.Plex 的 YouTube 频道不会下载或导入 YouTube 视频;相反,它会创建基于元数据的播放列表,然后在需要时嵌入视频(plex 媒体服务器支持基于 HTML5 的视频应用,包括 iframe 嵌入).

And since Roku doesn't support Flash or HTML5, there is no way to embed a YouTube video, either. Plex's YouTube channel does not download or import YouTube videos; rather, it creates metadata-based playlists and then just embeds the videos when needed (the plex media server supports HTML5-based video apps, including iframe embeds).

虽然这不是您问题的真正解决方案,但希望确认至少能让您思考创建媒体应用程序的新方法.有些人可能认为这是反对 Roku 和更开放(相对而言)平台如 Chromecast 的有力论据......基本上,Roku 要求您使用 BrightScript 仅从您的服务器流式传输媒体,而 Chromecast 允许您构建任何应用程序开放媒体 API 以在标准 HTML5/JS/CSS 应用中流式传输或嵌入任何内容.

Though this isn't really a solution to your issue, hopefully the confirmation will at least get you thinking about new ways to go about creating your media apps. Some might see this as a strong argument against Roku and for more open (relatively speaking) platforms like the Chromecast ... basically, Roku requires you to use BrightScript to only stream media from your servers, while Chromecast lets you build any app with any open media APIs to stream or embed anything you could in the standard HTML5/JS/CSS app.

这篇关于如何在我的 Roku 频道中流式传输 Youtube 视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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