裁剪视频的代码,参见链接大神:http://www.cppcns.com/jiaoben/python/360614.html
但是遇到了几个错误:
1、 raise IOError(error)
OSError: [Errno 32] Broken pipe
MoviePy error: FFMPEG encountered the following error while writing file E…
【解】在终端运行命令:
conda install -c conda-forge ffmpeg
2、接下来又遇到了:
CondaVerificationError: The package for ffmpeg located at D:\anaconda\1\pkgs\ffmpeg-4.3.1-ha925a31_0
appears to be corrupted. The path ‘Library/bin/avformat-58.dll’
specified in the package manifest cannot be found.
【解】查了一下说是缓存了一些过时的包
清空缓存的包就好了。
命令如下:conda clean --packages --tarballs
然后改下路径啥的就能运行了,裁剪效果还可以,但是存储结果后报了个别的错误,但是不影响目前的使用就没改。
后续需要改的话再更新。