ytdl-org/youtube-dl · error · ExtractorError

This video is DRM protected.

Error message

This video is DRM protected.

What it means

Raised by the Globo extractor when the playlist API marks the video with encrypted: true, meaning the stream is DRM protected and cannot be downloaded by youtube-dl. Marked expected=True so it prints cleanly instead of requesting a bug report.

Source

Thrown at youtube_dl/extractor/globo.py:100

                }).encode(), headers={
                    'Content-Type': 'application/json; charset=utf-8',
                }) or {}).get('glbId')
            if glb_id:
                self._set_cookie('.globo.com', 'GLBID', glb_id)
        except ExtractorError as e:
            if isinstance(e.cause, compat_HTTPError) and e.cause.code == 401:
                resp = self._parse_json(e.cause.read(), None)
                raise ExtractorError(resp.get('userMessage') or resp['id'], expected=True)
            raise

    def _real_extract(self, url):
        video_id = self._match_id(url)

        video = self._download_json(
            'http://api.globovideos.com/videos/%s/playlist' % video_id,
            video_id)['videos'][0]
        if video.get('encrypted') is True:
            raise ExtractorError('This video is DRM protected.', expected=True)

        title = video['title']

        formats = []
        subtitles = {}
        for resource in video['resources']:
            resource_id = resource.get('_id')
            resource_url = resource.get('url')
            resource_type = resource.get('type')
            if not resource_url or (resource_type == 'media' and not resource_id) or resource_type not in ('subtitle', 'media'):
                continue

            if resource_type == 'subtitle':
                subtitles.setdefault(resource.get('language') or 'por', []).append({
                    'url': resource_url,
                })
                continue

View on GitHub (pinned to 956b8c5855)

Solutions

  1. No fix within youtube-dl — DRM streams are intentionally unsupported
  2. Use the official Globoplay app/website for playback
  3. Check whether a non-DRM (free/older) edition of the same video exists
Defensive patterns

Strategy: try-catch

Validate before calling

import requests
v = requests.get(f'http://api.globovideos.com/videos/{vid}/playlist').json()['videos'][0]
if v.get('encrypted') is True:
    print('DRM protected — not downloadable')

Type guard

def globo_playable(video):
    return video.get('encrypted') is not True

Try / catch

try:
    ydl.extract_info(url)
except DownloadError as e:
    if 'DRM protected' in str(e):
        skip_permanently(url)  # never retriable
    else:
        raise

Prevention

When it happens

Trigger: Extracting any Globoplay video whose api.globovideos.com playlist entry has {encrypted: true} — typically premium/live DRM-wrapped content (Widevine/PlayReady HLS).

Common situations: Premium Globoplay content, live channels, or repriced back-catalog moved behind DRM. Logging in does not help; the DRM flag is per-video, not per-account.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/8f1881abfcf13a35. Report an issue: GitHub.