diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/toolkit/ffmpeg.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/toolkit/ffmpeg.py b/src/toolkit/ffmpeg.py index d78d803..0a536bc 100644 --- a/src/toolkit/ffmpeg.py +++ b/src/toolkit/ffmpeg.py @@ -227,8 +227,8 @@ def createFfmpegCommand(inputFile, outputFile, components, duration=-1): '-pix_fmt', 'rgba', '-r', Core.settings.value('outputFrameRate'), '-t', duration, - '-i', '-', # the video input comes from a pipe '-an', # the video input has no sound + '-i', '-', # the video input comes from a pipe # INPUT SOUND '-t', duration, @@ -241,12 +241,11 @@ def createFfmpegCommand(inputFile, outputFile, components, duration=-1): ] segment = createAudioFilterCommand(extraAudio, safeDuration) ffmpegCommand.extend(segment) - if segment: - # Only map audio from the filters, and video from the pipe - ffmpegCommand.extend([ - '-map', '0:v', - '-map', '[a]', - ]) + # Map audio from the filters or the single audio input, and map video from the pipe + ffmpegCommand.extend([ + '-map', '0:v', + '-map', '[a]' if segment else '1:a', + ]) ffmpegCommand.extend([ # OUTPUT |
