mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-22 06:00:00 +00:00
[Core] hls manifests, dynamic mpd
This commit is contained in:
parent
08676fb591
commit
78895bd3a1
5 changed files with 44 additions and 4 deletions
19
README.md
19
README.md
|
@ -12,7 +12,20 @@
|
||||||
- [INSTALLATION](#installation)
|
- [INSTALLATION](#installation)
|
||||||
- [DESCRIPTION](#description)
|
- [DESCRIPTION](#description)
|
||||||
- [OPTIONS](#options)
|
- [OPTIONS](#options)
|
||||||
- [COPYRIGHT](#copyright)
|
- [Network Options:](#network-options)
|
||||||
|
- [Geo Restriction:](#geo-restriction)
|
||||||
|
- [Video Selection:](#video-selection)
|
||||||
|
- [Download Options:](#download-options)
|
||||||
|
- [Filesystem Options:](#filesystem-options)
|
||||||
|
- [Thumbnail images:](#thumbnail-images)
|
||||||
|
- [Verbosity / Simulation Options:](#verbosity--simulation-options)
|
||||||
|
- [Workarounds:](#workarounds)
|
||||||
|
- [Video Format Options:](#video-format-options)
|
||||||
|
- [Subtitle Options:](#subtitle-options)
|
||||||
|
- [Authentication Options:](#authentication-options)
|
||||||
|
- [Adobe Pass Options:](#adobe-pass-options)
|
||||||
|
- [Post-processing Options:](#post-processing-options)
|
||||||
|
- [Extractor Options:](#extractor-options)
|
||||||
|
|
||||||
# INSTALLATION
|
# INSTALLATION
|
||||||
|
|
||||||
|
@ -355,6 +368,8 @@ ## Video Format Options:
|
||||||
videos
|
videos
|
||||||
--youtube-skip-dash-manifest Do not download the DASH manifests and
|
--youtube-skip-dash-manifest Do not download the DASH manifests and
|
||||||
related data on YouTube videos
|
related data on YouTube videos
|
||||||
|
--youtube-skip-hls-manifest Do not download the HLS manifests and
|
||||||
|
related data on YouTube videos
|
||||||
--merge-output-format FORMAT If a merge is required (e.g.
|
--merge-output-format FORMAT If a merge is required (e.g.
|
||||||
bestvideo+bestaudio), output to given
|
bestvideo+bestaudio), output to given
|
||||||
container format. One of mkv, mp4, ogg,
|
container format. One of mkv, mp4, ogg,
|
||||||
|
@ -453,3 +468,5 @@ ## Post-processing Options:
|
||||||
--convert-subs FORMAT Convert the subtitles to other format
|
--convert-subs FORMAT Convert the subtitles to other format
|
||||||
(currently supported: srt|ass|vtt|lrc)
|
(currently supported: srt|ass|vtt|lrc)
|
||||||
|
|
||||||
|
## Extractor Options:
|
||||||
|
--ignore-dynamic-mpd Do not process dynamic DASH manifests
|
|
@ -414,7 +414,9 @@ def parse_retries(retries):
|
||||||
'prefer_ffmpeg': opts.prefer_ffmpeg,
|
'prefer_ffmpeg': opts.prefer_ffmpeg,
|
||||||
'include_ads': opts.include_ads,
|
'include_ads': opts.include_ads,
|
||||||
'default_search': opts.default_search,
|
'default_search': opts.default_search,
|
||||||
|
'dynamic_mpd': opts.dynamic_mpd,
|
||||||
'youtube_include_dash_manifest': opts.youtube_include_dash_manifest,
|
'youtube_include_dash_manifest': opts.youtube_include_dash_manifest,
|
||||||
|
'youtube_include_hls_manifest': opts.youtube_include_hls_manifest,
|
||||||
'encoding': opts.encoding,
|
'encoding': opts.encoding,
|
||||||
'extract_flat': opts.extract_flat,
|
'extract_flat': opts.extract_flat,
|
||||||
'mark_watched': opts.mark_watched,
|
'mark_watched': opts.mark_watched,
|
||||||
|
|
|
@ -2071,6 +2071,7 @@ def _parse_mpd_formats(self, mpd_doc, mpd_id=None, mpd_base_url='', formats_dict
|
||||||
http://standards.iso.org/ittf/PubliclyAvailableStandards/c065274_ISO_IEC_23009-1_2014.zip
|
http://standards.iso.org/ittf/PubliclyAvailableStandards/c065274_ISO_IEC_23009-1_2014.zip
|
||||||
2. https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP
|
2. https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP
|
||||||
"""
|
"""
|
||||||
|
if not self._downloader.params.get('dynamic_mpd'):
|
||||||
if mpd_doc.get('type') == 'dynamic':
|
if mpd_doc.get('type') == 'dynamic':
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
|
@ -2244,6 +2244,7 @@ def _extract_filesize(media_url):
|
||||||
a_format['player_url'] = player_url
|
a_format['player_url'] = player_url
|
||||||
# Accept-Encoding header causes failures in live streams on Youtube and Youtube Gaming
|
# Accept-Encoding header causes failures in live streams on Youtube and Youtube Gaming
|
||||||
a_format.setdefault('http_headers', {})['Youtubedl-no-compression'] = 'True'
|
a_format.setdefault('http_headers', {})['Youtubedl-no-compression'] = 'True'
|
||||||
|
if self._downloader.params.get('youtube_include_hls_manifest', True):
|
||||||
formats.append(a_format)
|
formats.append(a_format)
|
||||||
else:
|
else:
|
||||||
error_message = extract_unavailable_message()
|
error_message = extract_unavailable_message()
|
||||||
|
|
|
@ -414,6 +414,14 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser):
|
||||||
'--youtube-skip-dash-manifest',
|
'--youtube-skip-dash-manifest',
|
||||||
action='store_false', dest='youtube_include_dash_manifest',
|
action='store_false', dest='youtube_include_dash_manifest',
|
||||||
help='Do not download the DASH manifests and related data on YouTube videos')
|
help='Do not download the DASH manifests and related data on YouTube videos')
|
||||||
|
video_format.add_option(
|
||||||
|
'--youtube-include-hls-manifest',
|
||||||
|
action='store_true', dest='youtube_include_hls_manifest', default=True,
|
||||||
|
help=optparse.SUPPRESS_HELP)
|
||||||
|
video_format.add_option(
|
||||||
|
'--youtube-skip-hls-manifest',
|
||||||
|
action='store_false', dest='youtube_include_hls_manifest',
|
||||||
|
help='Do not download the HLS manifests and related data on YouTube videos')
|
||||||
video_format.add_option(
|
video_format.add_option(
|
||||||
'--merge-output-format',
|
'--merge-output-format',
|
||||||
action='store', dest='merge_output_format', metavar='FORMAT', default=None,
|
action='store', dest='merge_output_format', metavar='FORMAT', default=None,
|
||||||
|
@ -863,6 +871,16 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser):
|
||||||
metavar='FORMAT', dest='convertsubtitles', default=None,
|
metavar='FORMAT', dest='convertsubtitles', default=None,
|
||||||
help='Convert the subtitles to other format (currently supported: srt|ass|vtt|lrc)')
|
help='Convert the subtitles to other format (currently supported: srt|ass|vtt|lrc)')
|
||||||
|
|
||||||
|
extractor = optparse.OptionGroup(parser, 'Extractor Options')
|
||||||
|
extractor.add_option(
|
||||||
|
'--allow-dynamic-mpd',
|
||||||
|
action='store_true', dest='dynamic_mpd', default=True,
|
||||||
|
help=optparse.SUPPRESS_HELP)
|
||||||
|
extractor.add_option(
|
||||||
|
'--ignore-dynamic-mpd',
|
||||||
|
action='store_false', dest='dynamic_mpd',
|
||||||
|
help='Do not process dynamic DASH manifests')
|
||||||
|
|
||||||
parser.add_option_group(general)
|
parser.add_option_group(general)
|
||||||
parser.add_option_group(network)
|
parser.add_option_group(network)
|
||||||
parser.add_option_group(geo)
|
parser.add_option_group(geo)
|
||||||
|
@ -877,6 +895,7 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser):
|
||||||
parser.add_option_group(authentication)
|
parser.add_option_group(authentication)
|
||||||
parser.add_option_group(adobe_pass)
|
parser.add_option_group(adobe_pass)
|
||||||
parser.add_option_group(postproc)
|
parser.add_option_group(postproc)
|
||||||
|
parser.add_option_group(extractor)
|
||||||
|
|
||||||
if overrideArguments is not None:
|
if overrideArguments is not None:
|
||||||
opts, args = parser.parse_args(overrideArguments)
|
opts, args = parser.parse_args(overrideArguments)
|
||||||
|
|
Loading…
Reference in a new issue