Webrtc remote stream Raw AV samples from Electron App

104 views
Skip to first unread message

WebrtcTest None

unread,
Jul 21, 2020, 1:54:32 PM7/21/20
to discuss-webrtc
I am using https://github.com/EbramTawfik/video-chat-app sample to get the screen sharing working. But I need the raw AV buffer that I receive from the remote stream. 

So here is the html element that displays the stream

    setTheirVideo : function (stream) {
            var video = document.getElementById('their-video');
            if (typeof video.srcObject == "object") {
                video.srcObject = stream;
            } else {
                video.src = URL.createObjectURL(stream);
            }
        },

The HTML element above gets the stream. I need to get the raw AV samples, is there a way I can get these samples?

Ideas to achieve this, What I have read so far:
1) With Gstreamer pipeline we can get access to the raw AV samples. If there are any examples of Gstreamer working with Electron please send me the links.
2) I have also tried the Media Recorder but samples are received when the webrtc session is ended.
  
Please let me know if anyone has already accomplished this on Windows.


Eric Davies

unread,
Jul 22, 2020, 1:43:40 PM7/22/20
to discuss-webrtc
What you mean by raw is ambiguous.
By raw, do you mean "the packets of compressed video and the packets of compress audio", the YUV frames from the decoded video, or RGB bitmaps corresponding to what you see displayed and amplitude samples of the audio tracks?

If the latter, you could always draw an appropriately sized video object onto a canvas, and then get the canvas contents.
Similarly,  you could use the web audio api to get the audio tracks as amplitude samples.
Reply all
Reply to author
Forward
0 new messages