mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-17 14:41:44 +00:00
[Core] hls manifests, dynamic mpd
This commit is contained in:
parent
08676fb591
commit
78895bd3a1
19
README.md
19
README.md
@ -12,7 +12,20 @@ youtube-dlc is a fork of youtube-dl with the intention of getting features teste
|
|||||||
- [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 @@ Then simply type this
|
|||||||
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 @@ Then simply type this
|
|||||||
--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 _real_main(argv=None):
|
|||||||
'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,8 +2071,9 @@ class InfoExtractor(object):
|
|||||||
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 mpd_doc.get('type') == 'dynamic':
|
if not self._downloader.params.get('dynamic_mpd'):
|
||||||
return []
|
if mpd_doc.get('type') == 'dynamic':
|
||||||
|
return []
|
||||||
|
|
||||||
namespace = self._search_regex(r'(?i)^{([^}]+)?}MPD$', mpd_doc.tag, 'namespace', default=None)
|
namespace = self._search_regex(r'(?i)^{([^}]+)?}MPD$', mpd_doc.tag, 'namespace', default=None)
|
||||||
|
|
||||||
|
@ -2244,7 +2244,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
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'
|
||||||
formats.append(a_format)
|
if self._downloader.params.get('youtube_include_hls_manifest', True):
|
||||||
|
formats.append(a_format)
|
||||||
else:
|
else:
|
||||||
error_message = extract_unavailable_message()
|
error_message = extract_unavailable_message()
|
||||||
if not error_message:
|
if not error_message:
|
||||||
|
@ -414,6 +414,14 @@ def parseOpts(overrideArguments=None):
|
|||||||
'--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 parseOpts(overrideArguments=None):
|
|||||||
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 parseOpts(overrideArguments=None):
|
|||||||
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 New Issue
Block a user