diff options
Diffstat (limited to 'src/core.py')
| -rw-r--r-- | src/core.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/core.py b/src/core.py index 64f55eb..d72760d 100644 --- a/src/core.py +++ b/src/core.py @@ -526,13 +526,25 @@ class Core: if 'audio' in comp.properties() ] if extraAudio: - for extraInputFile, params in extraAudio: + unwantedVideoStreams = [] + for compNo, params in enumerate(extraAudio): + extraInputFile, params = params ffmpegCommand.extend([ '-i', extraInputFile ]) + if 'map' in params and params['map'] == '-v': + # a video stream to remove + unwantedVideoStreams.append(compNo + 1) + + if unwantedVideoStreams: + ffmpegCommand.extend(['-map', '0']) + for compNo in unwantedVideoStreams: + ffmpegCommand.extend([ + '-map', '-%s:v' % str(compNo) + ]) ffmpegCommand.extend([ '-filter_complex', - 'amix=inputs=%s:duration=longest:dropout_transition=3' % str( + 'amix=inputs=%s:duration=first:dropout_transition=3' % str( len(extraAudio) + 1 ), ]) |
