make sure ffmpeg process exits

This commit is contained in:
Shiz 2020-05-20 00:20:48 +02:00
parent acfb6a90b8
commit f926b94c99
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import sys, os import sys, os
import atexit
import subprocess import subprocess
import argparse import argparse
@ -64,6 +65,7 @@ graph.fixup()
ffmpeg_args = graph.format() ffmpeg_args = graph.format()
# Launch render process # Launch render process
subprocess.Popen(['ffmpeg'] + ffmpeg_args + args.args) ffmpeg = subprocess.Popen(['ffmpeg'] + ffmpeg_args + args.args)
atexit.register(ffmpeg.kill)
# Launch graph # Launch graph
graph.run() graph.run()