Video streaming over websockets using JavaScript

前端 未结 4 1598
梦谈多话
梦谈多话 2020-11-29 15:04

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?

相关标签:
4条回答
  • 2020-11-29 15:22

    It's definitely conceivable but I am not sure we're there yet. In the meantime, I'd recommend using something like Silverlight with IIS Smooth Streaming. Silverlight is plugin-based, but it works on Windows/OSX/Linux. Some day the HTML5 <video> element will be the way to go, but that will lack support for a little while.

    0 讨论(0)
  • 2020-11-29 15:26

    The Media Source Extensions has been proposed which would allow for Adaptive Bitrate Streaming implementations.

    0 讨论(0)
  • 2020-11-29 15:31

    Is WebSockets over TCP a fast enough protocol to stream a video of, say, 30fps?

    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.

    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).

    You need to build a stream API and a Media Stream Transceiver to control the related media processing and transport.

    0 讨论(0)
  • 2020-11-29 15:38

    To answer the question:

    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?

    Yes, Websocket can be used to transmit over 30 fps and even 60 fps.

    The main issue with Websocket is that it is low-level and you have to deal with may other issues than just transmitting video chunks. All in all it's a great transport for video and also audio.

    0 讨论(0)
提交回复
热议问题