Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use WebRTC to streaming video from Server to Client?

Tags:

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?

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?

like image 361
A-letubby Avatar asked Jul 09 '13 15:07

A-letubby


People also ask

Can I use WebRTC for live streaming?

WebRTC leverages three HTML5 APIs enabling browsers to capture, encode, and transmit live streams. While streaming workflows can often require an IP camera, encoder, and streaming software, the most basic WebRTC use-cases can manage the whole enchilada with just a webcam and browser.

Does Netflix use WebRTC?

Netflix primarily uses DASH (Dynamic Adaptive Streaming over HTTP), but also has some other fallback encoding profiles (depending on platform). As far as I can tell, WebRTC is not used by Netflix.

How does WebRTC streaming work?

How Does WebRTC Work? WebRTC employs three HTML5 APIs that allow users' browsers to capture, encode, and transmit live streams between one another, enabling two-way communication. For this reason, WebRTC is referred to as peer-to-peer technology, whereby each browser communicates directly with one another.

Is WebRTC a client server?

You can use WebRTC with a node server, but WebRTC is really a protocol for persistent communication between two clients. Using socketIO will set up a persistent connection between a client and your server. You might want to look into PeerJS if you are interested in setting up WebRTC handshaking from your node server.


1 Answers

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.

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.

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

like image 197
nakib Avatar answered Oct 23 '22 19:10

nakib