RepoPilot

ytdl-org / youtube-dl

Search ytdl-org/youtube-dl

GitHub

Code

How ytdl-org/youtube-dl is laid out, and where to start for common changes.

There is no import map for this report yet.

Where to start reading

  1. Repository root
  2. Repository root
  3. Likely public API
  4. Likely public API
  5. Likely start-up file
  6. Suggested starting pointAI
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add support for a new video platform

  • Register the extractor in the gen_extractors() function
  • Test with: python -m youtube_dl --extract-audio https://newsite.example.com/video/123

Add a new post-processor (e.g., metadata embedding)

  • Register in YoutubeDL._setup_postprocessors() or add --new-pp flag

Add a new download protocol (e.g., RTMP variant)

  • Register in the PROTOCOL_MAP dictionary in downloader/__init__.py

Add a new command-line option

  • Add argument definition to parseOpts() function
  • Pass the option to YoutubeDL() constructor as a dict parameter
  • Handle the option in YoutubeDL.__init__() or relevant prepare_*() method

Change the public API

Trace runtime behavior

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • Files marked “likely” are guessed from their names.

Code quality and hotspots

Largest source files

  • Branch points92 per file on average
  • Code issues0 errors, 59 warnings
  • Largest file6,864 lines
  • Hotspot load0 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CIGitHub Actions1 workflow
  • Tests70 test filesPytest · 0.08 test files per source file (file count, not coverage)
  • Dependency updatesNo config detected

Test folders: test · test/swftests

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.