miroslavpejic85 / mirotalk

🚀 WebRTC - P2P - Simple, Secure, Fast Real-Time Video Conferences Up to 8k and 60fps, compatible with all browsers and platforms.
https://p2p.mirotalk.com
GNU Affero General Public License v3.0
3.03k stars 558 forks source link

Record audio and video streams from other participants #81

Closed adler-parobocz closed 1 year ago

adler-parobocz commented 2 years ago

Excellent system, it meets the need for a meeting very well. One suggestion, when recording the conversation in the room with other participants, record their audio along with the video.

miroslavpejic85 commented 2 years ago

Hello @adler-parobocz, thank you so much, I'm glad you like it!

miroslavpejic85 commented 2 years ago

check it out: https://github.com/muaz-khan/RecordRTC/wiki/Record-Multiple-Streams-Into-Single-File

adler-parobocz commented 2 years ago

I will check @miroslavpejic85 Thank you

toshvelaga commented 2 years ago

@miroslavpejic85, this project is absolutely amazing! Thank you for all your hard work and making this open source! In terms of recording both video and audio, I noticed that in the deployed version you are basically using getDisplayMedia to record the screen which is super creative.

One thing I wanted to suggest on this thread is what about a server side solution that uses puppeteer to record the screen? I actually wrote an article recently and mentioned mirotalk in my article.

Basically on the server you could use a library like puppeteer stream to record both audio and video. I have a very short demo and code snippet in the article.

Posting here in case it helps. Thanks so much.

miroslavpejic85 commented 2 years ago

Hello @toshvelaga, Very interesting, I'll take a look at them. Thank you so much for mentioning me in your article and for the compliments, that motivates me to make it even better :)

miroslavpejic85 commented 2 years ago

Let's say that the idea of MiroTalk's recording functionality was not to depend on any external server.

If necessary, the participant starts his own registration, everything is saved in the Blob of his browser, and then downloaded to his device.

The idea of using getDisplayMedia seemed to be the most optimal as it allows you to select whether to record a specific screen, all screens, a window, and so on, including audio.

The only small problem with this task is that it only records its own audio and not that of the participants, and I had mentioned RecordRTC which probably (to try) could solve it.

Surely there will be a more optimal way to do this, but I don't know if possible without depending on an external server.

toshvelaga commented 2 years ago

Ahhh I see that makes total sense. In that case RecordRTC would be the way to go, but also like are most people who use the service using the recording feature? If it's only a small fraction of people it might not be worth all the effort.

Personally I couldn't get recordRTC to work in my react based webRTC app, but that being sent I only spent a few hours on it.

I don't know if you guys came across this, but here's a list of like 30 demos w/ source code using RecordRTC: https://www.webrtc-experiment.com/RecordRTC/simple-demos/

thetwosents commented 2 years ago

WebRTC all the way! Allow the other user to share their blob stream at the end of the call as well. Should sync up fine with both blobs being stitched as audio tracks into an MP4.

miroslavpejic85 commented 2 years ago

Hello @thetwosents, Thanks for the idea, but the problem could be if the recording is long time, the blob could reach high size, which does not become feasible to sync. The streams (audio-video) of the participants I have them in the room, there will be sure a better way to do it locally without sync.. ;) Suggestions are always welcome.

franko108 commented 2 years ago

Hello, how can we use RecordRTC or anything else when running application within the Docker? Is there some "Howto"?
For my use case also is requirement to record audio of all participants.

miroslavpejic85 commented 1 year ago

Useful links: