Skip to content

What are Filename Templates? ​

Filename templates are a way of sending arguments to yt-dlp to configure how a download item's file name is written.

Example Template:

%(uploader).30B - %(title).170B

Example Output:

Eminem - Rap God

This template tells yt-dlp to use the video uploader not longer than 30 bytes and the title not longer than 170 bytes.

Filename templates are created through metadata tags which can look like:

%(tagname)s

The suggested section gives you all the possible tags that yt-dlp supports. This doesn't mean that your download item will be able to translate them if it doesn't have the metadata. e.g. using a playlist tag on a single item download

Where to set them ​

  • Default for all downloads: More -> Settings -> Folders Filename template. There is one for video and one for audio.
  • For a single download: the Filename Template option in the Download Card.
  • For several items at once: in the Multiple Download Card.
  • In the Terminal, from the toolbar menu.

While editing, a Preview filename shows you what the result will look like for the current item. Templates you use can be saved under My filename templates so you can pick them again later.

Common tags ​

TagMeaning
%(title)sVideo title
%(uploader)sFull name of the uploader
%(channel)sName of the channel
%(id)sVideo identifier
%(upload_date)sUpload date, YYYYMMDD
%(duration_string)sLength, HH:mm:ss
%(playlist)sPlaylist id or title
%(playlist_title)sName of the playlist
%(playlist_index)sIndex of the item in the playlist
%(playlist_autonumber)sPosition of the item in the download queue
%(autonumber)sNumber that increases with each download
%(rownumber)sRow number of the item when downloading multiple items
%(artist)s, %(album)s, %(track)sMusic metadata, when the website has it
%(webpage_url_domain)sThe domain of the website
%(resolution)sResolution of the format
%(extractor)sName of the extractor
`%(playlist_index,playlist_autonumber&{}.)s%(title)s`

The app lists every tag yt-dlp supports with their type, in the suggestions below the text field. Tap a tag to insert it.

Trimming and formatting ​

You can limit the length of a tag. %(title).170B limits the title to 170 bytes, and is useful because Android has a limit on how long a file name can be. The default template %(uploader).30B - %(title).170B keeps names inside that limit. Also see Trim filenames in More -> Settings -> Folders.

Other yt-dlp output template features such as default values (%(uploader|Unknown)s) and alternates (%(artist,uploader)s) also work. See the yt-dlp documentation.

Downloading in a Sub-Folder ​

Example template:

mysubfoldername/%(title)s

This will download your file in your preferred download location, create the mysubfoldername folder and then put the downloaded file named after the title.

You can take this a step further by using tags. Such as using Playlist name as subfoldername:

%(playlist)s/%(playlist_index)s - %(title)s

No template needed

If you only need a simple structure, you don't have to write a template. Use Save to subdirectory in More -> Settings -> Folders to automatically put downloads in folders named after the website, the playlist or the media type.

Extension Tag

The tag %(ext)s which represents the file extension format is automatically inserted by the application and you don't need to write it down in your filename template