ytdl-org/youtube-dl · error · ExtractorError
This video is DRM protected.
Error message
This video is DRM protected.
What it means
Raised by the Wakanim extractor when the m3u8 URL embedded in the page contains an encryption parameter of cenc or cbcs-aapl. Per Azure Media Services streaming-URL conventions, those values indicate the stream is protected with DRM (e.g. PlayReady/Widevine/FairPlay), which youtube-dl cannot decrypt.
Source
Thrown at youtube_dl/extractor/wakanim.py:49
# DRM Protected
'url': 'https://www.wakanim.tv/de/v2/catalogue/episode/7843/sword-art-online-alicization-omu-arc-2-folge-15-omu',
'only_matching': True,
}]
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
m3u8_url = urljoin(url, self._search_regex(
r'file\s*:\s*(["\'])(?P<url>(?:(?!\1).)+)\1', webpage, 'm3u8 url',
group='url'))
# https://docs.microsoft.com/en-us/azure/media-services/previous/media-services-content-protection-overview#streaming-urls
encryption = self._search_regex(
r'encryption%3D(c(?:enc|bc(?:s-aapl)?))',
m3u8_url, 'encryption', default=None)
if encryption and encryption in ('cenc', 'cbcs-aapl'):
raise ExtractorError('This video is DRM protected.', expected=True)
formats = self._extract_m3u8_formats(
m3u8_url, video_id, 'mp4', entry_protocol='m3u8_native',
m3u8_id='hls')
info = self._search_json_ld(webpage, video_id, default={})
title = self._search_regex(
(r'<h1[^>]+\bclass=["\']episode_h1[^>]+\btitle=(["\'])(?P<title>(?:(?!\1).)+)\1',
r'<span[^>]+\bclass=["\']episode_title["\'][^>]*>(?P<title>[^<]+)'),
webpage, 'title', default=None, group='title')
return merge_dicts(info, {
'id': video_id,
'title': title,
'formats': formats,
})
View on GitHub (pinned to 956b8c5855)
Solutions
- Do not attempt to bypass DRM — use the official Wakanim apps/site for playback instead.
- Confirm with a browser (network tab) that the manifest really is encrypted; if not, the URL regex captured a wrong URL and the extractor needs a fix.
- No youtube-dl option can decrypt cenc/cbcs-aapl streams; there is no client workaround.
Defensive patterns
Strategy: validation
Validate before calling
m3u8_url = extract_m3u8_from_page(webpage)
encryption = re.search(r'encryption%3D(c(?:enc|bc(?:s-aapl)?))', m3u8_url or '')
is_drm = bool(encryption and encryption.group(1) in ('cenc', 'cbcs-aapl')) Type guard
def is_drm_manifest(m3u8_url: str) -> bool:
m = re.search(r'encryption%3D(c(?:enc|bc(?:s-aapl)?))', m3u8_url)
return bool(m and m.group(1) in ('cenc', 'cbcs-aapl')) Try / catch
try:
info = ydl.extract_info(url)
except ExtractorError as e:
if 'DRM protected' in str(e):
skip_drm(url)
else:
raise Prevention
- Assume all Wakanim premium streams are DRM-protected and exclude them from download queues.
- Check manifests for encryption=cenc/cbcs-aapl before invoking the extractor in custom tooling.
- Never rely on workarounds claiming to strip DRM — use official playback apps.
When it happens
Trigger: Extracting a Wakanim video whose regex-matched m3u8 URL matches r'encryption%3D(c(?:enc|bc(?:s-aapl)?))' with a captured value of 'cenc' or 'cbcs-aapl'; the check runs before _extract_m3u8_formats.
Common situations: Attempting to download licensed anime or simulcast content on Wakanim (French/German licensed streaming); all premium Wakanim streams are DRM-protected, so this error is the expected outcome for subscribers too.
Related errors
- This video is DRM protected.
- This video is DRM protected.
- Video %s is DRM protected
- message
- Unable to download video %s
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/2bfba1181d8a20e5.
Report an issue: GitHub.