diff options
author | Christian Pointner <equinox@spreadspace.org> | 2012-10-01 01:27:41 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2012-10-01 01:27:41 +0200 |
commit | b648aafe9e4b9ce32a4c17f496bb926bf2fc99ed (patch) | |
tree | 110101db8f478a03dedcb617bb3ed5b9774c7c67 | |
parent | only add encoder if it not already exists (diff) |
refactoring
-rwxr-xr-x | src/flufigut.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/flufigut.py b/src/flufigut.py index 4007e4f..d8cbaa9 100755 --- a/src/flufigut.py +++ b/src/flufigut.py @@ -120,8 +120,15 @@ for property in input.keys(): elif property != 'source': flow['input']['raw-input']['properties'][property] = input[property] + +samplerates = [ ] resolutions = [ ] for format in transcode.keys(): + if 'samplerate' in globals['formats'][format]: + samplerate = globals['formats'][format]['samplerate'] + if samplerate not in samplerates: + if input['samplerate'] != samplerate: + samplerates.append(samplerate) for profile in transcode[format]: resolution = globals['profiles'][profile]['video'] if resolution not in resolutions: @@ -143,15 +150,6 @@ for resolution in resolutions: }, } - -samplerates = [ ] -for format in globals['formats'].keys(): - if 'samplerate' in globals['formats'][format]: - samplerate = globals['formats'][format]['samplerate'] - if samplerate not in samplerates: - if input['samplerate'] != samplerate: - samplerates.append(samplerate) - for samplerate in samplerates: flow['input']['resample-%s' % samplerate] = { 'type': 'audio-resample', |