mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-13 20:53:06 +00:00
do not rename protocol; add conditions to FFmpegFixupM3u8PP
This commit is contained in:
parent
fe592cd6ab
commit
e720e8879d
@ -3546,7 +3546,8 @@ class YoutubeDL:
|
|||||||
'writing DASH m4a. Only some players support this container',
|
'writing DASH m4a. Only some players support this container',
|
||||||
FFmpegFixupM4aPP)
|
FFmpegFixupM4aPP)
|
||||||
ffmpeg_fixup(downloader == 'hlsnative' and not self.params.get('hls_use_mpegts')
|
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',
|
'Possible MPEG-TS in MP4 container or malformed AAC timestamps',
|
||||||
FFmpegFixupM3u8PP)
|
FFmpegFixupM3u8PP)
|
||||||
ffmpeg_fixup(downloader == 'dashsegments'
|
ffmpeg_fixup(downloader == 'dashsegments'
|
||||||
|
@ -50,7 +50,7 @@ PROTOCOL_MAP = {
|
|||||||
'ism': IsmFD,
|
'ism': IsmFD,
|
||||||
'mhtml': MhtmlFD,
|
'mhtml': MhtmlFD,
|
||||||
'niconico_dmc': NiconicoDmcFD,
|
'niconico_dmc': NiconicoDmcFD,
|
||||||
'm3u8_niconico_live': NiconicoLiveFD,
|
'niconico_live': NiconicoLiveFD,
|
||||||
'fc2_live': FC2LiveFD,
|
'fc2_live': FC2LiveFD,
|
||||||
'websocket_frag': WebSocketFragmentFD,
|
'websocket_frag': WebSocketFragmentFD,
|
||||||
'youtube_live_chat': YoutubeLiveChatFD,
|
'youtube_live_chat': YoutubeLiveChatFD,
|
||||||
|
@ -1007,7 +1007,7 @@ class NiconicoLiveIE(NiconicoBaseIE):
|
|||||||
for fmt, q in zip(formats, reversed(qualities[1:])):
|
for fmt, q in zip(formats, reversed(qualities[1:])):
|
||||||
fmt.update({
|
fmt.update({
|
||||||
'format_id': q,
|
'format_id': q,
|
||||||
'protocol': 'm3u8_niconico_live',
|
'protocol': 'niconico_live',
|
||||||
})
|
})
|
||||||
yield fmt
|
yield fmt
|
||||||
|
|
||||||
|
@ -888,7 +888,7 @@ class FFmpegFixupM4aPP(FFmpegFixupPostProcessor):
|
|||||||
class FFmpegFixupM3u8PP(FFmpegFixupPostProcessor):
|
class FFmpegFixupM3u8PP(FFmpegFixupPostProcessor):
|
||||||
def _needs_fixup(self, info):
|
def _needs_fixup(self, info):
|
||||||
yield info['ext'] in ('mp4', 'm4a')
|
yield info['ext'] in ('mp4', 'm4a')
|
||||||
yield info['protocol'].startswith('m3u8')
|
yield info['protocol'].startswith('m3u8') or info['protocol'] == 'niconico_live'
|
||||||
try:
|
try:
|
||||||
metadata = self.get_metadata_object(info['filepath'])
|
metadata = self.get_metadata_object(info['filepath'])
|
||||||
except PostProcessingError as e:
|
except PostProcessingError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user