python利用ffmpeg进行录制屏幕的方法-创新互联
前几天下载了几个视频,但是有两集是一个视频的,偶尔找到了ffmpeg处理视频的方法,它的功能非常强大。因此,分享一下,一起学习。

import subprocess,sys,os
import re
class CutSplicingVdeio(object):
def __init__(self):
pass
#dercription CutSplicingVdeio this class function
def instructions(self):
dercription="vdeio and image transform,vdeio other opreation"
return dercription
def transcribeScreen(self,filePath):
filePath=filePath.decode('utf-8')
cmd=ffmpegPath + " -f gdigrab -framerate 60 -offset_x 0 -offset_y 0 -video_size 1366x768 -i desktop " + filePath
cmd=cmd.encode(sys.getfilesystemencoding())
if "?" in cmd:
cmd=cmd.replace("?","")
print cmd
subprocess.call(cmd , shell=True)
vp=CutSplicingVdeio() vp.transcribeScreen(r"C:\Users\Administrator\Desktop\transcribe.avi")
#according to give a video filepath (transcribe Screen)
当前文章:python利用ffmpeg进行录制屏幕的方法-创新互联
链接URL:http://www.scyingshan.cn/article/dhgsoi.html


咨询
建站咨询
