How to implement WebRTC recording to Node.js server - javascript

I would like to create an easy video blogging solution utilizing WebRTC technology to enable recording of video/audio directly from the browser, similar to Youtube's My_Webcam. The server component should be based on Node.js.
I found some Node.js libraries for general WebRTC connection managment (webRTC.io, Holla, EasyRTC), but it seems they don't enable recording of streams on the server.
What's the best way to implement server-side recording? Are there libraries and tutorials available?

This guy has a ton of interesting WebRTC experiments, including audio/video recording: https://github.com/muaz-khan/
Here's a demo of recording: https://www.webrtc-experiment.com/RTCMultiConnection-v1.4-Demos/RecordRTC-and-RTCMultiConnection.html
It collects the audio and video streams on the client and gives you a blob of audio and a blob of video that you can then upload/splice together.
Not exactly what you were hoping for, I think, but could probably get the job done. Hope that helps.

You may use node-webkit to achieve this. Node webkit is essentially a browser in node.js.

Related

How to stream audio live from browser to shoutcast-server

I am able to record audio direct in the browser from the device-microphone. I am using for this HTML5 (audio-tag) and JavaScript (.getUserMedia). Now I am looking for the best way to stream it live to my shoutcast-server. I found several threads to this topic but they are all >5 years old and do not really solve my problem.
What is the best way to to stream audio live from the browser to a shoutcast server?
The SHOUTcast source protocol is non-standard and cannot be streamed to directly from a browser. Some sort of translating proxy is required.
It's also likely that this proxy will need to transcode the audio as well, as the codecs available to you in-browser are not typically used in SHOUTcast streams.

What Protocol to use for chat? webRTC or Websockets

I'm creating a Chat site that will be able to do, Video, Audio and Text Chatting. I'm currently using Websockets for Text Chatting. I need to know what is best at Video, Audio and Text Chatting. Which one is more effiecint. Should I use Websockets for all of them or webRTC for Video and Audio and Websockets for Text Chat. I can do both and wouldn't like to have to re-write my text chat for webRTC but if it is a better option then I will.
EDIT: I've just found out about binaryJS, Is this a better and easier alternative to webRTC?
Thanks,
#_C1D
By embedding your video and audio streams in websockets, you'll have a simpler system but everything will have to pass through your server.
WebRTC allows for a direct connection between pairs, so you'd get much better results using it.
Note also, but you probably know it already, that everything webRTC is just emerging.
Regarding the question in edit, about binaryJS : I never tried that but it doesn't look like a deal changer, just a facility for using websockets.

Are there any programs to record through a microphone that work inside a web browser?

I had a someone ask me if it were possible to record a person's voice inside of a web-browser - similar to what can be done on many operating systems. Is this possible through javascript or flash? Are there any programs that let you do this, and have the wav/mp3 of the recorded audio uploaded to the server? I'd prefer the solution to not use Flash if it can be avoided.
Thanks
You could use WAMI-Recorder. It still uses flash, but is designed to work with Javascript and data can be sent with HTTP POST. However, there's no way to access the microphone with Javascript alone.
At the moment, Chrome is the only browser that supports x-webkit-speech which is what they use to allow users to use voice to search Google on their desktop. HTML5 has getUserMedia, but support for that is also minimal and if your project is for mass consumption then it's unlikely to be a suitable.
Hey check out this post where i replied to a guy with a similar question as you.
How do I embed a Flash audio recorder in my site
I have done extensive research into client side only microphone recording and could not come up with any solution other than flash. If you follow my correct answer in the thread i posted, you can record audio from a microphone on the client side and then you can modify the code yourself and upload the audio to your server, its not that hard just a simple POST call.
If you do find a non-flash way to record let us know!

Video streaming over websockets using JavaScript

What is the fastest way to stream live video using JavaScript? Is WebSockets over TCP a fast enough protocol to stream a video of, say, 30fps?
Is WebSockets over TCP a fast enough protocol to stream a video of, say, 30fps?
Yes.. it is, take a look at this project. Websockets can easily handle HD videostreaming.. However, you should go for Adaptive Streaming. I explain here how you could implement it.
Currently we're working on a webbased instant messaging application with chat, filesharing and video/webcam support. With some bits and tricks we got streaming media through websockets (used HTML5 Media Capture to get the stream from our webcams).
You need to build a stream API and a Media Stream Transceiver to control the related media processing and transport.
The Media Source Extensions has been proposed which would allow for Adaptive Bitrate Streaming implementations.
To answer the question:
What is the fastest way to stream live video using JavaScript? Is
WebSockets over TCP a fast enough protocol to stream a video of, say,
30fps?
Yes, Websocket can be used to transmit over 30 fps and even 60 fps.
The main issue with Websocket is that it is low-level and you have to deal with may other issues than just transmitting video chunks. All in all it's a great transport for video and also audio.
It's definitely conceivable but I am not sure we're there yet. In the meantime, I'd recommend using something like Silverlight with IIS Smooth Streaming. Silverlight is plugin-based, but it works on Windows/OSX/Linux. Some day the HTML5 <video> element will be the way to go, but that will lack support for a little while.

Streaming Audio on my website

I am interested in streaming audio on my website, but I have no clue where to begin. There are two types of streaming I hope to achieve. The first would be streaming a playlist of songs stored on the server and the second would be live audio streaming. Can anybody recomend any good sites or plugins to use?
SoundManager2 could cover the client side stuff (cross-platform, uses flash) and any web server can be used to serve audio files that could be used in a playlist. Live streaming is a bit more complicated but could be accomplished using IceCast or mpd.
What you're looking for is a streaming audio server.
A Google search should help you locate a server or software that best fits your needs.

Categories