1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-30 05:15:14 +00:00

#70 Allow downloading of unplayable video formats

Video postprocessors are also turned off when this option is used

Co-authored-by: shirtjs <2660574+shirtjs@users.noreply.github.com>
Co-authored-by: pukkandan <pukkandan@gmail.com>
This commit is contained in:
shirt-dev
2021-02-11 22:51:59 -05:00
committed by GitHub
parent 584bab3766
commit 63ad4d43eb
29 changed files with 106 additions and 47 deletions

View File

@@ -479,10 +479,10 @@ class BrightcoveNewIE(AdobePassIE):
ext = mimetype2ext(source.get('type'))
src = source.get('src')
# https://support.brightcove.com/playback-api-video-fields-reference#key_systems_object
if container == 'WVM' or source.get('key_systems'):
if not self._downloader.params.get('allow_unplayable_formats') and (container == 'WVM' or source.get('key_systems')):
num_drm_sources += 1
continue
elif ext == 'ism':
elif ext == 'ism' and self._downloader.params.get('allow_unplayable_formats'):
continue
elif ext == 'm3u8' or container == 'M2TS':
if not src:
@@ -546,7 +546,7 @@ class BrightcoveNewIE(AdobePassIE):
error = errors[0]
raise ExtractorError(
error.get('message') or error.get('error_subcode') or error['error_code'], expected=True)
if sources and num_drm_sources == len(sources):
if not self._downloader.params.get('allow_unplayable_formats') and sources and num_drm_sources == len(sources):
raise ExtractorError('This video is DRM protected.', expected=True)
self._sort_formats(formats)