jitsi/jibri

Record audio only

Opened this issue · 5 comments

Is there a way to make an audio-only recording?

(of course I could just change ffmpeg paramets in Command.kt ...)

No, there currently is no way to do an audio only recording.

I was thinking how to implement it. With correct audio routing through alsa loopback, I think it would be possible to run N recordings with the same jibri instance, by firing different chrome drivers outputting audio to different loopback devices.

I implemented it as hardcoded in ffmpeg command call. I wonder which names would be appropriate to make a PR?
audio-only=[true,false]
audio-codec=[mp3,weba(opus),oga(opus)]
audio-bitrate=[in kbps]
?
https://github.com/ColmenaDev/jibri/

As a start we could only have "audio-only" and thing. I also added streaming support, but the could be in a latter stage.

I do this by using a fake ffmpeg

/usr/local/bin/ffmpeg

#!/bin/bash

ARGS=$@

[[ "$(whoami)" != "jibri" ]] && exec /usr/bin/ffmpeg $ARGS

DEST=$(echo $ARGS | egrep -o "\S*mp4$")

if [[ -n "$DEST" ]]; then
    exec /usr/bin/ffmpeg -y -v info -f alsa -thread_queue_size 4096 -i plug:bsnoop \
         -acodec aac -strict -2 -ar 44100 -b:a 128k -af aresample=async=1 \
         -vn -f mp4 $DEST
else
    exec /usr/bin/ffmpeg $ARGS
fi