aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-09-23 11:48:49 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-09-23 11:49:00 +0530
commit50eff38c1c071e2d389799843530c294d31887ed (patch)
tree0d3a6b0c074e021b465b2efb8b8e77f54aeafec3
parent4be9dbdc2413a796a6a88efb69a2a59612be5fae (diff)
downloadhypervideo-pre-50eff38c1c071e2d389799843530c294d31887ed.tar.lz
hypervideo-pre-50eff38c1c071e2d389799843530c294d31887ed.tar.xz
hypervideo-pre-50eff38c1c071e2d389799843530c294d31887ed.zip
bugfix for a21e0ab1a1a03f82517cd8cec4b9a2b4d6b81ac3
Closes #1061
-rw-r--r--yt_dlp/postprocessor/ffmpeg.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py
index 6f274b196..7ea01620e 100644
--- a/yt_dlp/postprocessor/ffmpeg.py
+++ b/yt_dlp/postprocessor/ffmpeg.py
@@ -730,11 +730,13 @@ class FFmpegMergerPP(FFmpegPostProcessor):
filename = info['filepath']
temp_filename = prepend_extension(filename, 'temp')
args = ['-c', 'copy']
+ audio_streams = 0
for (i, fmt) in enumerate(info['requested_formats']):
if fmt.get('acodec') != 'none':
args.extend(['-map', f'{i}:a:0'])
if self.get_audio_codec(fmt['filepath']) == 'aac':
- args.extend([f'-bsf:{i}:a:0', 'aac_adtstoasc'])
+ args.extend([f'-bsf:a:{audio_streams}', 'aac_adtstoasc'])
+ audio_streams += 1
if fmt.get('vcodec') != 'none':
args.extend(['-map', '%u:v:0' % (i)])
self.to_screen('Merging formats into "%s"' % filename)