[FFmpeg-user] ffmpeg sometimes does not properly close the file

rbfmpg29 at t-online.de rbfmpg29 at t-online.de
Tue Mar 20 17:16:53 EET 2018

I do a screencast with ffmpeg. The call looks like
ffmpeg -f x11grab -video_size 800x600 -framerate 25 -i :2 -c:v libx264 
-pix_fmt yuv420p -preset ultrafast test.mp4
The screencast is stopped by a SIGTERM (15) signal to the
ffmpeg process. In most cases, this works fine.
Occasionally, the ffmpeg process does not properly write
the trailer to the file. Then the file is unusable.
The exit code for the error case is 11.
The exit code for the healthy case is 65280.
I have the following questions:
1. Does anyone know these exit codes, and in
    particular, does this give us a hint, what is
    going wrong?
2, Is something wrong with the call?
3. Is it possible to repair the file? I corrupted a
    file by cutting off some kilobytes from a healthy
    mp4 file and tried to repair it with ffmpeg  copy.
    However, I get an error about an unprocessable

More information about the ffmpeg-user mailing list