def _terminate_ffmpeg(self):
proc = self._current_proc
if not proc:
return
_logger.info('Terminating ffmpeg...')
try:
proc.terminate()
proc.wait(5)
except (OSError, subprocess.SubprocessError):
_logger.exception('Terminate ffmpeg')
try:
proc.kill()
except (OSError, subprocess.SubprocessError):
pass
self._current_proc = None
评论列表
文章目录