Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record audio only #501

Open
rafael2k opened this issue Jan 23, 2023 · 5 comments
Open

Record audio only #501

rafael2k opened this issue Jan 23, 2023 · 5 comments

Comments

@rafael2k
Copy link

rafael2k commented Jan 23, 2023

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

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

@saghul
Copy link
Member

saghul commented Jan 23, 2023

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

@rafael2k
Copy link
Author

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.

@rafael2k
Copy link
Author

rafael2k commented Feb 6, 2023

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/

@rafael2k
Copy link
Author

rafael2k commented Feb 6, 2023

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

@emrahcom
Copy link
Contributor

emrahcom commented Mar 7, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants