MoviePy error: FFMPEG encountered the following error while writing file
the full stack trace here:
[MoviePy] >>>> Building video test_output.mp4
[MoviePy] Writing video test_output.mp4
---------------------------------------------------------------------------
BrokenPipeError Traceback (most recent call last)
~/anaconda3/lib/python3.6/site-packages/moviepy/video/io/ffmpeg_writer.py in write_frame(self, img_array)
133 if PY3:
--> 134 self.proc.stdin.write(img_array.tobytes())
135 else:
BrokenPipeError: [Errno 32] Broken pipe
During handling of the above exception, another exception occurred:
OSError Traceback (most recent call last)
<timed eval> in <module>()
<decorator-gen-175> in write_videofile(self, filename, fps, codec, bitrate, audio, audio_fps, preset, audio_nbytes, audio_codec, audio_bitrate, audio_bufsize, temp_audiofile, rewrite_audio, remove_temp, write_logfile, verbose, threads, ffmpeg_params, progress_bar)
~/anaconda3/lib/python3.6/site-packages/moviepy/decorators.py in requires_duration(f, clip, *a, **k)
52 raise ValueError("Attribute 'duration' not set")
53 else:
---> 54 return f(clip, *a, **k)
55
56
<decorator-gen-174> in write_videofile(self, filename, fps, codec, bitrate, audio, audio_fps, preset, audio_nbytes, audio_codec, audio_bitrate, audio_bufsize, temp_audiofile, rewrite_audio, remove_temp, write_logfile, verbose, threads, ffmpeg_params, progress_bar)
~/anaconda3/lib/python3.6/site-packages/moviepy/decorators.py in use_clip_fps_by_default(f, clip, *a, **k)
135 for (k,v) in k.items()}
136
--> 137 return f(clip, *new_a, **new_kw)
<decorator-gen-173> in write_videofile(self, filename, fps, codec, bitrate, audio, audio_fps, preset, audio_nbytes, audio_codec, audio_bitrate, audio_bufsize, temp_audiofile, rewrite_audio, remove_temp, write_logfile, verbose, threads, ffmpeg_params, progress_bar)
~/anaconda3/lib/python3.6/site-packages/moviepy/decorators.py in convert_masks_to_RGB(f, clip, *a, **k)
20 if clip.ismask:
21 clip = clip.to_RGB()
---> 22 return f(clip, *a, **k)
23
24 @decorator.decorator
~/anaconda3/lib/python3.6/site-packages/moviepy/video/VideoClip.py in write_videofile(self, filename, fps, codec, bitrate, audio, audio_fps, preset, audio_nbytes, audio_codec, audio_bitrate, audio_bufsize, temp_audiofile, rewrite_audio, remove_temp, write_logfile, verbose, threads, ffmpeg_params, progress_bar)
347 verbose=verbose, threads=threads,
348 ffmpeg_params=ffmpeg_params,
--> 349 progress_bar=progress_bar)
350
351 if remove_temp and make_audio:
~/anaconda3/lib/python3.6/site-packages/moviepy/video/io/ffmpeg_writer.py in ffmpeg_write_video(clip, filename, fps, codec, bitrate, preset, withmask, write_logfile, audiofile, verbose, threads, ffmpeg_params, progress_bar)
214 frame = np.dstack([frame,mask])
215
--> 216 writer.write_frame(frame)
217
218 writer.close()
~/anaconda3/lib/python3.6/site-packages/moviepy/video/io/ffmpeg_writer.py in write_frame(self, img_array)
176
177
--> 178 raise IOError(error)
179
180 def close(self):
OSError: [Errno 32] Broken pipe
MoviePy error: FFMPEG encountered the following error while writing file test_output.mp4:
b"Unrecognized option 'preset'.\nError splitting the argument list: Option not found\n"
ffmpeg version:
localhost:~ Keen$ ffmpeg
ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
built with clang version 4.0.1 (tags/RELEASE_401/final)
configuration: --prefix=/Users/keen/anaconda3 --disable-doc --enable-shared --extra-cflags='-fPIC -I/Users/keen/anaconda3/include' --extra-cxxflags='=-fPIC' --extra-libs='-L/Users/keen/anaconda3/lib -lz' --enable-pic --disable-static --disable-gpl --disable-nonfree --disable-openssl --enable-libvpx --cc=x86_64-apple-darwin13.4.0-clang --cxx=x86_64-apple-darwin13.4.0-clang++ --enable-libopus
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
OS info:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ProductBuildVersion</key>
<string>17C205</string>
<key>ProductCopyright</key>
<string>1983-2018 Apple Inc.</string>
<key>ProductName</key>
<string>Mac OS X</string>
<key>ProductUserVisibleVersion</key>
<string>10.13.2</string>
<key>ProductVersion</key>
<string>10.13.2</string>
</dict>
</plist>
python version:
Python 3.6.3 |Anaconda custom (x86_64)| (default, Oct 6 2017, 12:04:38)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Hi, I check out this project, install some dependencies and run
test.ipynb
. But, when I run to this:An error occurred:
the full stack trace here:
ffmpeg
version:OS info:
python version:
python dependencies:
source code at here
Any one who can help me?