Problem with codecs/ffmpeg?

Hello.

This week I installed jibri in a own server and we had problems that are solved. But today, I installed jibri using the same tutorial but, when I start to record, it would start but 5 seconds later, give me an error.

If I execute sudo arecord -L I see this:

Error codecs

But if I do the same in the other server (that it works) I see more things:

So, I think that need something, but I don’t know what…

And this is the log of ffmpeg:

/var/log/jitsi/jibri/ffmpeg.0.log

2020-12-10 16:38:12.030 INFO: [55] ffmpeg.call() ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
2020-12-10 16:38:12.030 INFO: [55] ffmpeg.call()   built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
2020-12-10 16:38:12.119 INFO: [55] ffmpeg.call()   configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdi$
2020-12-10 16:38:12.120 INFO: [55] ffmpeg.call()   libavutil      55. 78.100 / 55. 78.100
2020-12-10 16:38:12.120 INFO: [55] ffmpeg.call()   libavcodec     57.107.100 / 57.107.100
2020-12-10 16:38:12.120 INFO: [55] ffmpeg.call()   libavformat    57. 83.100 / 57. 83.100
2020-12-10 16:38:12.120 INFO: [55] ffmpeg.call()   libavdevice    57. 10.100 / 57. 10.100
2020-12-10 16:38:12.120 INFO: [55] ffmpeg.call()   libavfilter     6.107.100 /  6.107.100
2020-12-10 16:38:12.121 INFO: [55] ffmpeg.call()   libavresample   3.  7.  0 /  3.  7.  0
2020-12-10 16:38:12.121 INFO: [55] ffmpeg.call()   libswscale      4.  8.100 /  4.  8.100
2020-12-10 16:38:12.121 INFO: [55] ffmpeg.call()   libswresample   2.  9.100 /  2.  9.100
2020-12-10 16:38:12.121 INFO: [55] ffmpeg.call()   libpostproc    54.  7.100 / 54.  7.100
2020-12-10 16:38:12.121 INFO: [55] ffmpeg.call() [x11grab @ 0x56420869cfc0] Stream #0: not enough frames to estimate rate; consider increasing probesize
2020-12-10 16:38:12.121 INFO: [55] ffmpeg.call() Input #0, x11grab, from ':0.0+0,0':
2020-12-10 16:38:12.121 INFO: [55] ffmpeg.call()   Duration: N/A, start: 1607614692.075426, bitrate: N/A
2020-12-10 16:38:12.121 INFO: [55] ffmpeg.call()     Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1280x720, 30 fps, 1000k tbr, 1000k tbn, 1000k tbc
2020-12-10 16:38:12.122 INFO: [55] ffmpeg.call() ALSA lib pcm_direct.c:1605:(_snd_pcm_direct_get_slave_ipc_offset) Invalid value for card
2020-12-10 16:38:12.143 INFO: [55] ffmpeg.call() [alsa @ 0x5642086a7260] cannot open audio device plug:bsnoop (No such device)
2020-12-10 16:38:12.144 INFO: [55] ffmpeg.call() plug:bsnoop: Input/output error

I looked the jibri.conf, the sip-communicator.properties and other files and I think that’s correct…

If need some info, please tell me.

Is there a .asoundrc file in the /home/jibri folder?

Yes, with this

pcm.amix {
  type dmix
  ipc_key 219345
  slave.pcm "hw:Loopback,0,0"
}

pcm.asnoop {
  type dsnoop
  ipc_key 219346
  slave.pcm "hw:Loopback_1,1,0"
}

pcm.aduplex {
  type asym
  playback.pcm "amix"
  capture.pcm "asnoop"
}

pcm.bmix {
  type dmix
  ipc_key 219347
  slave.pcm "hw:Loopback_1,0,0"
}

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

pcm.bduplex {
  type asym
  playback.pcm "bmix"
  capture.pcm "bsnoop"
}

pcm.pjsua {
  type plug
  slave.pcm "bduplex"
}

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

I compared between 2 servers (where works and where fails) and in the two servers the files contains the same information. Permisions the same too (owner/group = root)

Check the snd_aloop module

lsmod | grep aloop

I didn’t check the Ubuntu things but normally no need pulseaudio on a server

It’s empty… I put lsmod | grep aloop and don’t show anything.

grep aloop empty

In the other server (where it works) yes, show me 3 lines.

grep aloop ok

But in the other server (where it fails), no, empty…

What I should do?

First try to load manually as root and restart jibri

modprobe snd-aloop
lsmod | grep aloop

systemctl stop jibri-xorg
systemctl start jibri

Oh yeah, it works and record correctly. Thank you!

To set it permanently

echo "snd_aloop" >>/etc/modules
echo "options snd-aloop enable=1,1,1,1 index=0,1,2,3,4" > /etc/modprobe.d/alsa-loopback.conf
2 Likes