imageio / imageio-ffmpeg

FFMPEG wrapper for Python
BSD 2-Clause "Simplified" License
225 stars 50 forks source link

Add 'ffmpeg_timeout' flag to write_frames #14

Closed djhoese closed 5 years ago

djhoese commented 5 years ago

Possible solution/workaround for #13. This PR adds the 'ffmpeg_timeout' keyword argument to write_frames so the user can ask for imageio to wait longer for ffmpeg to finish. This is especially important when writing larger frames where ffmpeg may need more time.

djhoese commented 5 years ago

Could invoke checkformat's output be any less helpful? I suppose it could leave out what file is the problem. Took me forever as someone not familiar with invoke to realize it was running black and that there was a autoformat task that I could have run (invoke autoformat).

almarklein commented 5 years ago

This looks like a great workaround. I will have also have a try at the solution using smaller buffers, but this PR is worthwhile nonetheless. I shall also have a look at making the invoke checks more informative :)

almarklein commented 5 years ago

Thanks @djhoese for this fix, and everyone else who chimed in to help fix this!

almarklein commented 5 years ago

I made some further tweaks in #15. In short: changing bufsize did not affect the wait time, so I increased the default ffmpeg_timeout to 20s.