I am using janus-gateway for recording in web-browser. Once the recording is completed, two files are generated, one is audio and another is a video. Both have format mjr. How can I combine both these files to create a single file?
I was dealing with the same need.
If you did the default janus-gateway install you only miss these steps:
run this on the folder where you downloaded the git sources:
./configure --enable-post-processing
then
make
(sudo) make install
then run this for each file you want to convert them to audio/video formats:
./janus-pp-rec /opt/janus/share/janus/recordings/video.mjr /opt/janus/share/janus/recordings/video.webm
./janus-pp-rec /opt/janus/share/janus/recordings/audio.mjr /opt/janus/share/janus/recordings/audio.opus
if you don't have ffmpeg installed run this (i'm on Ubuntu, on other distros ffmpeg might be already in apt-get repositories)
sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next
sudo apt-get update
sudo apt-get install ffmpeg
and then finally to merge audio with video:
(sudo) ffmpeg -i audio.opus -i video.webm -c:v copy -c:a opus -strict experimental mergedoutput.webm
from there you can build a shell script to convert all mjr files automatically on a cron
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With