How To Capture WebRTC Stream From Different Page In NodeJS - node.js

I'm new to Node.js and WebRTC concept. I'm trying to make a an audio stream in which one of the page is the music controller and the other page is just playing whatever stream the music controller page is playing.
I based the idea on this link:
https://webrtc.github.io/samples/src/content/capture/video-pc/
But instead of video I just want audio. I'm able to make it work when they are on the same page but there is a problem when capturing stream from different page/url. NodeJS cannot access DOM elements so I'm stuck. I tried accessing the controller page audio element using document.getElementById but its not working. Please help how to get over this.

Related

Audio in safari

Hello developers community,
Currently I have task to create walkie talkie app,
I am using React.js,socket.io(for real time communication) & express js.
I am not able to play audio continuously which arrives from socket listener.
specifically in IOS safari.
I can play audio with static url(base64 data url) but not with dynamic base64.
Is there any way to contionuosly pass & play the audio.
I am free to adopt any other framework or protocol also. just need some guidence for create this type of application.
I tried Audio() api and also set UX flow to get user activity in website so that browser allows Audio() to play.

How can I Record video from webcam on client with lossless frame pixels through browser?

I need to build a website which recording the person from the camera (he must allow the camera first), but I need the record frame by frame with lossless pixels.
I tried to figure this out with some options:
opencv.js - didn't figure it, it is using the browser video element, this is changing the pixels by compressions right?
ngx-webcame - I read it using capturing lossless images but not video
Now the other issue that I need to send the frames to the server?
should I save the frames on client process it on client computer and then send the result to the server?
Is there an option to send the video data frame to the server for future use?
Someone told me to build an agent that will do this actions and send the data on chunks but in that case I don't know really how to do it and I need clarification on that and some instruction on how to start build something like that.
If anyone have an example codes or anything that can direct me to the solution it will be very helpful.
I've created something similar befor using RecordRTC.
It takes advantageg of WebRTC. It works pretty straitforward. Record the video localy and upload it as a file.
https://github.com/muaz-khan/RecordRTC

Nest Camera Video Streaming in VLC player

I have got a public share nest camera address from my friend.
Instead of using a web browser for seeing the video, I want to use a VLC player to video stream. This way allows me to use many other features of VLC to do video analytics on the video.
How to do it?
I was able to do this in these steps:
Go to the public video share URL. It should be something like this:http://video.nest.com/live/pSgnOZ0s4t
If you use developer tool on chrome and see network traffic ....look for a URL with .m3u8 in the end... it will be something like this:https://stream-delta.dropcam.com/nexus_aac/37451e60aeac457f9800704f1662147e/playlist.m3u8
Once you get that open that file in a text editor....you will get something like this inside the file
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=400816,CODECS="avc1.77.31,mp4a.40.2",RESOLUTION=1280x720
chunklist_w391480529.m3u8
The stream URL is then
https://stream-delta.dropcam.com/nexus_aac/37451e60aeac457f9800704f1662047e/chunklist_w391480529.m3u8
Once you have this then install livestreamer to extract video like this:
livestreamer "hls://https://stream-delta.dropcam.com/nexus_aac/37451e60aeac457f9800704f1662047e/chunklist_w391480509.m3u8" best -o nest_video.ts
This will save the file to your disk.
I used this to avoid nest aware subscription. Unfortunately, they charge so much for that service. When someone can just save the video to a disk and upload to a cheap cloud option...
I wrote a page that takes a public Nest video url and returns an HLS media .m3u8 streaming url
get media url for nest/ dropcam cameras

How to play realtime binary stream through client speakers in HTML5

I need help playing a binary stream to a client's speakers using the client's web browser. The stream is being recorded from a client's web browser and is sent to a NodeJS server using BinaryJS. I have successfully streamed the binary data back to the client from the server, but cannot figure out how to play it. I am using NodeJs, BinaryJS, webAudio API, and HTML5. I have also been testing with Firefox. Has anybody done this before? Thanks in advance.
If this is an option for you, the simplest option would be to encode your data to a compressed format (say, mp3, ogg, opus, etc.), and simply put the URL in an <audio> tag.
This pages is a good introduction on how to stream mp3 from node.

Record Screen's Happenings(Audio+Video)

i am new baby in WebRTC and want to implement system like video conferencing , live streaming or you can skype using WebRTC and NodeJS.
i am confused with one thing , as its our one of client's requirement , suppose on page whatever is happening it may be video conferencing say one moderator answering to many audiences one by one , so there should be one video created , which continuously recording all this stuff together and sending live stream to server to save in our database.
is this kind of stuff implementable or not?
any help please.
You can capture video through grabbing Jpeg images from a canvas element. You could also capture the entire page(if numerous videos in the same page) through grabbing the page itself through chrome.
For audio, recording remote audio with the Audio API is still an issue but locally grabbed audio is not an issue.
RecordRTC and my Modified Version for recording streams either to file or through websockets respectively.
Capture a page to a stream on how to record or screenShare an entire page of Chrome.
If you have multiple different videos not all in the same page but want to combine them all, I would suggest recording them as above and then combining and syncing them up server side(not in javascript but probably in C or C++).
If you MUST record remote audio, then I would suggest that you have those particular pages send their audio data over websockets themselves so that you can sync them up with their video and with the other sessions.

Resources