Remove ffmpeg_subprocess_test.py (already implemented as FFmpegOutput)

pull/357/head
nyanpasu64 2018-07-29 02:21:40 -07:00
rodzic 86d6252f34
commit bdacafc33a
1 zmienionych plików z 0 dodań i 31 usunięć

Wyświetl plik

@ -1,31 +0,0 @@
import glob
import shlex
import subprocess
templates = ['ffplay -autoexit -f image2pipe -framerate 60 -i -']
args = [arg
for template in templates
for arg in shlex.split(template)]
popen = subprocess.Popen(args, stdin=subprocess.PIPE)
stream = popen.stdin
imgs = glob.glob('images/*.png')
imgs.sort()
for img in imgs * 100:
with open(img, 'rb') as f:
stream.write(f.read()) # FIXME https://docs.python.org/3/library/subprocess.html#subprocess.Popen.stdin
# Warning: Use communicate() rather than .stdin.write, .stdout.read or .stderr.read
# to avoid deadlocks due to any of the other OS pipe buffers filling up and blocking
# the child process.
# communicate(): Interact with process: Send data to stdin. Read data from stdout and
# stderr, until end-of-file is reached.
# nope instant reject
# https://stackoverflow.com/questions/9886654/difference-between-communicate-and-stdin-write-stdout-read-or-stderr-read
stream.close()
popen.wait()