Jibri recording working bad

hello
i have installed jitsi and jibri in 2 different servers. The environment works because i am able to record. But i have these strange behavors

-sometimes the recording generates a bad mp4 which is malformed and not possible to run

-sometimes the recording stops after 40-50 seconds by itself

all goes fine, instead, if i start recording immediately after restarted jibri and the recording takes only 10 or 20 seconds.

can anyone help?
Massimo

The logs in /var/log/jitsi/jibri/ on the Jibri machine can be a good start. Look for anything strange there.