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
- Repository root
- Repository root
- Likely public API
- Likely public API
- Likely start-up file
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
Find files for a task
AIAdd 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.