Overview
yt-dlp can extract, parse, modify, and embed metadata in your downloaded files. This is useful for organizing media libraries, fixing incorrect information, or adding custom metadata fields.Understanding Metadata Flow
Metadata modification happens in this order:- Extraction: Metadata obtained from the website
- Parsing: Custom parsing with
--parse-metadata - Replacement: Text replacement with
--replace-in-metadata - Format selection: Uses modified metadata
- Post-processing: Embedding metadata in files
- Final output: File with embedded metadata
Parsing Metadata
Basic syntax
The--parse-metadata FROM:TO option extracts data from one field and creates or modifies another:
Extract from title
Extract from description
1
Simple pattern matching
2
Multi-line matching
3
Extract URLs
Modifying File Metadata
Use themeta_ prefix to set metadata that will be embedded in the file:
Common metadata fields
Default Metadata Mappings
yt-dlp automatically maps these fields to file metadata:Replacing Text in Metadata
Use--replace-in-metadata to find and replace text:
Removing Metadata Fields
Set fields to empty to remove them:Advanced Metadata Examples
Music downloads
TV series episodes
Podcast episodes
Clean YouTube titles
Metadata for Different Streams
Set metadata for individual streams usingmeta<n>_ prefix:
Copy Metadata Between Fields
Timing and Execution
Control when metadata parsing happens:Embedding Metadata
After parsing and modifying metadata, embed it in the file:1
Enable metadata embedding
2
Control what gets embedded
3
Verify embedded metadata
Regular Expression Tips
Common patterns
Example patterns
Troubleshooting
Metadata not embedding
Regex not matching
Wrong metadata in file
Next Steps
Output Templates
Use metadata in filename templates
Post-Processing
Learn about post-processing options
Audio Extraction
Embed metadata in audio files
Format Selection
Use metadata in format selection