nginx-rtmp-module icon indicating copy to clipboard operation
nginx-rtmp-module copied to clipboard

Thanks & WebRTC question

Open lakano opened this issue 13 years ago • 61 comments

Hey !

Your module is really usefull Arut ! I love it ! Thanks a lots :-)

I have just replaced Red5 by your module, for our webcam chat, it's perfect !

Did you plan to add the support of WebRTC please ? I known the 1st goal of WebRTC is to send/receive webcam in P2P, but this could be very good to receive a webcam to permit to stream it to many persons at the same time (this prevent the user to send it to each user, and save the user upload bandwidth).

If yes, this could be really amazing !

lakano avatar Jun 24 '13 18:06 lakano

I have that in my plans

arut avatar Jun 25 '13 04:06 arut

yeah i would be great to see WebRTC here ;)

sulphur avatar Aug 29 '13 07:08 sulphur

+1

alotela avatar Aug 29 '13 07:08 alotela

+1

ciceroverneck avatar Oct 29 '13 15:10 ciceroverneck

Hi !

I don't known if you have started to play with WebRTC, but I just want to known what kind of protocol behind (SDP, SIP, Jingle) you'll support ? :-)

By default, between browsers, it's the simple SDP protocol. But the Jingle protocol (XMPP standard) permit to be interoperable with third applications (Pidgin, Empathy, Jitsi ...) And the SIP protocol could be usefull too :-)

Best regards,

lakano avatar Nov 13 '13 13:11 lakano

No news about WebRTC. However MPEG-DASH is almost ok, see dash branch.

arut avatar Nov 13 '13 14:11 arut

Awesome ! This means it's possible to read inside the HTML5 video a stream from NGINX-RTMP :-)

Now, I just need to publish my camera/mic to NGINX-RTMP in WebRTC to be 100% HTML5, without any Flash plugin ^^

lakano avatar Nov 14 '13 10:11 lakano

It's not WebRTC, it's MPEG-DASH, a completely different stuff. WebRTC is designed mostly for p2p. Moreover there's a couple of issues with dash which I think wil be fixed in near future

  • it's only supported by Chrome & dash.js library
  • dash.js still not able to play true live stream, it will only work if you connect at the moment when the first fragment is alive

arut avatar Nov 14 '13 12:11 arut

dash-js seems to support live since few months : http://streaming.polito.it/2013/03/18/dash-js-with-live-streaming/

So, in theory, this should mean we could play in an "video" tag a MPEG-DASH from NGINX-RTMP :-)

About WebRTC, I known it's P2P, but as explained in my first post above, the goal to support WebRTC in NGINX-RTMP could be really usefull to save bandwidth when there is more than 1 receiver :

In a standardized way in WebRTC : Romeo send his camera to Juliette Romeo send his camera to Mercutio Romeo send his camera to Benvolio

This mean Romeo send 3 times his own video at the same time.

But if NGINX-RTMP can receive/send WebRTC streams, we could do : Romeo send his camera to NGINX-RTMP Juliette receive Romeo webcam from NGINX-RTMP Mercutio receive Romeo webcam from NGINX-RTMP Benvolio receive Romeo webcam from NGINX-RTMP

Of course, if there is only one destinator, the chat program will not use NGINX-RTMP and do WebRTC between each users :-)

This could be really awesome to have this, to permit to make a video chat 100% HTML5 without Adobe Flash :)

lakano avatar Nov 14 '13 13:11 lakano

Here's the issue https://github.com/Dash-Industry-Forum/dash.js/issues/101

arut avatar Nov 14 '13 14:11 arut

There are a few issues. It actually works live in version 0.2.5 of dash.js http://dashif.org/reference/players/javascript/0.2.5/index.html (you must check the "Live" checkbox).

They're completely rewriting how segment scheduling works for live and should be done around late December. If you read their mailing list, they talk about their progress often. Once they get closer to completion I'm going to put some more work into this to make sure its compatible with their changes.

carbon198 avatar Nov 14 '13 14:11 carbon198

@stephenbasile I've updated your code in my branch significantly, added S tags with precise timestamps and durations (not only this however). 0.2.5 does not work with my version at all. Anyway we should wait the new version with fixed live streaming.

arut avatar Nov 14 '13 15:11 arut

@arut Thanks, I was planning on working on SegmentList support. I did give it a try but dash.js doesn't seem to be able to handle live SegmentLists. It could not figure out which segment to play at all, even from the beginning.

Ultimately we'll have to get SegmentLists working in their new player so we can support variable keyframe intervals. If you use a variable keyframe interval with a SegmentTemplate the player will get out of sync and eventually playback will fail. But yeah, there is no point in doing any further work until their new version is done.

carbon198 avatar Nov 14 '13 15:11 carbon198

@stephenbasile it's not SegmentList, it's SegmentTimeline that I use.

<SegmentTemplate
    timescale="1000"
    media="mystream-$Time$.m4v"
    initialization="mystream-init.m4v">
  <SegmentTimeline>
     <S t="1257221" d="11720"/>
     <S t="1268941" d="5171"/>
     <S t="1274112" d="5715"/>
     <S t="1279827" d="7340"/>
     <S t="1287167" d="5547"/>
     <S t="1292714" d="2866"/>
  </SegmentTimeline>
</SegmentTemplate>

arut avatar Nov 14 '13 15:11 arut

@arut Right sorry, that's what I meant. I've been writing HDS support for the past week and haven't been thinking about DASH that much.

I saw you basically rewrote the entire DASH module :P It's looking good, I'll give it some testing when I start working on DASH again.

carbon198 avatar Nov 14 '13 18:11 carbon198

@arut Would it be possible to write client to send video stream to server using above technics? So it works in non flash enabled devises ( iphone) without native app. More simple: Can we strem from non flash/flex somehow? Thanks for your time!

rubytastic avatar Nov 19 '13 23:11 rubytastic

@rubytastic you can stream with ffmpeg in any format from any place and any OS. But to stream from browser you need flash.

arut avatar Nov 21 '13 15:11 arut

+1 what is the current state ? i realy want to use webRTC with nginx-rtmp in both direction (live stream from webcam and stream to one or many subscriber)...

vvh-empora avatar Aug 15 '14 17:08 vvh-empora

Присоединяюсь к вопросу :)

ramilexe avatar Sep 20 '14 15:09 ramilexe

+1 also looking for a one to many webRTC streaming solution, have heard good things about this module & looking forward to any updates on the implementation of webRTC!

mrbfrank avatar Oct 07 '14 16:10 mrbfrank