On an Ubuntu 18.04 VM, I can easily reproduce ffmpeg being killed using this script:
import imageio_ffmpeg
import numpy as np
ims = [np.random.uniform(0, 255, size=(1000, 1000, 3)).astype(np.uint8) for i in range(10)]
w = imageio_ffmpeg.write_frames("/home/almar/Desktop/foo.mp4", (1000, 1000), ffmpeg_timeout=0)
w.send(None)
for i in range(200):
w.send(ims[i % 10])
print(i)
w.close()
print("closed")
If we can assume ffmpeg to not hang doing nothing, it would be much better to set the default timeout to zero (i.e. wait until ffmpeg is done). However, we probably want to combine this with proper keyboardinterrupt handling #4.
On an Ubuntu 18.04 VM, I can easily reproduce ffmpeg being killed using this script:
If we can assume ffmpeg to not hang doing nothing, it would be much better to set the default timeout to zero (i.e. wait until ffmpeg is done). However, we probably want to combine this with proper keyboardinterrupt handling #4.