ffmpeg closes with return code 137

2019-05-07 07:18发布

问题:

I am using ffmpeg to convert videos and about 66% of the times doesn't do it's job until the end. It simply gets killed, closes before it ends the job, and returns "137" instead of "0".

I can't seem to find anywhere some information about this return code. Does anyone know some tips or where can I find further guidance? Thanks

回答1:

137 (128 + 9) means it's been killed with signal 9 (SIGKILL). This usually means that something sent ffmpeg this signal, not that the program crashed on its own.

Could it be that there is some process watching for long-running ffmpeg and killing them?

Another possibility is that your ffmpeg process oversteps it's ulimit quotas and it gets killed by the system (although I'm not sure if it would get killed with SIGKILL and not SIGABRT in that case). Run the command ulimit -a and check for suspiciously low quotas.