Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.66k stars 1.59k forks source link

'ValueError: I/O operation on closed file' #23

Closed alexvodovoz closed 10 years ago

alexvodovoz commented 10 years ago

I am seeing 'ValueError: I/O operation on closed file' in the latest build of the master branch. I had to go back to using this commit to get things working again: https://github.com/Zulko/moviepy/commit/954516a4e6b5a954faee4c392e0a303e58d68837

I get the i/o error by running: VideoFileClip(file_path).subclip(start, end).to_gif(gif_temp_path, fps=fps, fuzz=2)

This is the error output: File "/Users/alexandervodovoz/.virtualenvs/hampton/lib/python2.7/site-packages/moviepy-0.2.1.7.09-py2.7.egg/moviepy/video/VideoClip.py", line 116, in save_frame ffmpeg_write_image(filename, im) File "/Users/alexandervodovoz/.virtualenvs/hampton/lib/python2.7/site-packages/moviepy-0.2.1.7.09-py2.7.egg/moviepy/video/io/ffmpeg_writer.py", line 122, in ffmpeg_write_image proc.communicate() # proc.wait() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 806, in communicate return self._communicate(input) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1377, in _communicate self.stdin.flush() ValueError: I/O operation on closed file

Zulko commented 10 years ago

Hey ! I think this issue is solved in the new versions. Could you give it a try with the one on Github ?

Zulko commented 10 years ago

Hey @alexvodovoz can I close this issue now ?