I can’t help in solving the problem but I’d be very interested in the solution too. I can confirm that with 2 jibri running I can record OR stream 2 different rooms at the same time, but I cannot stream AND record the same room.
I just run this test: 1. started recording. 2 Stop recording 3. Copy from the log the ffmpeg command 4. start streaming 5. run a second ffmpeg instance while the other still runnig and got this error message:
root@jibriunione:/home/stefanormc# 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:cloop -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 /tmp/recordings/nfnknfvbohflxdzy/integralconstraintspledgenewly_contemp.mp4
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright © 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
[x11grab @ 0x55c4c7972420] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ‘:0.0+0,0’:
Duration: N/A, start: 1587568942.789634, bitrate: N/A
Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1280x720, 30 fps, 1000k tbr, 1000k tbn, 1000k tbc
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cloop
[alsa @ 0x55c4c797c460] cannot open audio device plug:cloop (No such file or directory)
plug:cloop: Input/output error
The problem seems to be the lack of a second ALSA loop. Can this be solved adding a second one? and if yes, how?
cheers
since i have 2 separate jibris on 2 separate VMs this shouldn’t be an issue right?
wouldn’t it be easier to simply use ffmpeg option to have multiple outputs at the same time?
I have no experience with jitsi but some with ffmpeg and it shouldn’t be much of an issue to do so.
Where can I edit the command Jibri runs? (it could also be useful to change the 30fps setting that is rather useless in europe’s 25 fps tv environment)
How are you running the 2 Jibris? On totally separate machines?
yes.
both register on jicofo as well
both jibris have 4 CPUs & 16GB Ram
So you joined call 1, started a live stream (looks like). Then, in a completely different call, you tried to start another live stream or start a recording and got the “All recorders are busy”?
Nope, i joined a call on meeting one, started livestream + also want to record the same meeting locally. Is that scenario possible?
Ah, that’s not supported.
where are settings for ffmpeg set when recording or streaming? in some other post you listed this link but it doesn’t seem to lead anywhere. thanks
Thanks.
Can you also point me in the right direction to find where is the call to ffmpeg made when you hit ‘start streaming’ please? Can that be modified?
thanks
There’s a generic JibriSubprocess
wrapper we use, but this is there we take the command we get from the code above, and pass it to JibriSubprocess
to launch.
what do you intend to modify it to & for what purpose? can you please share?
Ffmpeg can have multiple outputs from a single encoding, so simplest way to achieve recording and streaming at the same time is to output both to file and YouTube.
Unfortunately I am not good at all at programming so I didn’t get very far…
Thanks
I achieved it with the NGINX RTMP server, where I can not only stream multiple targets but also record
Hi Masteryoda,
has this been resolved? When I tried to do the same thing, I realised I had to change user and recorder on the second instance to jibri2 and recorder2 and register these accounts on prosodyctl in addition to having registered jibri and recorder first time round when I configured jibri. That plus the additional nickname then meant the second jibri authenticated and made itself available on jitsi-prosody.
I would also love to explore your nginx rmtp server setup. Will explore that some time during the summer.
Norbert
as per jibri documentation, you dont need to change the user and recorder in the 2nd instance. just make sure you use a new nickname. so its strange that you need to do this.
the NGINX RTMP setup is dead simple to do. wont take more than 30 minutes from scratch to complete. good luck though.
Thanks. Will try in the docker setup, when I get round to it. Will also look at the streaming solution.
Norbert