Skip to main content

Overview

Post-processing in yt-dlp allows you to automatically manipulate downloaded files through various operations like format conversion, metadata embedding, subtitle processing, and custom commands.

Post-Processing Pipeline

Post-processors run in this order:
  1. Pre-process: After video extraction, before format selection
  2. After filter: After video passes filters
  3. Video: After format selection, before download
  4. Before download: Before each video download
  5. Post-process: After each video download (default)
  6. After move: After moving to final location
  7. After video: After processing all formats of a video
  8. Playlist: At end of playlist

Audio Extraction

Convert videos to audio-only files:
See the Audio Extraction guide for detailed examples.

Format Conversion

Remuxing

Change container without re-encoding:

Re-encoding

Re-encoding reduces quality and takes longer. Use only when necessary.

Metadata Operations

Embedding metadata

1

Basic metadata

Embeds video metadata and chapters (in MKV, also embeds infojson).
2

Additional metadata

3

Complete embedding

Modifying metadata

See the Metadata Modification guide for detailed examples.

Subtitle Processing

Download and convert

Thumbnail Processing

Chapter Operations

Splitting by chapters

Removing chapters

Modifying chapters

SponsorBlock Integration

Remove or mark sponsor segments in YouTube videos:
See the SponsorBlock guide for detailed usage.

File Fixup

Automatically fix common file issues:

Custom Post-Processors

Execute commands

Post-Processor Arguments

Pass custom arguments to ffmpeg and other post-processors:

Concatenating Playlists

Merge playlist videos into single file:
All videos must have the same codecs and number of streams to be concatenable.

Plugin Post-Processors

Use custom post-processor plugins:

Advanced Workflows

Music downloads

Archival with metadata

Format for devices

Stream processing

Overwrite Behavior

Keeping Intermediate Files

Troubleshooting

Post-processing fails

Metadata not embedding

Thumbnail not embedding

Next Steps

Audio Extraction

Detailed audio extraction guide

Format Conversion

Converting between formats

Metadata Modification

Parse and modify metadata

SponsorBlock

Remove sponsor segments