本文整理汇总了Python中video.Video.get_input_list方法的典型用法代码示例。如果您正苦于以下问题:Python Video.get_input_list方法的具体用法?Python Video.get_input_list怎么用?Python Video.get_input_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类video.Video
的用法示例。
在下文中一共展示了Video.get_input_list方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Scene
# 需要导入模块: from video import Video [as 别名]
# 或者: from video.Video import get_input_list [as 别名]
class Scene(object):
def __init__(self, scenecfg, basepath='./', length=1):
self.videofiles = []
self.video = Video(scenecfg['video'], basepath, length)
self.audio = Audio(scenecfg['sound'], basepath, self.video)
self.length = scenecfg['video']['length']
def __len__(self):
return len(self.files)
def get_video_input_list(self, fixedlength=1):
return self.video.get_input_list(fixedlength)
def get_audio_input_list(self):
return self.audio.get_input_list()
def generate_complex_video(self, scr):
cofilter = []
cofilter.append(' -filter_complex ')
#generate total screen
cofilter.append('"color=c=black:size={0}x{1} [base]'.format(
scr.get_total_width(), scr.get_total_height()))
v, videocount = self.video.get_video_layers(scr)
cofilter += v
cofilter += self.audio.get_audio_layers(self.video.files)
cofilter.append(' " ')
return cofilter
def get_finish_lines(self):
finishlines = []
finishlines.append(self.audio.get_finish_line())
if self.length == 'shortest':
finishlines.append(' -shortest')
else:
finishlines.append(' -t ' + str(self.length))
finishlines.append(self.audio.get_distort_line())
finishlines.append(self.video.get_distort_line())
finishlines.append(' -c:v libx264 -threads 4')
return finishlines