python 调用 ffmpeg 各项操作

vp=CutSplicingVdeio()#class instance

filePath=r"E:\my.avi"
videoStartTime="00:00:0.0"
videoEndTime="00:00:8.0"
#videoSaveDir1=r"‪E:\animation\Wisp_03.mov"
videoPath=r"‪E:\liucheng\emo\01.mp4"
#filePath=r"C:\Users\Administrator\Desktop\_HUDSence24.mov"
imageSaveDir=r"\E:\liucheng\emo"
fileName1=r"D:\wu.jpg"
#print vp.instructions()#return class dercription

#vp.cutOutVideo(ffmpegPath,filePath,videoStartTime,videoEndTime,videoSaveDir)#according to video give a StartTime and  give a EndTime segmentation video;
#print vp.getVideoData(CurMediaPath)#return video dercription
#print vp.getVideoData(filePath)#return video data
#vp.videoTransImage(videoPath,imageSaveDir)#according to give a video frames decomposition image
#vp.ImageTransVideo(imagePath,videoSaveDir)#according to give a Sequence frames composition video
#vp.cutVideoImage_resolution(videoPath,fileName,resolution)#according to give a resolution Screenshot(first key)
#vp.cutVideoImage_reAndTime(videoPath,fileName1,"520x520",12)#according to give a resolution and time Screenshot(give time key)
#vp.videoKeyRange_Gif(videoPath,fileName,keytime)#according to give a time composition front keytime key gif
#vp.imageFormatTrans("D:/1.jpg","C:/Users/Administrator/Desktop/root/text.png")#according to give a image format transform 
#vp.videoFormatTrans(r"E:\my.avi",r"E:\001.avi")#according to give a video format transform 
#vp.transcribeScreen(r"C:\Users\Administrator\Desktop\transcribe.avi")#according to give a video filepath (transcribe Screen)
#vp.broadcastVideo(videoSaveDir)##according to give a video filepath broadcast Video
#vp.cameraAddVideo(filePath)##according to give a video filepath laptop camera shooting video
#vp.audioTransFormat(filepath,filesavepath)##according to give  video filepath and filesavepath format transform

#vp.videoFormatTrans(filePath,r"E:\Wisp_03_3.mov")

#vp.cutVideoImage_reAndTime(filePath,r"C:\Users\Administrator\Desktop\temp\4.png","512x512",2)
#vp.videoAddWatermask(r"‪E:\liucheng\emo\01.mp4",r"‪‪E:\liucheng\emo\tree.png",r"‪E:\liucheng\emo\01_1.mp4")


这里没有写界面,有兴趣的可以写一下。

分割视频
得到视频、图片信息
视频导出序列帧
序列帧导出视频
截取视频某一帧作为缩略图
视频格式转换
图片格式转换
实现屏幕录制
实现调用笔记本摄像头进行监控
视频添加水印
等功能

你可能感兴趣的:(python,ffmpeg)