Jibri FFMPEG - Recording Failed

Hi @damencho ,

Need you help in fixing this issue. I’m using Jibri/latest docker image in container. But getting the FFMPEG error:

2021-02-16 08:28:14.532 INFO: [57] ffmpeg.call() ffmpeg version 4.1.6-1~deb10u1 Copyright © 2000-2020 the FFmpeg developers
2021-02-16 08:28:14.532 INFO: [57] ffmpeg.call() built with gcc 8 (Debian 8.3.0-6)
2021-02-16 08:28:15.016 INFO: [57] ffmpeg.call() configuration: --prefix=/usr --extra-version=‘1~deb10u1’ --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
2021-02-16 08:28:15.016 INFO: [57] ffmpeg.call() libavutil 56. 22.100 / 56. 22.100
2021-02-16 08:28:15.016 INFO: [57] ffmpeg.call() libavcodec 58. 35.100 / 58. 35.100
2021-02-16 08:28:15.016 INFO: [57] ffmpeg.call() libavformat 58. 20.100 / 58. 20.100
2021-02-16 08:28:15.017 INFO: [57] ffmpeg.call() libavdevice 58. 5.100 / 58. 5.100
2021-02-16 08:28:15.017 INFO: [57] ffmpeg.call() libavfilter 7. 40.101 / 7. 40.101
2021-02-16 08:28:15.017 INFO: [57] ffmpeg.call() libavresample 4. 0. 0 / 4. 0. 0
2021-02-16 08:28:15.017 INFO: [57] ffmpeg.call() libswscale 5. 3.100 / 5. 3.100
2021-02-16 08:28:15.017 INFO: [57] ffmpeg.call() libswresample 3. 3.100 / 3. 3.100
2021-02-16 08:28:15.017 INFO: [57] ffmpeg.call() libpostproc 55. 3.100 / 55. 3.100
2021-02-16 08:28:15.017 INFO: [57] ffmpeg.call() [x11grab @ 0x55adfc631580] Stream #0: not enough frames to estimate rate; consider increasing probesize
2021-02-16 08:28:15.018 INFO: [57] ffmpeg.call() Input #0, x11grab, from ‘:0.0+0,0’:
2021-02-16 08:28:15.018 INFO: [57] ffmpeg.call() Duration: N/A, start: 1613464094.717958, bitrate: N/A
2021-02-16 08:28:15.018 INFO: [57] ffmpeg.call() Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1280x720, 30 fps, 1000k tbr, 1000k tbn, 1000k tbc
2021-02-16 08:28:15.076 INFO: [57] ffmpeg.call() ALSA lib pcm_direct.c:1824:(_snd_pcm_direct_get_slave_ipc_offset) Invalid value for card
2021-02-16 08:28:15.076 INFO: [57] ffmpeg.call() [alsa @ 0x55adfc63bc80] cannot open audio device plug:bsnoop (No such device)
2021-02-16 08:28:15.076 INFO: [57] ffmpeg.call() plug:bsnoop: Input/output error

Kindly suggest how to fix this.

Thanks

Arvind

Did you enable/install snd-aloop module on host?

Hi Prashanth,

Yes, I think it’s already complied. I’m using PaaS, on same platform if I use entire Jitsi stack with docker containers it works fine.

root@node98601-env-2068478:~# lsmod | grep snd_aloop
snd_aloop 4242 -2
snd_pcm 4242 -2 snd_aloop
snd 4242 -2 snd_aloop,snd_timer,snd_pcm,snd_seq,snd_seq_device

When I directly install a container from docker hub, FFMPEG showing error.

Not sure what’s the root cause. Looking for expert’s help here.

Thanks

@damencho @saghul @Freddie

Requesting your attention, as I’m stuck with this.

Please advise.

Probably the container has no permission to access to the sound device.

@nky Run the following commands and share your outputs:

su jibri

aplay -l

arecord -l

Thanks for your inputs, got something interesting.

root@node98601-env-2068478:~# su jibri
aplay -l : not found aplay: device_list:272: no soundcards found…
arecord -l arecord: device_list:272: no soundcards found...

But I see .asoundrc in place. When I run these commands as root user.

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7

Please advice.

Thank you @emrah , you seem to be right here as per output pasted below.

As root user - I see soundcard devices. But as Jibri user - not able to access.

How can I give the jibri user the access to soundcard devices.

Please suggest.

Thanks

My 2 cents…check the groups jibri belongs to.

jibri : jibri adm audio video plugdev jitsi

I think that’s the issue. It is not in group ‘audio’. I just removed it on my system from group audio and I see same output you were seeing.

@Prashanth Here is what I have got.

root@node98601-env-2068478:~# groups jibri
jibri : jibri adm audio video plugdev jitsi
root@node98601-env-2068478:~#

But still situation remains the same.

So even now ‘aplay -l’ says no soundcards?

Try adding jibri to group ‘root’ and then check if recording works. I know it is not a solution. But check if it works until someone else have some other ideas on how to fix this.

@Prashanth This is even more surprising. Added, but still the same.

root@node98601-env-2068478:~# groups jibri
jibri : jibri root adm audio video plugdev jitsi
root@node98601-env-2068478:~# su jibri
aplay -l aplay: device_list:272: no soundcards found...

Where is your .asoundrc located?

@Freddie .asoundrc is in /home/jibri/ .

What’s the output of the following:

sudo ls -l /home

@Freddie It’s as below.

root@node98601-env-2068478:~# sudo ls -l /home
total 4
drwxr-xr-x 7 jibri jibri 4096 Feb 8 11:26 jibri
root@node98601-env-2068478:~#

Try deleting and recreating .asoundrc

Who run the Jibri service on Docker?
jibri or root?

@emrah How could I verify that ? Guide please.

I’m not familiar with Docker. Attach the container and run ps aux