是否可以使用 WebRTC 将视频从服务器流式传输到客户端? [英] Is it possible to use WebRTC to streaming video from Server to Client?

查看:32
本文介绍了是否可以使用 WebRTC 将视频从服务器流式传输到客户端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 WebRTC 中,我总是看到有关点对点的实现以及如何将视频流从一个客户端传输到另一个客户端.服务器到客户端呢?

In WebRTC, I always see the implementation about peer-to-peer and how to get video streaming from one client to another client. How about server-to-client?

WebRTC 是否可以从服务器到客户端流式传输视频文件?(我正在考虑使用 WebRTC Native C++ API 创建我自己的服务器应用程序以连接到 chrome 或 firefox 浏览器客户端应用程序上的当前实现.)

Is it possible for WebRTC to streaming video file from server-to-client? (I am thinking about using WebRTC Native C++ API to create my own server application to connect to the current implementation on chrome or firefox browser client application.)

好的,如果可能的话,它会比当前的许多视频流服务更快吗?

OK, if it is possible, will it be faster than many current video streaming services?

推荐答案

是的,因为服务器可以是该对等会话中的对等方之一.如果您遵守协议并使用 VP8 在 SRTP 数据包中发送视频,浏览器将播放它.为了帮助您在其他应用程序或服务器上构建这些组件,您可以查看这个页面和这个项目作为指南.

Yes it is possible as the server can be one of the peers in that peer-to-peer session. If you respect the protocols and send the video in SRTP packets using VP8, the browser will play it. To help you build these components on other applications or servers, you can check this page and this project as a guide.

现在,将 WebRTC 与其他流媒体服务进行比较......这将取决于几个变量,如编解码器或协议.但是,例如,将 WebRTC(SRTP over UDP with VP8 Codec)与 Flash(RTMP over TCP with H264 Codec)进行比较,我会说 WebRTC 胜出.

Now, comparing WebRTC with other streaming services... It will depend on several variables like the Codec or the protocol. But, for instance, comparing WebRTC (SRTP over UDP with VP8 Codec) against Flash (RTMP over TCP with H264 Codec), I would say that WebRTC wins.

  • 播放器将是针对原生 标签的 Flash Player.
  • 传输将是 TCP 与 UDP.
  • The player will be Flash Player against the native <video> tag.
  • The transport would be TCP against UDP.

当然,一切都取决于您发送给客户的内容.

But of course, everything depends on what you are sending to the client.

这篇关于是否可以使用 WebRTC 将视频从服务器流式传输到客户端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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