def crop_file_600(self, file_name, crop):
if crop == 1:
region = '800:450:0:75'
elif crop == 2:
region = '800:500:0:50'
command = ['ffmpeg', '-i', video_dir_bak + '/' + file_name, '-filter:v',
'crop=' + region, '-vcodec', 'wmv2', '-q', '5', video_dir + '/' + file_name]
self.pid, stdin, stdout, stderr = GLib.spawn_async(command,
flags=GLib.SpawnFlags.SEARCH_PATH|GLib.SpawnFlags.DO_NOT_REAP_CHILD,
standard_output=True,
standard_error=True)
io = GLib.IOChannel(stdout)
self.source_id_out = io.add_watch(GLib.IO_IN|GLib.IO_HUP,
self.watch_process,
'cropping_video_600',
priority=GLib.PRIORITY_HIGH)
settings.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录