安装
install from pypi
pip install extract-video-ppt
or local
python ./setup.py install
or local user
python ./setup.py install --user
使用
evp --help
evp --similarity 0.6 --pdfname hello.pdf --start_frame 0:00:09 --end_frame 00:00:30 ./ ./test.mp4
- similarity: The similarity between this frame and the previous frame is less than this value and this frame will be saveed, default: 0.6
- pdfname: the name for export pdf
- start_frame: start frame time point, default = ‘00:00:00’
- end_frame: end frame time point, default = ‘INFINITY’
convert to exe
为了方便使用,使用pyinstaller转化成了exe文件,在转换过程中遇到以下问题:
提示ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation
Solution:在pyinstaller时添加一下opencv的路径即可:pyinstaller -w xxx.py --paths="xxx\Lib\site-packages\cv2"
######
Solution:
pip uninstall matplotlib
pip install matplotlib==3.1.1
pyinstaller -F XXX.py
找到.spec文件,将其中的hiddenimports=[]
修改为hiddenimports=['matplotlib']
,然后:
pyinstaller -F XXX.spec
此时再运行就可以了,虽然运行时会有Warning,但不影响。
参考资料
- extract ppt from a video
- Python pyinstaller打包opencv程序出错
- 打包matplotlib出现RuntimeError: Could not find the matplotlib data files
手机版“神探玺洛克”请扫码