osx - Jupyter notebook Conda error running MoviePy code -
on macos v 10.11.6, got error running moviepy on jupyter notebook python v 3.5.2 conda v 4.3.8 jupyter 4.2.1
i'm importing , running simple cell:
from moviepy.editor import videofileclip ipython.display import html new_clip_output = 'test_output.mp4' test_clip = videofileclip("test.mp4") new_clip = test_clip.fl_image(lambda x: cv2.cvtcolor(x, cv2.color_rgb2yuv)) #note: function expects color images!! %time new_clip.write_videofile(new_clip_output, audio=false)
the error is:
typeerror traceback (most recent call last) <ipython-input-8-27aee53c99d8> in <module>() 1 new_clip_output = 'test_output.mp4' --> 2 test_clip = videofileclip("test.mp4") 3 new_clip = test_clip.fl_image(lambda x: cv2.cvtcolor(x, cv2.color_rgb2yuv)) #note: function expects color images!! 4 get_ipython().magic('time new_clip.write_videofile(new_clip_output, audio=false)') /users/<username>/anaconda3/envs/carnd-term1/lib/python3.5/site-packages/moviepy/video/io/videofileclip.py in __init__(self, filename, has_mask, audio, audio_buffersize, audio_fps, audio_nbytes, verbose) 80 buffersize= audio_buffersize, 81 fps = audio_fps, --> 82 nbytes = audio_nbytes) 83 84 def __del__(self): /users/<username>/anaconda3/envs/carnd-term1/lib/python3.5/site-packages/moviepy/audio/io/audiofileclip.py in __init__(self, filename, buffersize, nbytes, fps) 61 self.filename = filename 62 reader = ffmpeg_audioreader(filename,fps=fps,nbytes=nbytes, --> 63 buffersize=buffersize) 64 65 self.reader = reader /users/<username>/anaconda3/envs/carnd-term1/lib/python3.5/site-packages/moviepy/audio/io/readers.py in __init__(self, filename, buffersize, print_infos, fps, nbytes, nchannels) 68 self.buffer_startframe = 1 69 self.initialize() --> 70 self.buffer_around(1) 71 72 /users/<username>/anaconda3/envs/carnd-term1/lib/python3.5/site-packages/moviepy/audio/io/readers.py in buffer_around(self, framenumber) 232 else: 233 self.seek(new_bufferstart) --> 234 self.buffer = self.read_chunk(self.buffersize) 235 236 self.buffer_startframe = new_bufferstart /users/<username>/anaconda3/envs/carnd-term1/lib/python3.5/site-packages/moviepy/audio/io/readers.py in read_chunk(self, chunksize) 121 result = (1.0*result / 2**(8*self.nbytes-1)).\ 122 reshape((len(result)/self.nchannels, --> 123 self.nchannels)) 124 #self.proc.stdout.flush() 125 self.pos = self.pos+chunksize typeerror: 'float' object cannot interpreted integer
is because of conflict in versions of various libraries?
Comments
Post a Comment