Janus Recording Post-Processing lag (its taking a long time for the post-processing to complete)

I hope you’re all doing well. I have a question regarding the post-processing of recorded files using the Janus playrecord plugin. Currently, after the recording is done, I end up with two .mjr files (one for audio and one for video) and a .nfo file. To post-process these files, I’ve created a bash script that checks if the .nfo file exists and then utilizes the Janus janus-pp-rec tool to convert the audio (.mjr) file to opus format and the video (.mjr) file to .webm format. Finally, I used a ffmpeg command to merge the audio (.opus) and video (.webm) into one file named “recording(.webm).”

However, post-processing is proving to be quite time-consuming. For example, a 5-minute recording takes about 1 minute to complete the post-processing, and a 1-hour recording takes approximately 11 minutes. I want the post-processing to be done on the fly while the recorded files (.mjr) are still being written, has this been done before?

I’d greatly appreciate any insights or suggestions you may have on how to achieve a more efficient post-processing workflow. Thank you in advance for your help!

1 Like

Not sure what you mean when you say post-processing is time consuming: do you mean our tool + ffmpeg? If janus-pp-rec is converting the file quickly, then it’s doing its job. Unfortunately we can’t help you on how to speed up the ffmpeg part, since that’s out of scope here.

yes i mean the tool+ffmpeg, has it been done before? where you can convert and merge the recording while the mjr files are being written too(on the fly).

janus-pp-rec needs a complete mjr file, you can’t use it with files still being written.

If you need live recording, you may want to look at RTP forwarders instead, so that you can relay the media from participants to a separate application in real-time (e.g., ffmpeg or gstreamer) and record there. FOSDEM 2020 - Janus as a WebRTC "enabler"

2 Likes

thank you I found a solution, the problem was with my ffmpeg command.

1 Like