Skip to content

Output templates

Claude edited this page Sep 25, 2026 · 1 revision

MeTube names downloaded files with yt-dlp output templates. For example recipes, see the OUTPUT_TEMPLATE Cookbook.

Which template applies

It depends on how the download was added:

Added as Template Default
A single video OUTPUT_TEMPLATE %(title)s.%(ext)s
Part of a playlist OUTPUT_TEMPLATE_PLAYLIST %(playlist_title)s/%(title)s.%(ext)s
Part of a channel OUTPUT_TEMPLATE_CHANNEL %(channel)s/%(title)s.%(ext)s

Set the playlist or channel template to empty to name those items with OUTPUT_TEMPLATE too.

A / in a template creates folders. They are created inside the download directory — or inside the folder picked in the Download Folder field, when CUSTOM_DIRS is on.

With Split by chapters on, each chapter is also saved as a separate file, named by the Template field that appears next to the switch. OUTPUT_TEMPLATE_CHAPTER sets that field's starting value, %(title)s - %(section_number)02d - %(section_title)s.%(ext)s by default.

Long filenames

A filename that would exceed the limit the filesystem accepts is shortened to fit, keeping its extension, with room left for the suffixes yt-dlp adds while downloading. Sites that put a long description in the title would otherwise fail the download outright with File name too long. Use trim_file_name in YTDL_OPTIONS if you want names shorter than the filesystem's own limit, or restrictfilenames to strip non-ASCII characters.

Playlist and channel metadata files

Enabling writeinfojson or writethumbnail in YTDL_OPTIONS also writes a feed-level .info.json and thumbnail when you add a playlist or channel. These reuse the template of the items they belong to — OUTPUT_TEMPLATE_CHANNEL or OUTPUT_TEMPLATE_PLAYLIST — evaluated against the feed itself, so with the defaults they land in the same folder as the videos, named after the feed. Set allow_playlist_files to false in YTDL_OPTIONS to skip them.

Clone this wiki locally