ytdl-org/youtube-dl · error · ExtractorError

The video can't be downloaded

Error message

The video can't be downloaded

What it means

Raised by NiconicoIE when api_data['media']['delivery']['movie'] is missing or falsy — the HTML5 DMC delivery section that carries all quality metadata is absent from the watch-page API payload. Without it no formats can be built. Marked expected=True, it typically means the video has no web-deliverable streams for this session.

Source

Thrown at youtube_dl/extractor/niconico.py:430

            if error_code == 'DELETED':
                raise ExtractorError('The video has been deleted.',
                                     expected=True)
            elif error_code == 'NOT_FOUND':
                raise ExtractorError('The video is not found.',
                                     expected=True)
            elif error_code == 'COMMUNITY':
                self.to_screen('%s: The video is community members only.' % video_id)
            else:
                raise ExtractorError('%s reports error: %s' % (self.IE_NAME, error_code))

        # Start extracting video formats
        formats = []

        # Get HTML5 videos info
        quality_info = try_get(api_data, lambda x: x['media']['delivery']['movie'])
        if not quality_info:
            raise ExtractorError('The video can\'t be downloaded', expected=True)

        for audio_quality in quality_info.get('audios') or {}:
            for video_quality in quality_info.get('videos') or {}:
                if not audio_quality.get('isAvailable') or not video_quality.get('isAvailable'):
                    continue
                formats.append(self._extract_format_for_quality(
                    api_data, video_id, audio_quality, video_quality))

        # Get flv/swf info
        timestamp = None
        video_real_url = try_get(api_data, lambda x: x['video']['smileInfo']['url'])
        if video_real_url:
            is_economy = video_real_url.endswith('low')

            if is_economy:
                self.report_warning('Site is currently in economy mode! You will only have access to lower quality streams')

            # Invoking ffprobe to determine resolution

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Update youtube-dl / yt-dlp — delivery payload changes are frequent on Niconico.
  2. Pass an authenticated session: --cookies-from-browser <browser> or --cookies <cookie-file>; many missing-delivery cases are session gating.
  3. If the DMC delivery is genuinely absent (e.g. very old SWF-only videos), the extractor's smile/FLV path elsewhere handles only some of these — some legacy videos are simply not downloadable.

Example fix

# before
youtube-dl 'https://www.nicovideo.jp/watch/sm9'

# after
youtube-dl --cookies-from-browser chrome 'https://www.nicovideo.jp/watch/sm9'
Defensive patterns

Strategy: retry

Try / catch

except ExtractorError as e:
    if e.expected and "can't be downloaded" in str(e):
        retry(url, cookies=fresh_niconico_cookies())  # session gating is common
    else:
        raise

Prevention

When it happens

Trigger: try_get(api_data, lambda x: x['media']['delivery']['movie']) returns None on a watch page, e.g. economy/premium-gated delivery, logged-out access to member videos, or payload shape changes.

Common situations: Watching-restricted or member-only videos without a logged-in session; region/session gating on delivery; API changes after the extractor's last update (update first).

Related errors


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