InnovateAsterisk / Browser-Phone

A fully featured browser based WebRTC SIP phone for Asterisk
https://www.innovateasterisk.com
GNU Affero General Public License v3.0
492 stars 242 forks source link

browser-phone as RTMP source for HLS and DASH streams #57

Open vieridipaola opened 4 years ago

vieridipaola commented 4 years ago

Hi,

I don't know if it's possible (via a Setting in phone.js) to implement a solution to "send a copy" of the full video and audio streams to an RTMP server. It would be some sort of "webrtc to RTMP" conversion.

For instance, I have an nginx installation with rtmp support, and I receive RTMP streams from several sources, then publish them with HLS and DASH, It would be interesting if an authorized/authenticated browser-phone user could be allowed to send 'everything' (the full session, ie. audio + remote camera + local camera + screen sharing if enabled, scratchpad if used, etc.) to the RTMP/NGINX server.

InnovateAsterisk commented 4 years ago

Well, if a "participant" was your RTMP server, then the conversation could be live streamed in just the same way a typical user could hear and see your conversation. I think the magic would exist in the virtual user side, that could be dialled into (or conferenced into) a conversation - that would output to said server on said IP address... or YouTube etc. I'm thinking of something like, PJSIP and getting that to connect to a conversation, then with that media object, re-broadcast the stream.

The streams in WebRTC, can be "captured" (except on Safari), (that's how call recordings work), and they can be duplicated (that's how the conference call works), unless its the conference option, it would change things considerably to have the captured stream be sent off to another server, and still then, the "path" that this would need to take would have to be along a "PeerConnection" (basically a SIP call).

An interesting idea tho!