capture the image of the video and generate pptx file.
installer 成 exe(300MB+) 添加图形化界面(搁置)
.mp4 -> tempPicture/ -> tempPicture_reduce/ ->.pptx
--videoPath VIDEOPATH, -v VIDEOPATH
videoPath
--time_interval TIME_INTERVAL, -t TIME_INTERVAL
time_interval
--pictureFolder PICTUREFOLDER, -p PICTUREFOLDER
pictureFoder
--reducePictureFolder REDUCEPICTUREFOLDER, -r REDUCEPICTUREFOLDER
reducePictureFolder
--pptName PPTNAME, -m PPTNAME
pptName
--threshold THRESHOLD, -th THRESHOLD
threshold
--debug debug
--simple, -s simple mode,run in the videopath
推荐使用方式 cd 目录/ mv *.mp4 目录/ python transfer.py -v *mp4 -s (自动配置临时截图文件夹路径,并在生成pptx后清除)
abc = video2pptx(".//英语课_15周.mp4")
abc.capFrame(".//tempPicture",60)
similar_score = abc.calcSimilar(".\tempPicture") print(similar_score)
abc.copyPictureBySimilar(0.93,".\tempPicture",similar_score=similar_score)
abc.createPPtx("英语课_15周",pictureFile=r"./tempPicture_reduce/")
import cv2
import tqdm
from PIL import Image
import os
import shutil
from pptx import Presentation
from pptx.util import Inches