Session recording - host's screen + all audio streams merged

Dear all,
For our application www.beelday.com that is used for interactive training sessions using video we got request to create training sessions recordings. Because there are many interactive applications on the screen next to video like polls, whiteboard, notebook, tests etc. we intend to capture trainer’s whole screen, it’s audio, and audio of trainees (otherwise any discussions will save trainer voice only). For screen capture we wanted to either send screenshare of the trainer or use OBS Studio. But we don’t know how to merge audio streams - can we use Audio Bridge API for this? Both screen capture and merged audio we would like to send across to wowza or other streaming and storage services.
Any hints how can we do audio streams merge? Or perhaps our idea how to satisfy recording is wrong and we should tackle it in a different manner?

Thanks up front for your help!!

Best,
Alek

We personally do recordings in a different way. We record all the individual audio and video streams in Janus, as MJR files, and then we mix them all together using a custom application we created based on the mlt framework. This is what we do at IETF and RIPE meetings, as you can see in this example (which also shows a few layout changes depending on which content was on).

Considering that you use screensharing for video because of the non-audio/video applications, you could use a similar approach to mix the separate audio MJR recordings and the screen share MJR recording.

1 Like

Thank you very much Lorenzo!

Is this janus-pp-rec.c File Reference the custom application you use to mix (merge) streams?

No, janus-pp-rec is what you use to convert an MJR recording to an individual audio or video file. The application we wrote based on mlt for our own needs is not open source, but mlt is.

Do you have a link to this mit application or a name so I can look it up?

MLT, not MIT. Just search MLT framework and you’ll find it.

1 Like

We noticed that ffmpeg may also do the job. We gonna give it a shot, as we already using ffmpeg for audio manipulation and if this fails we’ll definitely turn our attention to mlt.
As for the recording to mjr files is there a way to turn it on/off on a vcr level (like over a websocket command) or you can only do it globally in videoroom.jcfg.?
Also, my assumption is we need to shove mjr to janus-pp-rec.c File Reference for turning it into a file format that ffmpg or mlt can digest. Is it correct?

Thanks up front for reply - you guys rule.

The VideoRoom has ways to start/stop recordings dynamically, you can refer to the documentation for info on that.

One more thing. Do you handle cases like a temporary stream drop due to network breaking up in recording? We want to silent pauses caused by temporary user’s drop in audio channels. Ideally, we would like to be able to concat audio files by using a tool like janus-pp-rec in a way that the time between the last frame in the first file and the first in the second (ordered by time) will be filled with silence, or that recording itself produces one file with all temporal drops filled.
Otherwise we can concat it ourselves but since mjr file type does not guarantee total ordering by frame receiving time can we assume that the last frame in the file is almost the last received (difference in tens of milliseconds) or not and we need to find it by looping through all received frames?