Is it possible to Recording conference call?

I have been taking streams of all peers in room, showing them in div container. I tried many ways but not able to record conference call. Do help me with this!

1 Like

Look for ā€œrecordingā€ in this forum. There are already many entries that will help you.

Hey, first of all thanks for reply. There are entries for ā€˜recordingā€™ but they are for single call record not for conference call recording. I have been trying to record conference call from weeks. Do help with this!

Believe me or not, but we are not mandated to help anyone. Read the docs and related external projects.

1 Like

Are you looking to record all the streams to the same file?
If so you will probably need to record the streams separately, and then use ffmpeg to merge them all into one file, which can be a nightmare.

Easiest way would probably have one user screen capture the conference and record that stream.

Recording and playback of a production-grade solution today is the single biggest weakness of MediaSoup IMO. Once that is solved it will be the best ā€œcompleteā€ option by far.

You have to understandā€¦ as amazing as MediaSoup is, you will have to spend most of your effort and time on creating production quality recording and playback solutions. Wish it was different, but it is still way better than having to do it all.

Bottom line: There is no good solution yet, because it is so hard to do. We created a production quality solution for audio only and working on the video part next. Why donā€™t we share it? Well, we cannot support it in a public group and it is part of how we need to pay for all the effort to get it working in the first place :slight_smile:

Best of luck,

1 Like

mediasoup is a media router, not a media endpoint. Recording means decoding, integration with libav, etc etc. Thatā€™s not what mediasoup is intended for.

1 Like

Completely Agreeā€¦ Let me rephrase: ā€œRecording and playback of a production-grade solution today is the single biggest weakness of MediaSoup Eco-Systemā€

1 Like

In fairness, noā€“recording does not necessarily mean ā€œdecodingā€. There are multiple ways to record streams, some of which do not involve decoding, but depacketization and reconstruction of compressed audio or video.

These are both of the methods used by gstreamer/ffmpeg code Iā€™ve seen floating aboutā€“they work, although only marginally so.

Thatā€™s why we may add a ā€œencoded frame based APIā€ in the future.

2 Likes

Another thing you could do (havenā€™t tested yet), if you just need an active speaker, you could for example let ffmpeg record with rtp and let ffmpeg wait for a new connection when you just switch producer and reconnect to ffmpeg. ffmpeg has a parameter -stimeout 1000 which lets you set the timeout before it closes the rtp stream.


Then just like @ethand91 said, you can combine all the files together. Iā€™m currently working on a tool that uses ffmpeg. With as input only the paths to the video files (of the seperately recorded users) and their start time. It then outputs a single video just like a video conference where you see multiple people coming on and off.
The layout is also customizable.

Now just adding some more support for when there is video-only, or audio-only mixed into it and also putting the most active speaker in front (based on audio or preset or something).

Still work in progress but Iā€™ll probably release it soon.

2 Likes

I published a first version for the package to combine separately recorded videos into a single file with different video call layouts:

Feel free to do some pull requests and create issues, there is still some improvement possible.

7 Likes

Hi Dirk,

Thank you so much for providing the access to the project.

Can we use separate .webm as well to do the merged recording?
and what if we give 0 has the starttime value for all the individual recorded files in new Media() object?

Hi @madabhaviamit,

I havenā€™t tested with .webm files yet, but should normally not cause any problems as they will be reencoded.
If the starttime is 0 for every file then they will all show up on the screen at the same time in the chosen layout.

1 Like

Hi Dirk,

I am getting error when running the example, Raised a git issue for the same. Please help

Yes, it is possible to recording conference call by keeping a system bot inside a meeting. I achieved the recording feature using puppeteer, ffmpeg, Mediarecorder api and some application customization.

  1. Create a bot (Backend and frontend both) - To keep your meeting recording UI real, create a bot page like your meeting page in frontend.
  2. On record press, start puppeteer in backend and load your bot URL. (Now your bot starts consuming media from all producers with similar layout in HTML CSS )
  3. Checkout puppeteer screen recorder module and configure it on your puppeteer instance ( This records your bot screen video )
  4. In Bot page, write some javascript. ( On each consumer received for Audio, keep recording the audio using MediaRecorder API and save it with the timestamp on some desired location so you can process that later )

Now you have 1 recorded video and several chunks of recorded audio according to timestamps

  1. Write a FFMPEG command to merge video and audio chunks according to time stamps. (Hint: Use itsoffset option for audios)

Tips:

  • Keep metadata of your audio recordings with timestamps to have a good sync while merging with video
  • Before merging, change your recorded video speed to 1.08 (using setpts in ffmpeg) for better sync
1 Like

Thanks for this idea @imtiyaz :+1::+1:

Thanks, @imtiyaz for sharing such useful ideas.

How to separately record the videos streams in your mediasoup record-demo?