Browse Source

make sure ffmpeg process exits

master
Shiz 1 year ago
parent
commit
f926b94c99
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/overlay/__main__.py

+ 3
- 1
src/overlay/__main__.py View File

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

Loading…
Cancel
Save