do not rename protocol; add conditions to FFmpegFixupM3u8PP

This commit is contained in:
Mozi 2024-08-20 15:56:03 +00:00
parent fe592cd6ab
commit e720e8879d
4 changed files with 5 additions and 4 deletions

View File

@ -3546,7 +3546,8 @@ class YoutubeDL:
'writing DASH m4a. Only some players support this container',
FFmpegFixupM4aPP)
ffmpeg_fixup(downloader == 'hlsnative' and not self.params.get('hls_use_mpegts')
or info_dict.get('is_live') and self.params.get('hls_use_mpegts') is None,
or info_dict.get('is_live') and self.params.get('hls_use_mpegts') is None
or downloader == 'niconico_live',
'Possible MPEG-TS in MP4 container or malformed AAC timestamps',
FFmpegFixupM3u8PP)
ffmpeg_fixup(downloader == 'dashsegments'

View File

@ -50,7 +50,7 @@ PROTOCOL_MAP = {
'ism': IsmFD,
'mhtml': MhtmlFD,
'niconico_dmc': NiconicoDmcFD,
'm3u8_niconico_live': NiconicoLiveFD,
'niconico_live': NiconicoLiveFD,
'fc2_live': FC2LiveFD,
'websocket_frag': WebSocketFragmentFD,
'youtube_live_chat': YoutubeLiveChatFD,

View File

@ -1007,7 +1007,7 @@ class NiconicoLiveIE(NiconicoBaseIE):
for fmt, q in zip(formats, reversed(qualities[1:])):
fmt.update({
'format_id': q,
'protocol': 'm3u8_niconico_live',
'protocol': 'niconico_live',
})
yield fmt

View File

@ -888,7 +888,7 @@ class FFmpegFixupM4aPP(FFmpegFixupPostProcessor):
class FFmpegFixupM3u8PP(FFmpegFixupPostProcessor):
def _needs_fixup(self, info):
yield info['ext'] in ('mp4', 'm4a')
yield info['protocol'].startswith('m3u8')
yield info['protocol'].startswith('m3u8') or info['protocol'] == 'niconico_live'
try:
metadata = self.get_metadata_object(info['filepath'])
except PostProcessingError as e: