Hi,
I have correctly configured Jibri but the recording is unable to start due to plug:bsnoop: Input/output error.
Exact error from jibri is below:
stractPageObject.visit#38: Waited 477ms for driver to load page
2022-04-25 18:17:33.830 FINE: [66] CallPage$visit$$inlined$measureTimedValue$lambda$1.apply#58: Not joined yet: Cannot read properties of undefined (reading 'isJoined')
2022-04-25 18:17:34.337 FINE: [66] CallPage$visit$$inlined$measureTimedValue$lambda$1.apply#58: Not joined yet: Cannot read properties of undefined (reading 'isJoined')
2022-04-25 18:17:34.901 INFO: [66] CallPage.visit#71: Waited 1.10s to join the conference
2022-04-25 18:17:34.904 INFO: [66] [session_id=evyoxpmpfzvctcct] EmptyCallStatusCheck.<init>#26: Starting empty call check with a timeout of PT45S
2022-04-25 18:17:34.923 INFO: [66] [session_id=evyoxpmpfzvctcct] JibriSelenium.onSeleniumStateChange#215: Transitioning from state Starting up to Running
2022-04-25 18:17:34.924 INFO: [66] [session_id=evyoxpmpfzvctcct] FileRecordingJibriService$start$1.invoke#168: Selenium joined the call, starting the capturer
2022-04-25 18:17:34.953 INFO: [66] [session_id=evyoxpmpfzvctcct] JibriSubprocess.launch#42: Starting ffmpeg with command ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1920x1080 -thread_queue_size 4096 -i :0.0+0,0 -f alsa -thread_queue_size 4096 -i plug:bsnoop -acodec aac -strict -2 -ar 44100 -b:a 128k -af aresample=async=1 -c:v libx264 -preset veryfast -profile:v main -level 3.1 -pix_fmt yuv420p -r 30 -crf 25 -g 60 -tune zerolatency -f mp4 /mnt/efs/recordings/evyoxpmpfzvctcct/0e7a03458bbb4b85a7099004d904a05bwebxteam_2022-04-25-18-17-32.mp4 ([ffmpeg, -y, -v, info, -f, x11grab, -draw_mouse, 0, -r, 30, -s, 1920x1080, -thread_queue_size, 4096, -i, :0.0+0,0, -f, alsa, -thread_queue_size, 4096, -i, plug:bsnoop, -acodec, aac, -strict, -2, -ar, 44100, -b:a, 128k, -af, aresample=async=1, -c:v, libx264, -preset, veryfast, -profile:v, main, -level, 3.1, -pix_fmt, yuv420p, -r, 30, -crf, 25, -g, 60, -tune, zerolatency, -f, mp4, /mnt/efs/recordings/evyoxpmpfzvctcct/0e7a03458bbb4b85a7099004d904a05bwebxteam_2022-04-25-18-17-32.mp4])
2022-04-25 18:17:35.308 FINE: [71] HttpApi$apiModule$2$1$1.invokeSuspend#84: Got health request
2022-04-25 18:17:35.309 FINE: [71] HttpApi$apiModule$2$1$1.invokeSuspend#86: Returning health JibriHealth(status=JibriStatus(busyStatus=BUSY, health=OverallHealth(healthStatus=HEALTHY, details={})), environmentContext=EnvironmentContext(name=<DOMAIN_NAME))
2022-04-25 18:17:39.959 FINE: [20] [session_id=evyoxpmpfzvctcct] ProcessStatePublisher$startProcessAliveChecks$1.invoke#86: Process ffmpeg hasn't written in 2 seconds, publishing periodic update
2022-04-25 18:17:39.960 INFO: [69] [session_id=evyoxpmpfzvctcct] FfmpegCapturer.onFfmpegProcessUpdate#121: Ffmpeg quit abruptly. Last output line: plug:bsnoop: Input/output error
2022-04-25 18:17:39.961 INFO: [69] [session_id=evyoxpmpfzvctcct] FfmpegCapturer.onFfmpegStateMachineStateChange#130: Ffmpeg capturer transitioning from state Starting up to Error: QuitUnexpectedly SESSION plug:bsnoop: Input/output error
2022-04-25 18:17:39.961 INFO: [69] [session_id=evyoxpmpfzvctcct] StatefulJibriService.onServiceStateChange#39: File recording service transitioning from state Starting up to Error: QuitUnexpectedly SESSION plug:bsnoop: Input/output error
2022-04-25 18:17:39.962 INFO: [69] XmppApi$createServiceStatusHandler$1.invoke#311: Current service had an error Error: QuitUnexpectedly SESSION plug:bsnoop: Input/output error, sending error iq <iq xmlns='jabber:client' to='jibribrewery@internal.auth.<DOMAIN>/focus' id='4XNR5-8' type='set'><jibri xmlns='http://jitsi.org/protocol/jibri' status='off' failure_reason='error' should_retry='true'/></iq>
2022-04-25 18:17:39.963 FINE: [69] JibriStatsDClient.incrementCounter#38: Incrementing statsd counter: stop:recording
2022-04-25 18:17:39.963 INFO: [69] JibriManager.stopService#260: Stopping the current service
2022-04-25 18:17:39.963 INFO: [69] [session_id=evyoxpmpfzvctcct] FileRecordingJibriService.stop#182: Stopping capturer
2022-04-25 18:17:39.963 INFO: [69] [session_id=evyoxpmpfzvctcct] JibriSubprocess.stop#75: Stopping ffmpeg process
2022-04-25 18:17:39.965 INFO: [69] [session_id=evyoxpmpfzvctcct] JibriSubprocess.stop#89: ffmpeg exited with value 1
2022-04-25 18:17:39.965 INFO: [69] [session_id=evyoxpmpfzvctcct] FileRecordingJibriService.stop#184: Quitting selenium
2022-04-25 18:17:39.968 INFO: [69] [session_id=evyoxpmpfzvctcct] FileRecordingJibriService.stop#191: No media was recorded, deleting directory and skipping metadata file & finalize
Output of commands:
aplay -l
`
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
`
cat /home/jibri/.asoundrc
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"
}
jibr.conf regarding audio config:
ffmpeg {
resolution = "1920x1080"
// The audio source that will be used to capture audio on Linux
audio-source = "alsa"
// The audio device that will be used to capture audio on Linux
audio-device = "plug:bsnoop"
}
FFMPEG logs:
2022-04-25 18:17:35.055 INFO: [70] LoggingUtils$Companion$OutputLogger$1$1.call#42: [x11grab @ 0x556de0862e40] Stream #0: not enough frames to estimate rate; consider increasing probesize
2022-04-25 18:17:35.055 INFO: [70] LoggingUtils$Companion$OutputLogger$1$1.call#42: Input #0, x11grab, from ':0.0+0,0':
2022-04-25 18:17:35.055 INFO: [70] LoggingUtils$Companion$OutputLogger$1$1.call#42: Duration: N/A, start: 1650910655.034374, bitrate: N/A
2022-04-25 18:17:35.055 INFO: [70] LoggingUtils$Companion$OutputLogger$1$1.call#42: Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 30 fps, 1000k tbr, 1000k tbn, 1000k tbc
2022-04-25 18:17:35.055 INFO: [70] LoggingUtils$Companion$OutputLogger$1$1.call#42: ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
2022-04-25 18:17:35.056 INFO: [70] LoggingUtils$Companion$OutputLogger$1$1.call#42: [alsa @ 0x556de086e4c0] cannot open audio device plug:bsnoop (Device or resource busy)
2022-04-25 18:17:35.056 INFO: [70] LoggingUtils$Companion$OutputLogger$1$1.call#42: plug:bsnoop: Input/output error
For the things to be even more strange, we are using same AMI on AWS for other environments and it works! It doesn’t work only on this one particular environment.
We have tried to change instance_type, re-deploy instance, update kernel, update jibri , ffmpeg is already the latest version, but nothing helps.
The only thing that resolved this was to change audio config in jitsi.conf as below:
ffmpeg {
resolution = "1920x1080"
// The audio source that will be used to capture audio on Linux
audio-source = "alsa"
// The audio device that will be used to capture audio on Linux
audio-device = "plug:dsnoop"
}
So basically to change from bsnoop => dsnoop
Current jibri version:
dpkg -l | grep jibri
ii jibri 8.0-121-g27323fe-1 all Jibri
Does anyone have idea what could be wrong ?
Regards,
Srdjan I.