[FixupM3u8] Obey --hls-prefer-mpegts

Closes #3697
This commit is contained in:
pukkandan 2022-05-11 10:05:36 +05:30
parent 3d38b2d6d0
commit 494f52308b
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39

View file

@ -3194,8 +3194,8 @@ def ffmpeg_fixup(cndn, msg, cls):
downloader = downloader.__name__ if downloader else None downloader = downloader.__name__ if downloader else None
if info_dict.get('requested_formats') is None: # Not necessary if doing merger 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' and not self.params.get('hls_use_mpegts')
ffmpeg_fixup(downloader == 'HlsFD' or fixup_live, 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', 'Possible MPEG-TS in MP4 container or malformed AAC timestamps',
FFmpegFixupM3u8PP) FFmpegFixupM3u8PP)
ffmpeg_fixup(info_dict.get('is_live') and downloader == 'DashSegmentsFD', ffmpeg_fixup(info_dict.get('is_live') and downloader == 'DashSegmentsFD',