ytdl-org/youtube-dl · error · ExtractorError
This video is DRM protected.
Error message
This video is DRM protected.
What it means
Raised by ToggleIE (Singapore mee siguang/toggle.sg) when no downloadable formats were produced and the media metadata Metas list contains Key 'Encryption' with Value '1', which Toggle uses to flag DRM. Marked expected=True: the video exists but cannot be downloaded because it is DRM protected.
Source
Thrown at youtube_dl/extractor/toggle.py:158
note='Downloading %s MPD manifest' % vid_format,
errnote='Failed to download %s MPD manifest' % vid_format,
fatal=False))
elif ext == 'ism':
formats.extend(self._extract_ism_formats(
video_url, video_id, ism_id=vid_format,
note='Downloading %s ISM manifest' % vid_format,
errnote='Failed to download %s ISM manifest' % vid_format,
fatal=False))
elif ext == 'mp4':
formats.append({
'ext': ext,
'url': video_url,
'format_id': vid_format,
})
if not formats:
for meta in (info.get('Metas') or []):
if meta.get('Key') == 'Encryption' and meta.get('Value') == '1':
raise ExtractorError(
'This video is DRM protected.', expected=True)
# Most likely because geo-blocked
raise ExtractorError('No downloadable videos found', expected=True)
self._sort_formats(formats)
thumbnails = []
for picture in info.get('Pictures', []):
if not isinstance(picture, dict):
continue
pic_url = picture.get('URL')
if not pic_url:
continue
thumbnail = {
'url': pic_url,
}
pic_size = picture.get('PicSize', '')
m = re.search(r'(?P<width>\d+)[xX](?P<height>\d+)', pic_size)
if m:View on GitHub (pinned to 956b8c5855)
Solutions
- Verify the same video plays for free on toggle.sg in a browser without a subscription; if it requires login, pass cookies with credentials (yt-dlp --cookies-from-browser / --username)
- If it is genuinely DRM protected, no open-source downloader can decrypt it — use the platform's offline feature
- Update to yt-dlp for current Toggle/mewatch extraction (site rebranded to mewatch.sg)
- In scripts, detect this expected error and mark the item as DRM instead of retrying
Defensive patterns
Strategy: try-catch
Try / catch
try:
ydl.extract_info(toggle_url)
except ExtractorError as e:
if e.expected and 'DRM' in str(e):
mark_drm(url) # undecryptable; do not retry Prevention
- Check whether the content needs a Toggle/mewatch subscription before queueing
- Pass authenticated cookies for premium content
- Treat DRM errors as terminal in job runners
When it happens
Trigger: Extracting a toggle.sg video whose only renditions are PlayReady/Widevine protected (the ISM manifests fail or are skipped, mp4 entries absent), leaving 'formats' empty and the Encryption meta flag set.
Common situations: Premium/licensed Toggle content requiring a subscription; set-top-box exclusive streams; free clips usually serve plain mp4 and never hit this branch.
Related errors
- Bigo says: %s (code %s)
- This video is DRM protected.
- %s said: %s
- This video is DRM protected.
- This video is DRM protected.
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/23a7390c4aae34bf.
Report an issue: GitHub.