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

docker-jitsi-meet jibri container - jibri tells ffmpeg to listen to plug:bsnoop, .asoundrc has dsnoop #479

Closed
elbow opened this issue Apr 18, 2020 · 9 comments

Comments

@elbow
Copy link

elbow commented Apr 18, 2020

I've built my own jibri docker image, since I needed to change some things in jibri to deal with the SSL cert problems.

My Makefile at the top of the project is asking for JITSI_RELEASE stable.

I see that base/Dockerfile has "ARG JITSI_RELEASE=stable" too...?

My revised Dockerfile is the standard one, except at the end I COPY my locally built jibri.jar into /opt/jitsi/jibri/jibri.jar

When jibri in my jibri docker container starts ffmpeg, it uses the command line

ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1280x720 -thread_queue_size 4096 -i :0.0+0,0 -f alsa -thread_queue_size 4096 -i plug:bsnoop -acodec aac -strict -2 -ar 44100 -c:v libx264 -preset veryfast -profile:v main -level 3.1 -pix_fmt yuv420p -r 30 -crf 25 -g 60 -tune zerolatency -f mp4 /config/recordings/xxzjnmkfonlrefyy/xyz_2020-04-18-12-06-26.mp4

audio input from plug:bsnoop.

This fails :-

2020-04-18 12:06:29.629 INFO: [54] ffmpeg.call() ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bsnoop
2020-04-18 12:06:29.629 INFO: [54] ffmpeg.call() [alsa @ 0x56223f736e80] cannot open audio device plug:bsnoop (No such file or directory)

~jibri/.asoundrc in the container has:

# playback PCM device: using loopback subdevice 0,0
pcm.amix {
  type dmix
  ipc_key 219345
  slave.pcm "hw:Loopback,0,0"
}

# capture PCM device: using loopback subdevice 0,1
pcm.asnoop {
  type dsnoop
  ipc_key 219346
  slave.pcm "hw:Loopback,0,1"
}

# duplex device combining our PCM devices defined above
pcm.aduplex {
  type asym
  playback.pcm "amix"
  capture.pcm "asnoop"
}

# ------------------------------------------------------
# for jack alsa_in and alsa_out: looped-back signal at other ends
pcm.ploop {
  type plug
  slave.pcm "hw:Loopback,1,1"
}

pcm.cloop {
  type dsnoop
  ipc_key 219348
  slave.pcm "hw:Loopback,1,0"
}

# ------------------------------------------------------
# default device

pcm.!default {
  type plug
  slave.pcm "aduplex"
}

This came from the standard stable install. But of course my jibri.jar was built from master on github so it looks like there is an incompatibility ... ?

I'd appreciate any help from those who know the product better than this newbie.

@netaskd
Copy link
Contributor

netaskd commented Apr 22, 2020

It has been changed in jitsi/jibri@5a71969
and
jitsi/jibri@600d4fe

@saghul saghul closed this as completed Apr 23, 2020
@cupuyc
Copy link

cupuyc commented Apr 23, 2020

Having the same issue. I've put fresh .asoundrc but still the same error.

@kavirajan2
Copy link

Faced the same issue fixed by replacing the .asoundrc file (/home/jibri/.asoundrc) with the below content and restart the Jibri service.

https://raw.githubusercontent.com/jitsi/jibri/master/resources/debian-package/etc/jitsi/jibri/asoundrc

@cupuyc
Copy link

cupuyc commented May 6, 2020

I kind of fixed that by reverting change in Commands.kt
from "-i", "plug:bsnoop",
to "-i", "hw:0,1,0",
as it was in the original release.

@hypnotic-frog
Copy link

For some some reason this is still not working.
I'm using Docker containers compiled from the unstable build and it gives me the same error

2020-07-24 22:50:41.556 INFO: [58] ffmpeg.call() [alsa @ 0x55b4a5f433e0] cannot open audio device plug:bsnoop (No such file or directory)

The ~jibri/.asoundrc file seems to be correct. But, no results. Somebody has a solution for this? Thanks in advance.

@DonxDaniyar
Copy link

Hi guys! I have the same problem! I have 3 instances when i run 1 instance it works. If i enable second jibri instance it fails with Last output line: plug:bsnoop: Input/output error Any solution?

@umitgri
Copy link

umitgri commented Nov 24, 2020

Hi there. I have the same problem. Did others install from https://hub.docker.com/r/jitsi/jibri or from jitsi-meet-docker https://github.com/jitsi/docker-jitsi-meet

I am using image from https://hub.docker.com/r/jitsi/jibri

What i am thinking to switch jitsi-meet-docker and give it a try...

@umitgri
Copy link

umitgri commented Nov 24, 2020

I have found the exact problem in my case;
pcm.bsnoop {
type dsnoop
ipc_key 219348
slave.pcm "hw:Loopback,1,0"
}
When i set up pcm.bsnoop slave.pcm value to other Loopback i.e. Loopback_1, Loopback_2 etc jibri docker instance is giving mpeg error mentioned above.

But any other slave.pcm parameters works fine with other Loopback values (1,2,3 etc)

So that, because i count not set any value to bsnoop slave.pcm value other than Loopback, i could not run multiple Jibri instances concurrently. Because when i do this first intance will use Loopback and others will not able to use it.

I have no solution for that for now. Also i have no idea what is reason behind that.

@netaskd
Copy link
Contributor

netaskd commented Nov 24, 2020

@umitgri you could check this file to get an idea how to do it.

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

8 participants