webRTC with external video stream instead of local camera

1,226 views
Skip to first unread message

Tiến Nguyễn

unread,
Aug 28, 2014, 12:52:05 PM8/28/14
to eas...@googlegroups.com
Hi All,
What would it take to use easyRTC to relay a RTSP video stream to another client instead of using the local camera?

Thanks,

Nicholas Hall

unread,
Aug 28, 2014, 1:33:04 PM8/28/14
to eas...@googlegroups.com
Not sure if you can do this natively in EasyRTC but you could setup a virtual video source on a system using v4l2loopback that is fed from your RTSP source.


There are some other ideas listed on this stackoverflow too.  Good luck.

Eric Davies

unread,
Aug 29, 2014, 1:30:35 AM8/29/14
to eas...@googlegroups.com
From what I've read, Chrome supports forwarding remote media streams (at least the video component, not sure about the audio).  In theory, you should be able to do with using the easyrtc functions buildLocalMediaStream and getRemoteStream. I haven't tried it myself yet.

buildLocalMediaStream(streamName, audioTracks, videoTracks) → {void}

This function builds a new named local media stream from a set of existing audio and video tracks from other media streams.
Parameters:
NameTypeDescription
streamNameStringis the name of the new media stream.
audioTracksArrayis an array of MediaStreamTracks
videoTracksArrayis an array of MediaStreamTracks
Returns:
Type
void
Example
   easyrtc.buildLocalMediaStream("myComposedStream",
            easyrtc
.getLocalStream("camera1").getVideoTracks(),
            easyrtc
.getLocalStream("camera2").getAudioTracks());

Alexandre GOUAILLARD

unread,
Aug 29, 2014, 4:00:47 AM8/29/14
to eas...@googlegroups.com
the relaying of audio stream is not implemented yet. They have to change all the audio plumbing in webrtc and chromium for it to work (the mixer need to move from libwebrtc to chromium, so individual audio track can be manipulated. Right now the audio is mixed right away, and it s then impossible to get a separate track to relay it).

you can follow this bug to get more information:
Reply all
Reply to author
Forward
0 new messages