From 47a5467e09bacb5c18ceaad791d383f0228917ef Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 29 Sep 2012 22:13:59 +0200 Subject: added video-resize support --- src/flufigut.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/flufigut.py b/src/flufigut.py index da2e3ae..89f30c3 100755 --- a/src/flufigut.py +++ b/src/flufigut.py @@ -102,7 +102,7 @@ flow['input'] = {} flow['input']['raw-input'] = { 'type': config['input']['source'], - 'desc': "Raw AV input from %s" % config['input']['source'], + 'desc': "capture raw AV from %s" % config['input']['source'], 'worker': 'input', 'properties': {}, } @@ -116,6 +116,28 @@ for property in config['input'].keys(): elif property != 'source': flow['input']['raw-input']['properties'][property] = config['input'][property] +resolutions = [ ] +for encoder in config['encoder']['video'].keys(): + for resolution in config['encoder']['video'][encoder]: + if resolution not in resolutions: + if config['input']['resolution'] != resolution: + if config['globals']['resolutions'][resolution]['rate'] != config['globals']['resolutions'][config['input']['resolution']]['rate']: + print "video rate conversion is not yet supported!!!" + sys.exit(-1) + resolutions.append(resolution) + +for resolution in resolutions: + flow['input']['resize-%s' % resolution] = { + 'type': 'video-resize', + 'desc': "resize video to %sx%s" % (config['globals']['resolutions'][resolution]['width'], config['globals']['resolutions'][resolution]['height']), + 'worker': 'input', + 'feeder': 'raw-input:video', + 'properties': { + 'width': config['globals']['resolutions'][resolution]['width'], + 'height': config['globals']['resolutions'][resolution]['height'], + }, + } + ### generate encoder components ################################# flow['encoder'] = {} -- cgit v1.2.3