summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2012-09-29 22:13:59 +0200
committerChristian Pointner <equinox@spreadspace.org>2012-09-29 22:13:59 +0200
commit47a5467e09bacb5c18ceaad791d383f0228917ef (patch)
tree6e9b4bfdf76469e96722dccdb9353d2bbc9b71d6 /src
parentfixed whitespaces at templates (diff)
added video-resize support
Diffstat (limited to 'src')
-rwxr-xr-xsrc/flufigut.py24
1 files changed, 23 insertions, 1 deletions
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'] = {}