[extractor/common] Add support for DASH manifests with SegmentLists with bare SegmentURLs

This commit is contained in:
Petr Novak 2017-11-25 02:13:23 +01:00 committed by Sergey M․
parent fea92aa65d
commit 41bf647e89
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D
3 changed files with 309 additions and 1 deletions

View file

@ -1975,6 +1975,15 @@ class InfoExtractor(object):
})
segment_index += 1
representation_ms_info['fragments'] = fragments
elif 'segment_urls' in representation_ms_info:
# Segment URLs with no SegmentTimeline
# Example: https://www.seznam.cz/zpravy/clanek/cesko-zasahne-vitr-o-sile-vichrice-muze-byt-i-zivotu-nebezpecny-39091
fragments = []
for segment_url in representation_ms_info['segment_urls']:
fragments.append({
location_key(segment_url): segment_url,
})
representation_ms_info['fragments'] = fragments
# NB: MPD manifest may contain direct URLs to unfragmented media.
# No fragments key is present in this case.
if 'fragments' in representation_ms_info: