Jitst fails to record on raspberrypi with chromium

Hi dear all,
I am trying to make Jitsi running with Jibri to record the meeting on a Raspberrypi III.
No problem with Jitsi itself but I am not able to record the session.

Some details. On the RPIII I do not have Chrome, I didn’t find a recent port therefore I have chromium.

When I I start a session and press the record button I got this error from the file /var/log/jitsi/jibri/log.0.txt

apabilities {acceptInsecureCerts: false, acceptSslCerts: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 104.0.5112.79 (3cf3e8c8a07d..., userDataDir: /tmp/.org.chromium.Chromium...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress
: localhost:41661}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), rotatable: false, setWindowRect
: true, strictFileInteractability: false, takesHeapSnapshot: true, takesScreenshot: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unexpectedAlertBehaviour: ignore, unhandledPromptBehavior: ignore, version: 104.0.5112.79, webStorageEnabled: true, webauthn:extension:credBlob: true, webauthn:extens
ion:largeBlob: true, webauthn:virtualAuthenticators: true}                                                                                                                                                                                                                                                                
Session ID: 20fee4047a5aad92d151bfbb9bc0bfab                                                                                                                 
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)                                                                                                                                                                                                                       
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)                                                                                                                                                                                                
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)                                                                                                                                                                                        
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)                                                                         
        at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)                                                                    
        at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)                                                              
        at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)                                             
        at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)                                               
        at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)                                               
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)                                                              
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)                                                                                                                                                                                                                
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)                                                                      
        at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:480)                                                                
        at org.jitsi.jibri.selenium.pageobjects.CallPage.leave(CallPage.kt:333)                                                                              
        at org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser(JibriSelenium.kt:358)                                                              
        at org.jitsi.jibri.service.impl.FileRecordingJibriService.stop(FileRecordingJibriService.kt:197)                                                                                                                                                                                                                  
        at org.jitsi.jibri.JibriManager.stopService(JibriManager.kt:263)                                                                                                                                                                                                                                                  
        at org.jitsi.jibri.api.xmpp.XmppApi.handleStopJibriIq(XmppApi.kt:350)                                                                                                                                                                                                                                             
        at org.jitsi.jibri.api.xmpp.XmppApi.handleJibriIq(XmppApi.kt:244)                                                                                    
        at org.jitsi.jibri.api.xmpp.XmppApi.handleIq(XmppApi.kt:225)                                                                                         
        at org.jitsi.xmpp.mucclient.MucClient.handleIq(MucClient.java:542)                                                                                   
        at org.jitsi.xmpp.mucclient.MucClient$3.handleIQRequest(MucClient.java:505)                                                                          
        at org.jivesoftware.smack.AbstractXMPPConnection$3.run(AbstractXMPPConnection.java:1565)                                  
        at org.jivesoftware.smack.AbstractXMPPConnection$10.run(AbstractXMPPConnection.java:2143)                                                            
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)                                     
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)                                                         
        at java.base/java.lang.Thread.run(Thread.java:829)                                                                                                   
2022-10-29 15:34:29.816 INFO: [47] [session_id=fkgfczollonpsmsn] JibriSelenium.leaveCallAndQuitBrowser#363: Quitting chrome driver                           
2022-10-29 15:34:30.065 INFO: [47] [session_id=fkgfczollonpsmsn] JibriSelenium.leaveCallAndQuitBrowser#365: Chrome driver quit                               
2022-10-29 15:34:30.071 INFO: [47] JibriStatusManager$special$$inlined$observable$1.afterChange#72: Busy status has changed: BUSY -> IDLE
2022-10-29 15:34:30.073 FINE: [47] WebhookClient$updateStatus$1.invokeSuspend#109: Updating 0 subscribers of status                                          
2022-10-29 15:34:30.074 INFO: [47] XmppApi.updatePresence#209: Jibri reports its status is now JibriStatus(busyStatus=IDLE, health=OverallHealth(healthStatus=HEALTHY, details={})), publishing presence to connections
2022-10-29 15:34:34.246 FINE: [19] [session_id=fkgfczollonpsmsn] ProcessStatePublisher$startProcessAliveChecks$1.invoke#86: Process ffmpeg hasn't written in 2 seconds, publishing periodic update
2022-10-29 15:34:34.251 INFO: [62] [session_id=fkgfczollonpsmsn] FfmpegCapturer.onFfmpegProcessUpdate#125: Ffmpeg quit abruptly.  Last output line: /tmp/tests/fkgfczollonpsmsn/meaningfulenterprisesperceiveelsewhere_2022-10-29-15-34-15.mp4: No such file or directory
2022-10-29 15:34:34.292 INFO: [62] [session_id=fkgfczollonpsmsn] FfmpegCapturer.onFfmpegStateMachineStateChange#134: Ffmpeg capturer transitioning from state Starting up to Error: QuitUnexpectedly SESSION /tmp/tests/fkgfczollonpsmsn/meaningfulenterprisesperceiveelsewhere_2022-10-29-15-34-15.mp4: No such file or d
irectory                                                                                                                                                     
2022-10-29 15:34:34.295 INFO: [62] [session_id=fkgfczollonpsmsn] StatefulJibriService.onServiceStateChange#39: File recording service transitioning from state Starting up to Error: QuitUnexpectedly SESSION /tmp/tests/fkgfczollonpsmsn/meaningfulenterprisesperceiveelsewhere_2022-10-29-15-34-15.mp4: No such file or 
directory                                                                                                                                                    
2022-10-29 15:34:34.299 INFO: [62] XmppApi$createServiceStatusHandler$1.invoke#317: Current service had an error Error: QuitUnexpectedly SESSION /tmp/tests/fkgfczollonpsmsn/meaningfulenterprisesperceiveelsewhere_2022-10-29-15-34-15.mp4: No such file or directory, sending error iq <iq xmlns='jabber:client' to='jib
ribrewery@internal.auth.translation.home.local/focus' id='XDF2K-11' type='set'><jibri xmlns='http://jitsi.org/protocol/jibri' status='off' failure_reason='error' should_retry='true'/></iq>
2022-10-29 15:34:34.302 INFO: [62] JibriManager.stopService#256: No service active, ignoring stop                                                            
2022-10-29 15:34:36.243 FINE: [19] [session_id=fkgfczollonpsmsn] ProcessStatePublisher$startProcessAliveChecks$1.invoke#86: Process ffmpeg hasn't written in 2 seconds, publishing periodic update
2022-10-29 15:34:36.245 INFO: [62] [session_id=fkgfczollonpsmsn] FfmpegCapturer.onFfmpegProcessUpdate#125: Ffmpeg quit abruptly.  Last output line: /tmp/tests/fkgfczollonpsmsn/meaningfulenterprisesperceiveelsewhere_2022-10-29-15-34-15.mp4: No such file or directory

In the ffmpeg.0.txt
I see a similar error

2022-10-29 15:34:30.446 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
2022-10-29 15:34:30.447 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
2022-10-29 15:34:30.639 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --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-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
2022-10-29 15:34:30.640 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libavutil      56. 70.100 / 56. 70.100
2022-10-29 15:34:30.640 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libavcodec     58.134.100 / 58.134.100
2022-10-29 15:34:30.640 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libavformat    58. 76.100 / 58. 76.100
2022-10-29 15:34:30.641 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libavdevice    58. 13.100 / 58. 13.100
2022-10-29 15:34:30.641 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libavfilter     7.110.100 /  7.110.100
2022-10-29 15:34:30.641 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libswscale      5.  9.100 /  5.  9.100
2022-10-29 15:34:30.642 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libswresample   3.  9.100 /  3.  9.100
2022-10-29 15:34:30.642 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libpostproc    55.  9.100 / 55.  9.100
2022-10-29 15:34:30.644 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: [x11grab @ 0xaaaaf4792960] Stream #0: not enough frames to estimate rate; consider increasing probesize
2022-10-29 15:34:30.644 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Input #0, x11grab, from ':0.0+0,0':
2022-10-29 15:34:30.644 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   Duration: N/A, start: 1667050470.461768, bitrate: 1990656 kb/s
2022-10-29 15:34:30.645 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 1990656 kb/s, 30 fps, 1000k tbr, 1000k tbn, 1000k tbc
2022-10-29 15:34:30.646 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Guessed Channel Layout for Input Stream #1.0 : stereo
2022-10-29 15:34:30.646 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Input #1, alsa, from 'plug:bsnoop':
2022-10-29 15:34:30.647 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   Duration: N/A, start: 1667050470.616897, bitrate: 1536 kb/s
2022-10-29 15:34:30.647 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
2022-10-29 15:34:30.647 INFO: [63] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: /tmp/tests/fkgfczollonpsmsn/meaningfulenterprisesperceiveelsewhere_2022-10-29-15-34-15.mp4: No such file or directory

My current Jibri config run like:

  recording {                                                                  
    recordings-directory = "/tmp/tests/"                                       
    # TODO: make this an optional param and remove the default                 
    finalize-script = "/root/bin/finalize_recording"                           
  }                                                                            
  streaming {                                                                  
    // A list of regex patterns for allowed RTMP URLs.  The RTMP URL used      
    // when starting a stream must match at least one of the patterns in       
    // this list.                                                              
    rtmp-allow-list = [                                                        
      // By default, all services are allowed                                  
      ".*"                                                                     
    ]                                                                          
  }                                                                            
  sip {                                                                        
    // The routing rule for the outbound scenario in VoxImplant is based on thi
s prefix                                                                       
    outbound-prefix = "out_"                                                   
  }                                                                            
  ffmpeg {                                                                     
    resolution = "1920x1080"                                                   
    framerate = 30                                                             
    // Encoding speed to compression ratio (slower preset -> better compression
)                                                                              
    // Available presets: ultrafast, superfast, veryfast, faster, fast, medium,
    // slow, slower, veryslow, placebo                                         
    video-encode-preset = "veryfast"                                           
    queue-size = 4096                                                          
    streaming-max-bitrate = 2976                                               
    // The range of the CRF scale is 0-51, where 0 is lossless,                
    // 23 is the default, and 51 is worst quality possible. A lower value      
    // generally leads to higher quality, and a subjectively sane range is     
    // 17-28. Consider 17 or 18 to be visually lossless or nearly so;          
    // it should look the same or nearly the same as the input but it          
    // isn't technically lossless.                                             
    // https://trac.ffmpeg.org/wiki/Encode/H.264#crf                           
    h264-constant-rate-factor = 25                                             
    // 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"                                               
  }                                                                            
  chrome {                                                                     
    // The flags which will be passed to chromium when launching               
    flags = [                                                                  
        "--disable-dev-shm-usage",                                             
        "--no-sandbox"                                                         
        "--use-fake-ui-for-media-stream",                                      
        "--start-maximized",                                                   
        "--kiosk",                                                             
        "--enabled",                                                           
        "--disable-infobars",                                                  
        "--autoplay-policy=no-user-gesture-required"                           
        "--ignore-certificate-errors"                                          

Any hints on how to make it running?
Thanks,
Alessandro

Does the folder /tmp/tests exist?

Yes, it does.

I don’t think a RPi3 has enough resources to work as a jibri node nor CPU or RAM to deal with Full HD, (1920x1080) as playing FHD is not the same load as encoding.
Could it be it’s failing because of resource starvation, thus the file don’t get created in the first place.

Maybe a RPi 4 with 4 GB or higher can keep up.
Have not tried yet, but it can be a great experiment.

I do not think it is a performance problem. The RPi 4 is doing well and moreover I am doing on Audio meeting with just 1 connection for the test.

I am thinking more to some misconfiguration in Jibri, but I am not yet capable of spotting it.

Make sure the jibri system user has permissions to write in that folder.
But for sure the pi will not be able to handle the recording of 1080p, it may still struggle even with 720p

Hi,
There is a huge performance deference between the pi 3 and the pi 4.
A Pi 3 is really limited, in my last test I was unable to run smoothly a simple conference with 2 users (audio and video). So if you add the jibri logic (h264 recorder) I don’t think it could work.

Regards.

I wans’t able to make jibri, though I am not sure it was a resource problem or something else.
I was able to record the voice of the speaker using the raspberrypi using the tool parecord.

Still need to finalize all.