summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/flufigut.py38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/flufigut.py b/src/flufigut.py
index a47e544..4007e4f 100755
--- a/src/flufigut.py
+++ b/src/flufigut.py
@@ -180,15 +180,16 @@ for format in transcode.keys():
else:
feeder = 'resize-%s' % resolution
video_encoder = 'encode-%s-%s' % (encoder, resolution)
- flow['encoder_video'][video_encoder] = {
- 'type': '%s-encode' % encoder,
- 'desc': "%s encoder for %sx%s" % (encoder, globals['resolutions'][resolution]['width'], globals['resolutions'][resolution]['height']),
- 'worker': 'encoder-%s' % encoder,
- 'feeder': feeder,
- 'properties': {
- 'bitrate': bitrate,
- },
- }
+ if video_encoder not in flow['encoder_video'].keys():
+ flow['encoder_video'][video_encoder] = {
+ 'type': '%s-encode' % encoder,
+ 'desc': "%s encoder for %sx%s" % (encoder, globals['resolutions'][resolution]['width'], globals['resolutions'][resolution]['height']),
+ 'worker': 'encoder-%s' % encoder,
+ 'feeder': feeder,
+ 'properties': {
+ 'bitrate': bitrate,
+ },
+ }
audio_encoder = 'none'
if 'audio' in globals['formats'][format]:
@@ -201,15 +202,16 @@ for format in transcode.keys():
samplerate = input['samplerate']
feeder = 'raw-input:audio'
audio_encoder = 'encode-%s-%i-%i' % (encoder, bitrate, samplerate)
- flow['encoder_audio'][audio_encoder] = {
- 'type': '%s-encode' % encoder,
- 'desc': "%s encoder for %i kbit/s @ %i Hz" % (encoder, bitrate, samplerate),
- 'worker': 'encoder-%s' % encoder,
- 'feeder': feeder,
- 'properties': {
- 'bitrate': bitrate,
- },
- }
+ if audio_encoder not in flow['encoder_audio']:
+ flow['encoder_audio'][audio_encoder] = {
+ 'type': '%s-encode' % encoder,
+ 'desc': "%s encoder for %i kbit/s @ %i Hz" % (encoder, bitrate, samplerate),
+ 'worker': 'encoder-%s' % encoder,
+ 'feeder': feeder,
+ 'properties': {
+ 'bitrate': bitrate,
+ },
+ }
muxer = globals['formats'][format]['muxer']
flow['muxer']['muxer-%s-%s' % (muxer, profile)] = {