|
|
|
@ -2596,7 +2596,16 @@ class InfoExtractor(object):
|
|
|
|
|
mime_type = representation_attrib['mimeType']
|
|
|
|
|
content_type = representation_attrib.get('contentType', mime_type.split('/')[0])
|
|
|
|
|
|
|
|
|
|
if content_type in ('video', 'audio', 'text') or mime_type == 'image/jpeg':
|
|
|
|
|
codecs = representation_attrib.get('codecs', '')
|
|
|
|
|
if content_type not in ('video', 'audio', 'text'):
|
|
|
|
|
if mime_type == 'image/jpeg':
|
|
|
|
|
content_type = 'image/jpeg'
|
|
|
|
|
if codecs.split('.')[0] == 'stpp':
|
|
|
|
|
content_type = 'text'
|
|
|
|
|
else:
|
|
|
|
|
self.report_warning('Unknown MIME type %s in DASH manifest' % mime_type)
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
base_url = ''
|
|
|
|
|
for element in (representation, adaptation_set, period, mpd_doc):
|
|
|
|
|
base_url_e = element.find(_add_ns('BaseURL'))
|
|
|
|
@ -2634,14 +2643,14 @@ class InfoExtractor(object):
|
|
|
|
|
'filesize': filesize,
|
|
|
|
|
'container': mimetype2ext(mime_type) + '_dash',
|
|
|
|
|
}
|
|
|
|
|
f.update(parse_codecs(representation_attrib.get('codecs')))
|
|
|
|
|
f.update(parse_codecs(codecs))
|
|
|
|
|
elif content_type == 'text':
|
|
|
|
|
f = {
|
|
|
|
|
'ext': mimetype2ext(mime_type),
|
|
|
|
|
'manifest_url': mpd_url,
|
|
|
|
|
'filesize': filesize,
|
|
|
|
|
}
|
|
|
|
|
elif mime_type == 'image/jpeg':
|
|
|
|
|
elif content_type == 'image/jpeg':
|
|
|
|
|
# See test case in VikiIE
|
|
|
|
|
# https://www.viki.com/videos/1175236v-choosing-spouse-by-lottery-episode-1
|
|
|
|
|
f = {
|
|
|
|
@ -2803,8 +2812,7 @@ class InfoExtractor(object):
|
|
|
|
|
formats.append(f)
|
|
|
|
|
elif content_type == 'text':
|
|
|
|
|
subtitles.setdefault(lang or 'und', []).append(f)
|
|
|
|
|
else:
|
|
|
|
|
self.report_warning('Unknown MIME type %s in DASH manifest' % mime_type)
|
|
|
|
|
|
|
|
|
|
return formats, subtitles
|
|
|
|
|
|
|
|
|
|
def _extract_ism_formats(self, *args, **kwargs):
|
|
|
|
|