From 494f52308b313110b481711d3d1cb8f3630a5bbe Mon Sep 17 00:00:00 2001 From: pukkandan Date: Wed, 11 May 2022 10:05:36 +0530 Subject: [PATCH] [FixupM3u8] Obey `--hls-prefer-mpegts` Closes #3697 --- yt_dlp/YoutubeDL.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 83210f6c89..8d7c8a43fb 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -3194,8 +3194,8 @@ class YoutubeDL: downloader = downloader.__name__ if downloader else None if info_dict.get('requested_formats') is None: # Not necessary if doing merger - fixup_live = info_dict.get('is_live') and self.params.get('hls_use_mpegts') is None - ffmpeg_fixup(downloader == 'HlsFD' or fixup_live, + ffmpeg_fixup(downloader == 'HlsFD' and not self.params.get('hls_use_mpegts') + or info_dict.get('is_live') and self.params.get('hls_use_mpegts') is None, 'Possible MPEG-TS in MP4 container or malformed AAC timestamps', FFmpegFixupM3u8PP) ffmpeg_fixup(info_dict.get('is_live') and downloader == 'DashSegmentsFD',