aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbashonly <88596187+bashonly@users.noreply.github.com>2023-04-13 14:21:09 -0500
committerGitHub <noreply@github.com>2023-04-13 19:21:09 +0000
commit3f7e2bd80e3c5d8a1682f20a1b245fcd974f295d (patch)
treeef1c156359eb81bdecc1ace43573f205feba52f0
parent925936908a3c3ee0e508621db14696b9f6a8b563 (diff)
downloadhypervideo-pre-3f7e2bd80e3c5d8a1682f20a1b245fcd974f295d.tar.lz
hypervideo-pre-3f7e2bd80e3c5d8a1682f20a1b245fcd974f295d.tar.xz
hypervideo-pre-3f7e2bd80e3c5d8a1682f20a1b245fcd974f295d.zip
[FFmpegFixupM3u8PP] Check audio codec before fixup (#6778)
Closes #6673 Authored by: bashonly
-rw-r--r--yt_dlp/postprocessor/ffmpeg.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py
index 63fc9ace6..323f4303c 100644
--- a/yt_dlp/postprocessor/ffmpeg.py
+++ b/yt_dlp/postprocessor/ffmpeg.py
@@ -898,8 +898,11 @@ class FFmpegFixupM3u8PP(FFmpegFixupPostProcessor):
@PostProcessor._restrict_to(images=False)
def run(self, info):
if all(self._needs_fixup(info)):
+ args = ['-f', 'mp4']
+ if self.get_audio_codec(info['filepath']) == 'aac':
+ args.extend(['-bsf:a', 'aac_adtstoasc'])
self._fixup('Fixing MPEG-TS in MP4 container', info['filepath'], [
- *self.stream_copy_opts(), '-f', 'mp4', '-bsf:a', 'aac_adtstoasc'])
+ *self.stream_copy_opts(), *args])
return [], info