Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ffmpeg osx error while writing file : "Unrecognized option 'preset'.Error splitting the argument list: Option not found

I have the following simple Python Code:

yellow_output = 'test_videos_output/solidYellowleft.mp4'
clip1 = VideoFileClip("test_videos/solidYellowLeft.mp4")
yellow_clip = clip1.fl_image(process_image)
yellow_clip.write_videofile(yellow_output, audio=False)

The "process_image" function just returns what you give it (created for testing purposes).

Running Python 3.5.4, ffmpeg 2.8.6, on OSX 10.11.6

I get the error:

OSError: [Errno 32] Broken pipe

MoviePy error: FFMPEG encountered the following error while writing file test_videos_output/solidWwhiteright.mp4:

 b"Unrecognized option 'preset'.\nError splitting the argument list: Option not found\n"

the video file is not generated; how to get rid of this error; so I can generate the MP4 file?

Note: the same code runs happily on Ubuntu 16.04

like image 309
asabbah Avatar asked Jan 29 '23 18:01

asabbah


2 Answers

Probably the same problem mentioned here: https://github.com/Zulko/moviepy/issues/657

Try the following from this comment: https://github.com/Zulko/moviepy/issues/657#issuecomment-355858936

conda install -c conda-forge ffmpeg

like image 93
Business Tomcat Avatar answered Jan 31 '23 07:01

Business Tomcat


For me

conda install -c conda-forge ffmpeg

which installed pytorch::ffmpeg-4.3-hf484d3e_0

specifically didn't work.

However simply doing

conda update ffmpeg

which installed pkgs/main::ffmpeg-4.2.2-h20bf706_0

solved this problem for me.

like image 24
patapouf_ai Avatar answered Jan 31 '23 07:01

patapouf_ai