python句柄无效_在VideoFileClip函数中获取“ OSError:[WinError 6]句柄无效”

frommoviepy.editorimportVideoFileClipwhite_output='videos/testVideo.mp4'clip1=VideoFileClip("videos/testVideo.mp4")OSErrorTraceback(most recent call last)in()1white_output='videos/testVideo.mp4'---->2clip1=VideoFileClip("videos/testVideo.mp4")3white_clip=clip1.fl_image(process_image)#NOTE: this function expects color images!!4get_ipython().magic('time white_clip.write_videofile(white_output, audio=False)')C:\Users\hp pc\Anaconda3\envs\lib\site-packages\moviepy\video\io\VideoFileClip.pyin__init__(self,filename,has_mask,audio,audio_buffersize,audio_fps,audio_nbytes,verbose)53# Make a reader54pix_fmt="rgba"ifhas_maskelse"rgb24"--->55reader=FFMPEG_VideoReader(filename,pix_fmt=pix_fmt)56self.reader=reader57# Make some of the reader's attributes accessible from the clipC:\Users\hp pc\Anaconda3\envs\lib\site-packages\moviepy\video\io\ffmpeg_reader.pyin__init__(self,filename,print_infos,bufsize,pix_fmt,check_duration)3031self.filename=filename--->32infos=ffmpeg_parse_infos(filename,print_infos,check_duration)33self.fps=infos['video_fps']34self.size=infos['video_size']C:\Users\hp pc\Anaconda3\envs\lib\site-packages\moviepy\video\io\ffmpeg_reader.pyinffmpeg_parse_infos(filename,print_infos,check_duration)236popen_params["creationflags"]=0x08000000237-->238proc=sp.Popen(cmd,**popen_params)239240proc.stdout.readline()C:\Users\hp pc\Anaconda3\envs\lib\subprocess.pyin__init__(self,args,bufsize,executable,stdin,stdout,stderr,preexec_fn,close_fds,shell,cwd,env,universal_newlines,startupinfo,creationflags,restore_signals,start_new_session,pass_fds)840pass_fds=()):841"""Create new Popen instance."""-->842_cleanup()843# Held while anything is calling waitpid before returncode has been844# updated to prevent clobbering returncode if wait() or poll() areC:\Users\hp pc\Anaconda3\envs\lib\subprocess.pyin_cleanup()503def_cleanup():504forinstin_active[:]:-->505res=inst._internal_poll(_deadstate=sys.maxsize)506ifresisnotNone:507try:C:\Users\hp pc\Anaconda3\envs\lib\subprocess.pyin_internal_poll(self,_deadstate,_WaitForSingleObject,_WAIT_OBJECT_0,_GetExitCodeProcess)1257"""

1258 if self.returncode is None:

-> 1259 if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0:

1260 self.returncode = _GetExitCodeProcess(self._handle)

1261 return self.returncode

OSError: [WinError 6] The handle is invalid

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值