yt-dlp.app

Reference

Setting the yt-dlp Download Location

Control exactly where yt-dlp saves files: set a folder with -P, build filenames and subfolders with -o output templates, and make it permanent in your config.

Updated 2026-06-13

yt-dlp gives you two tools for placement: -P sets the destination folder, and -o defines the filename (and any subfolders). Together they control exactly where every file lands.

Set the output folder with -P

yt-dlp -P "~/Videos" "<URL>"

Build filenames with -o output templates

Templates use %(field)s placeholders that yt-dlp fills from the video's metadata:

yt-dlp -o "%(uploader)s/%(title)s [%(id)s].%(ext)s" "<URL>"
FieldExample value
%(title)sNever Gonna Give You Up
%(id)sdQw4w9WgXcQ
%(uploader)sRick Astley
%(upload_date)s20091025
%(playlist_index)s03
%(ext)smp4

Combine -P and -o

yt-dlp -P "~/Media" -o "%(uploader)s/%(title)s.%(ext)s" "<URL>"

-P sets the base; -o adds structure below it. Subfolders in the template are created automatically.

Make it the default

Move these into your config file so they apply to every run. See also default download location and where does yt-dlp download to.

Frequently asked questions

What's the difference between -P and -o?+
-P sets the destination directory. -o sets the filename template and can include subfolders. Use both together for full control.
Do output-template subfolders get created automatically?+
Yes. If your -o template includes a path like %(uploader)s/, yt-dlp creates those folders as needed.
Can I use absolute paths?+
Absolutely — -P "/mnt/media" or -o "D:\\Videos\\%(title)s.%(ext)s" both work.

Related guides

Get the full power of yt-dlp — without the command line

Download the free desktop app for Windows, macOS and Linux. It installs everything for you and keeps its engine up to date automatically.