问题描述
使用JavaScript流式传输直播视频的最快方式是什么?通过TCP的WebSockets是一个足够快的协议来流式播放30fps的视频吗?
What is the fastest way to stream live video using JavaScript? Is WebSockets over TCP a fast enough protocol to stream a video of, say, 30fps?
推荐答案
是..它是,看一看在此。 Websockets可以轻松处理高清视频流。但是,您应该选择自适应流媒体。我解释您可以实现它。
Yes.. it is, take a look at this project. Websockets can easily handle HD videostreaming.. However, you should go for Adaptive Streaming. I explain here how you could implement it.
目前,我们正在开发基于网络的即时消息应用程序,其中包括聊天,文件共享和视频/网络摄像头支持。通过一些比特和技巧,我们通过websockets获得流媒体(使用HTML5 Media Capture从我们的网络摄像头获取流)。
Currently we're working on a webbased instant messaging application with chat, filesharing and video/webcam support. With some bits and tricks we got streaming media through websockets (used HTML5 Media Capture to get the stream from our webcams).
你需要建立一个流API
和媒体流收发器
来控制相关的媒体处理和传输。
You need to build a stream API
and a Media Stream Transceiver
to control the related media processing and transport.
这篇关于使用JavaScript通过websockets进行视频流传输的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!