ytdl-org/youtube-dl · error · ExtractorError

Cannot find video formats

Error message

Cannot find video formats

What it means

Raised by the Facebook extractor when video metadata was found but no playable format could be extracted from it: the formats list built from progressive (video source) entries and DASH manifests is empty. This happens when the metadata contains only formats the extractor cannot represent (e.g. encrypted or stream-only sources) or when the format fields were renamed. It is not marked expected, so it frequently signals an outdated extractor.

Source

Thrown at youtube_dl/extractor/facebook.py:632

                continue
            for quality in ('sd', 'hd'):
                for src_type in ('src', 'src_no_ratelimit'):
                    src = f[0].get('%s_%s' % (quality, src_type))
                    if src:
                        preference = -10 if format_id == 'progressive' else 0
                        if quality == 'hd':
                            preference += 5
                        formats.append({
                            'format_id': '%s_%s_%s' % (format_id, quality, src_type),
                            'url': src,
                            'preference': preference,
                        })
            extract_dash_manifest(f[0], formats)
            subtitles_src = f[0].get('subtitles_src')
            if subtitles_src:
                subtitles.setdefault('en', []).append({'url': subtitles_src})
        if not formats:
            raise ExtractorError('Cannot find video formats')

        process_formats(formats)

        video_title = self._html_search_regex(
            r'<h2\s+[^>]*class="uiHeaderTitle"[^>]*>([^<]*)</h2>', webpage,
            'title', default=None)
        if not video_title:
            video_title = self._html_search_regex(
                r'(?s)<span class="fbPhotosPhotoCaption".*?id="fbPhotoPageCaption"><span class="hasCaption">(.*?)</span>',
                webpage, 'alternative title', default=None)
        if not video_title:
            video_title = self._html_search_meta(
                'description', webpage, 'title', default=None)
        if video_title:
            video_title = limit_length(video_title, 80)
        else:
            video_title = 'Facebook video #%s' % video_id
        uploader = clean_html(get_element_by_id(

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Update youtube-dl or switch to yt-dlp, whose Facebook format extraction is actively maintained
  2. Retry after the live stream ends and is converted to a normal VOD
  3. Pass login cookies so Facebook returns the full set of sources
  4. If reproducible on the latest version, file an extractor issue including -v output

Example fix

# before
youtube_dl 'https://www.facebook.com/somepage/videos/987654321'
# ERROR: Cannot find video formats

# after
pip install -U yt-dlp
yt-dlp 'https://www.facebook.com/somepage/videos/987654321'
Defensive patterns

Strategy: try-catch

Try / catch

try:
    info = ydl.extract_info(url)
except ExtractorError as e:
    if 'Cannot find video formats' in str(e):
        skip_or_retry_after_stream_ends(url)

Prevention

When it happens

Trigger: After parsing video_data (single or from the tahoe/HTML paths), every candidate source is skipped because 'src' keys are missing, so 'if not formats: raise ExtractorError("Cannot find video formats")' fires. Seen with live streams whose metadata has no progressive src, DRM-wrapped sources, or format schema changes by Facebook.

Common situations: Attempting a Facebook Live URL mid-stream or post-stream with an old youtube-dl; extracting HD-only videos after a markup change; running youtube-dl versions from a different era than Facebook's current player payload.

Related errors


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