projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[nzz] Relax kaltura regex
[youtube-dl]
/
youtube_dl
/
downloader
/
__init__.py
diff --git
a/youtube_dl/downloader/__init__.py
b/youtube_dl/downloader/__init__.py
index daa5498d4a10b521cb9d09f9c23633888e69bec2..2e485df9dac09e197af6183ded3570e57805fad2 100644
(file)
--- a/
youtube_dl/downloader/__init__.py
+++ b/
youtube_dl/downloader/__init__.py
@@
-6,6
+6,8
@@
from .hls import HlsFD
from .http import HttpFD
from .rtmp import RtmpFD
from .dash import DashSegmentsFD
from .http import HttpFD
from .rtmp import RtmpFD
from .dash import DashSegmentsFD
+from .rtsp import RtspFD
+from .ism import IsmFD
from .external import (
get_external_downloader,
FFmpegFD,
from .external import (
get_external_downloader,
FFmpegFD,
@@
-19,10
+21,11
@@
PROTOCOL_MAP = {
'rtmp': RtmpFD,
'm3u8_native': HlsFD,
'm3u8': FFmpegFD,
'rtmp': RtmpFD,
'm3u8_native': HlsFD,
'm3u8': FFmpegFD,
- 'mms':
FFmpeg
FD,
- 'rtsp':
FFmpeg
FD,
+ 'mms':
Rtsp
FD,
+ 'rtsp':
Rtsp
FD,
'f4m': F4mFD,
'http_dash_segments': DashSegmentsFD,
'f4m': F4mFD,
'http_dash_segments': DashSegmentsFD,
+ 'ism': IsmFD,
}
}
@@
-31,8
+34,8
@@
def get_suitable_downloader(info_dict, params={}):
protocol = determine_protocol(info_dict)
info_dict['protocol'] = protocol
protocol = determine_protocol(info_dict)
info_dict['protocol'] = protocol
-
if (info_dict.get('start_time') or info_dict.get('end_time')
) and FFmpegFD.can_download(info_dict):
- return FFmpegFD
+
# if (info_dict.get('start_time') or info_dict.get('end_time')) and not info_dict.get('requested_formats'
) and FFmpegFD.can_download(info_dict):
+
#
return FFmpegFD
external_downloader = params.get('external_downloader')
if external_downloader is not None:
external_downloader = params.get('external_downloader')
if external_downloader is not None:
@@
-40,9
+43,15
@@
def get_suitable_downloader(info_dict, params={}):
if ed.can_download(info_dict):
return ed
if ed.can_download(info_dict):
return ed
- if protocol == 'm3u8' and params.get('hls_prefer_native'):
+ if protocol.startswith('m3u8') and info_dict.get('is_live'):
+ return FFmpegFD
+
+ if protocol == 'm3u8' and params.get('hls_prefer_native') is True:
return HlsFD
return HlsFD
+ if protocol == 'm3u8_native' and params.get('hls_prefer_native') is False:
+ return FFmpegFD
+
return PROTOCOL_MAP.get(protocol, HttpFD)
return PROTOCOL_MAP.get(protocol, HttpFD)