33

I have two computers on the same network. One of them transmits a movie (H264) with RTP protocol. Is it possible to create a simple javascript app to receive this stream on the second computer and display in a video tag?

So far my impression of WebRTC is that it's designed to be used between browser (both using WebRTC api), but I want to use it only on the receiving side.

Pal Szasz
  • 2,954
  • 3
  • 20
  • 18
  • 2
    This is a good question, I would like to stream video from my embedded device and I was hoping I could just parse the video with the new JavaScript APIs. – Matt Clarkson Jun 13 '13 at 22:19
  • 1
    I know I'm coming late to the party but did you find any solution to your problem? if so, would you mind sharing? @Pal Szasz – juan_marti Feb 16 '21 at 16:22

3 Answers3

3

It is possible to stream video using WebRTC, you can send only data parts with RTP protocol, on the other side you should use Media Source API to stream video.

Here is article with demo explained about Media Source API

mpromonet
  • 11,326
  • 43
  • 62
  • 91
kongaraju
  • 9,344
  • 11
  • 55
  • 78
  • 3
    This looks very interesting, but I don't see the whole picture yet. Currently I already have one machine which sends the H264 encoded video using RTP. What I need is a way to receive this stream and display it in the browser. It seems using the MediaSource API I can feed the video tag with the stream, but how I receive the stream? – Pal Szasz May 24 '13 at 12:19
  • You can send data through dataChannel as chunks. – kongaraju May 24 '13 at 12:23
  • 2
    But how do I receive the RTP/UDP packets? – Pal Szasz May 24 '13 at 12:26
  • anything new on this topic? – MMachinegun Nov 06 '14 at 18:15
  • @WooDzu, did u find any solution for your requirement?. if so, would you mind sharing?. Thanks for your help. – Whoami Mar 13 '15 at 07:17
3

May be this might help Janus-Gateway. This has listed RTP in Dependencies

Abhijeet
  • 8,561
  • 5
  • 70
  • 76
  • Here is a nice tutorial using gstreamer to send RTP to janus and display it using WebRTC http://www.rs-online.com/designspark/electronics/eng/blog/building-a-raspberry-pi-2-webrtc-camera?/designspark/electronics/blog/building-a-raspberry-pi-2-webrtc-camera= – mpromonet Mar 23 '15 at 07:33
  • 1
    The example does work using the Janus demo page, but it involves installing a web server and has lots of dependencies in the demo page. Is there a simple "install Janus, start gstreamer, open webpage on other computer" example, that involes only 1-3 files (html+js)? – Bim Dec 21 '16 at 22:51
0

Sure,

you can use the mediasoup for this it provides apis for receiving and sending RTP.

Abilogos
  • 4,777
  • 2
  • 19
  • 39
Usama
  • 159
  • 1
  • 13