Hacker News new | past | comments | ask | show | jobs | submit login
RecordRTC: JavaScript library for audio, video, screen, and canvas recording (recordrtc.org)
177 points by bryanrasmussen on July 17, 2020 | hide | past | favorite | 25 comments



My experience with this library is iffy. While it's fairly painless to use, a benefit which cannot be understated since implementing WebRTC is actually incredibly difficult in practice, it doesn't seem to be well optimized especially if recording two sources at the same time (audio, screen, camera). People have reported a variety of performance issues with my side project serverless.cam such as general lag while recording and poor synchronization (one source lagging behind another).


In regards to the difficulty of using WebRTC, the API was created by Ericsson which also invented Erlang, a language renowned for its concurrency capabilities but also its otherworldly syntax, so it shares that same uncannily foreign design and syntax. If there was any one company that was employing technology from an advanced alien civilization, my suspicions would immediately fall on Ericsson.


Same company sure, but different people and really different eras. That'd be like saying the company that built DX12 was the same company that built BASIC.

WebRTC's arcane operations are more a product of the realities of peer-to-peer communication in a mostly NAT'ted world and SIP. Ericsson was big into IMS, and if you rub some Web on IMS, you get WebRTC.


I get your point, but there must be some sort of connection. Erlang and WebRTC are two of the strangest things I've ever seen. It would seem implausible for one company to repeatedly produce such oddities by chance.


Huh, that's actually pretty neat.


I use this extensively for mixing/recording video streams, although I think that Muaz library is great, but browsers support for WebRTC recording is far from being production ready.

Some issues off the top of my head : - Non seekable videos in Chrome - Video/audio lags and de-synchronization - Loss of audio streams in Chrome


I remember thinking how insane it was that a big chunk of browser audio/video apps ran off of a library authored by one random dude.


Is there another library you can recommend?


Chad Hart just posted his observations on using the getDisplayMedia API itself.

https://webrtchacks.com/jitsi-recording-getdisplaymedia-audi...


I have yet to find anything.


Actually the library is deprecated in various aspects also say do things like record directly from DOM nodes but not works.

Muaz are very big contributor to WebRTC examples and very experimented WebRTC developer, but no one hear about him in the last few months.

Remember that Muaz have a disclaimer in every repository that the code is not recommended to use in production.

In general you can use it but the problems comes in iOS Safari and sometimes in Firefox.


A bunch of samples:

Main:

https://www.webrtc-experiment.com/RecordRTC/

Canvas Recording

https://www.webrtc-experiment.com/RecordRTC/Canvas-Recording...

Simple Demos

https://www.webrtc-experiment.com/RecordRTC/simple-demos/

Github

https://github.com/muaz-khan/RecordRTC

Nice library and shows nearly all uses of WebRTC with samples for most platforms js/node, .NET, php, etc

More experiments from the author

https://www.webrtc-experiment.com/


Muaz has been awesome about sharing his knowledge. WebRTC is not directly related to my line of work, but Muaz's demos and code have kept me engaged with this topic. Good Job!


ikr! No WebRTC without his code somewhere.

This one time at Startup School Meetup @ YC, I was having random discussion about my country and the other person says something like "Do you know Muaz, he is from your country, if you search for WebRTC, his demos are the only thing that pop ups everywhere"

So yeah, Muaz is awesome.


Yes if you enter en the WebRTC world sooner or later you hear about Muaz and their experiments and libraries.


This library has some problems, but Muaz _IS_ awesome.

He is a developer I actually follow on GitHub.


A fun observation: neither regular WebRTC nor this library will work with Safari on iOS for audio recording, unless your site is behind https.


Browsers generally will not set `navigator.mediaDevices` unless you're using a secure connection (except for localhost). This is frustrating when testing apps that use these features as you then need to use self signed certs. I understand why, though.


Yes for use WebRTC is mandatory have https either for browsers based on Chromium, Gecko and Webkit. (Chrome, Firefox, Safari).

I'm completely agree with you because I'm tried on iOS Safari and I got a poor performance over the video call.


I’m pretty sure Chrome also blocks WebRTC over HTTP, although with some of these kinds of things it can be difficult to verify.


Note, webRTC "over" http or https is not a thing. What is a thing is a page that is served over http or https initiating a webRTC connection, which goes over UDP and is peer to peer, unless there's relay servers, in which case it should still be over UDP.


Should work with localhost origin.


Any example on how to get it working for voice streaming use cases... Capture microphone audio and send to backend in real-time


Or 1 to 1 audio chat? Currently struggling with this one


Now I'm working on that :)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: