yt-dlp supports a plugin system that allows you to extend its functionality by adding custom extractors and postprocessors without modifying the core codebase.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/yt-dlp/yt-dlp/llms.txt
Use this file to discover all available pages before exploring further.
Plugin Structure
Plugins are installed in ayt_dlp_plugins namespace package. The plugin system searches for these packages in multiple locations and loads them automatically.
Package Structure
yt-dlp looks for
yt_dlp_plugins namespace folders in many locations and loads plugins from all of them.Installing Plugins
Plugins can be installed using various methods and locations.1. Configuration Directories
Plugin packages can be dropped into standard configuration locations:User Plugins
System Plugins
2. Executable Location
For portable installations, plugin packages can be installed in ayt-dlp-plugins directory:
3. pip and PYTHONPATH
Install with pip
Plugin packages can be installed and managed usingpip:
PYTHONPATH
Any path inPYTHONPATH is searched for the yt_dlp_plugins namespace folder.
This does not apply for PyInstaller builds.
4. Archive Formats
.zip, .egg, and .whl archives containing a yt_dlp_plugins namespace folder in their root are also supported:
mypluginpkg.zip contains:
Verifying Plugin Installation
Run yt-dlp with--verbose to check if the plugin has been loaded:
Developing Plugins
Plugin Discovery
All public classes with names ending inIE (extractors) or PP (postprocessors) are automatically imported from each file:
- Underscore prefix indicates private classes (e.g.,
_MyBasePluginIE) - Respects
__all__declarations - Modules can be excluded by prefixing the module name with an underscore (e.g.,
_myplugin.py)
Example Plugin Structure
yt_dlp_plugins/extractor/myplugin.py
Replacing Existing Extractors
To replace an existing extractor with a subclass, set theplugin_name class keyword argument:
Plugin Class Loading
Fromyt_dlp/plugins.py:182-191:
Disabling Plugins
Set the environment variableYTDLP_NO_PLUGINS to disable loading plugins entirely:
Plugin Directories
You can specify custom plugin directories using the--plugin-dirs option: