After changing the version of ffmpeg from 6 to 4 the issue didn't happen again, however i'm not totally sure if that is the problem