Просмотр исходного кода

Run `FFmpegFixupM3u8PP` for live-streams if needed

Closes #3669
pukkandan 2 лет назад
Родитель
Сommit
d7a1aa00c6
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      yt_dlp/YoutubeDL.py

+ 2 - 1
yt_dlp/YoutubeDL.py

@@ -3194,7 +3194,8 @@ class YoutubeDL:
                     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
-                        ffmpeg_fixup(downloader == 'HlsFD',
+                        live_fixup = info_dict.get('is_live') and not self.params.get('hls_use_mpegts')
+                        ffmpeg_fixup(downloader == 'HlsFD' or live_fixup,
                                      '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',