Files
unshackle/docs/guide/output-and-naming.md
T

35 KiB

Output & Naming

This page tells you where unshackle writes finished downloads and how it names them. You control naming with output templates (the filename) and folder templates (the directory the file lands in). Both take {variable} placeholders that unshackle fills in from the downloaded media. This page also covers muxing options, release-group tagging, Unicode filenames, and how to relocate unshackle's working directories.

If you have not configured unshackle.yaml yet, read Configuration File first. Everything below lives in that file.

How unshackle assembles an output path

When a download finishes, unshackle builds the final path from three pieces:

<output directory> / <folder template> / <filename template><extension>
  • Output directory: directories.downloads from your config, or whatever you pass to -o/--output on the command line for a single run.
  • Folder template: an optional per-title subfolder. unshackle always puts TV episodes and songs in a folder. Movies only get one if you define a movies folder template, or a single-string folder template that applies to all title kinds (see Folder templates).
  • Filename template: the output_template for the title kind (movie, series, or song).
  • Extension: chosen by the muxer for a movie or an episode: .mkv for video, .mka for audio-only, .mks for subtitle-only, .mp4 for DTS:X Profile 2 and MPEG-H audio and 3D video. unshackle does not mux a song. It remuxes a song into the container of its codec, such as .flac, .opus, or .m4a. Read Music output files.

!!! example "A typical episode path" text /home/user/Downloads/ └─ Show Name S01 1080p EXAMPLE WEB-DL DDP5.1 H.264/ └─ Show.Name.S01E01.Pilot.1080p.EXAMPLE.WEB-DL.DDP5.1.H.264-TAG.mkv The folder name comes from the series folder template and the file from the series output template.

Two command-line flags change this layout for a single run:

Flag Effect
-o, --output Use this directory instead of directories.downloads.
--no-folder Skip the per-title subfolder; write the file directly into the output directory.
--no-source Omit the service source tag from both the filename and folder (the {source} variable resolves to empty).

Output templates

Filename templates live under the output_template config key, keyed by title kind. Each value is a format string built from {variable} placeholders.

output_template:
  movies: "{title}.{year}.{quality}.{source}.WEB-DL.{audio_full}.{video}-{tag}"
  series: "{title}.{season_episode}.{episode_name?}.{quality}.{source}.WEB-DL.{audio_full}.{video}-{tag}"
  songs: "{track_number}. {title}"

The kinds are movies, series, sports, songs and albums (folders only). The output_template reference gives what each kind applies to and what unshackle uses when you leave one out.

Required vs. optional variables

  • {variable}: required. If it is missing from the download's context, formatting raises an error. Note that most variables are always present in context. A variable that does not apply becomes an empty string, so "present but empty" is different from "missing".
  • {variable?}: optional. A trailing ? marks the variable conditional. When it is empty, unshackle removes the placeholder and one adjacent separator (., -, or space), so the surrounding text collapses cleanly.

!!! tip "Use ? for anything that is not always there" Episode names, editions, tags, HDR labels and audio extras are not present on every title. Mark them optional so you never get doubled dots or dangling separators:

```yaml
series: "{title}.{season_episode}.{episode_name?}.{quality}.{hdr?}.{source}-{tag?}"
```
For an episode with no on-screen name, `{episode_name?}` and its adjacent dot disappear.

Separator style (dots vs. spaces)

unshackle looks at the characters you place between variables to decide the filename's separator style. If spaces outnumber dots in your template, it sanitises with spaces. If not, it uses dots (the scene-style default). unshackle also applies this style to the auto-generated date separators of daily content, and to every segment of a nested folder template.

=== "Scene style (dots)"

```yaml
output_template:
  movies: "{title}.{year}.{quality}.{source}.WEB-DL.{audio_full}.{video}-{tag}"
```
```text
The.Movie.2024.1080p.EXAMPLE.WEB-DL.DDP5.1.H.264-TAG.mkv
```

=== "Readable style (spaces)"

```yaml
output_template:
  movies: "{title} ({year}) {quality} {source} WEB-DL {audio_full} {video}"
```
```text
The Movie (2024) 1080p EXAMPLE WEB-DL DDP5.1 H.264.mkv
```

Template variables

The template variable reference lists every variable, what it holds, and the templates that can use it. Two kinds of episode get special names.

Split episodes

A few services split one episode into several separately playable videos. Where a service reports that, unshackle folds the part index into {episode} and {season_episode}, so the stock series template names it with no change to your config.

Show.Name.S01E01.Part.2.1080p.EXAMPLE.WEB-DL.DDP5.1.H.264-TAG.mkv

The part token sits immediately after the episode token, before the quality tags, and the group tag stays last. Its separator follows your template's own style, the same way daily content does, so a spaced template gives S01E01 Part 2 instead.

The part is left out of the folder name, so every part of an episode lands in the same season folder:

The.Show.S01.1080p.EXAMPLE.WEB-DL.DDP5.1.H.264-TAG/
  ├─ The.Show.S01E01.Part.1.1080p.EXAMPLE.WEB-DL.DDP5.1.H.264-TAG.mkv
  ├─ The.Show.S01E01.Part.2.1080p.EXAMPLE.WEB-DL.DDP5.1.H.264-TAG.mkv
  └─ The.Show.S01E02.1080p.EXAMPLE.WEB-DL.DDP5.1.H.264-TAG.mkv

The same holds for a folder template of your own: {season} never picks up the part, and {season_episode} drops it inside a folder template. unshackle names an episode with no part like any other episode.

!!! note "What media servers do with the part token" The form above follows scene practice for genuinely split episodes. Kodi stacks the parts back into one playable episode automatically. Jellyfin lists two versions of S01E01, still correct and playable, because its stacking pattern expects the part marker at the end of the name. Plex uses a closed-source scanner, so what it does with text after the part token is not known.

For custom templates there is also a standalone {part} variable. You rarely want it, see the caveat on that page.

Sports events

A service can mark an episode as a sports event. That episode then uses the sports output template and the sports folder template, if you set them. Without them it uses the series templates, as before.

output_template:
  sports: "{title}.{year?}.{date?}.{episode_name}.{quality}.{source}.WEB-DL.{audio_full}.{video}-{tag}"
  folder:
    sports: "{title}.{year?}"

A sports template can use every series variable. {date} and {year} work differently there; see the template variable reference.

An event with a year and no air date, and an event with an air date:

League.2026/
  └─ League.2026.City.Grand.Prix.Practice.One.1080p.EXAMPLE.WEB-DL.AAC2.0.H.264-TAG.mkv
Club.League.2026/
  └─ Club.League.2026.11.01.Home.Club.vs.Away.Club.1080p.EXAMPLE.WEB-DL.AAC2.0.H.264-TAG.mkv

A sports folder template groups by {year}, or by the air year when the event has no year. {season}, {episode} and {season_episode} are not useful in a sports template. Use -w S01E02 to select an event: the season and episode numbers stay on the title.

Folder templates

Folder templates sit under a special folder config key inside output_template. unshackle reads this config key separately from the filename kinds. You can give it a single string (for all title kinds) or a per-kind map.

=== "Single folder template"

```yaml title="unshackle.yaml"
output_template:
  movies: "{title}.{year}.{quality}.{source}-{tag}"
  series: "{title}.{season_episode}.{quality}.{source}-{tag}"
  folder: "{title}.{year}"
```

=== "Per-kind folder templates"

```yaml title="unshackle.yaml"
output_template:
  movies: "{title}.{year}.{quality}.{source}-{tag}"
  series: "{title}.{season_episode}.{quality}.{source}-{tag}"
  folder:
    movies: "{title} ({year})"
    series: "{title} ({year})/Season {season}"
    albums: "{artist} - {album} ({year})"
```

The per-kind folder config keys are the output kinds. Any other config key gives a startup warning. Folder templates permit path separators (/ or \). unshackle formats each segment independently, so you can assemble nested directory structures like Show/Season 01. unshackle reads the separator style from the whole template, so it spaces every segment alike.

Fallback behaviour:

  • A per-kind folder template wins if present. If there is none, unshackle uses the single folder string. If there is no folder string either, unshackle falls back to a built-in default.
  • Built-in defaults when no folder template is set. Movies get no folder at all unless a movies folder template (or a single-string folder template) exists. Series fall back to a folder derived from the series output template (stripping {episode}, {episode_name}, and collapsing {season_episode} down to {season}). A sports event with no sports folder template uses the series folder template, or derives its folder from the sports output template when there is no folder template. Music albums fall back as the albums row gives.

!!! note "Movies are flat by default" Episodes and songs are always foldered. unshackle writes movies directly into the output directory unless you define a movies folder template (or a single-string folder template, which folders every kind). Set one if you want each movie in its own directory.

Music output files

A song does not go through the muxer. Music services deliver audio as a fragmented MP4, a WebM file or a plain audio file, and every download has a .mp4 name. A fragmented MP4 header states a length of zero, so a player stops after the first fragment. A rename cannot correct this, so unshackle remuxes each downloaded audio track into the container of its codec, then moves the file to its final path.

FFprobe reads the codec from the downloaded file. The codec that the service declares is used only when FFprobe cannot read the file.

Codec Extension
FLAC .flac
PCM, integer, 24-bit or less .flac
PCM, more than 24-bit or floating point .wav
Opus .opus
Vorbis .ogg
MP3 .mp3
DTS, DTS-HD .mka
AAC, ALAC, Dolby Digital, Dolby Digital Plus, and all other codecs .m4a

unshackle encodes FLAC and PCM to FLAC in this step. The audio does not change, but the new file states its true length. A plain copy cannot, because it keeps the source header and the zero in it. FLAC cannot hold floating-point PCM, and FFmpeg writes 32-bit FLAC only as an experimental feature, so that audio goes to .wav.

FFmpeg writes DTS into MP4 with the wrong codec entry, so DTS goes to Matroska. AC-4, MPEG-H and DTS:X Profile 2 (DTS-UHD) go through MP4Box, because FFmpeg cannot write them into MP4. MP4Box needs GPAC.

With --sample, the same step cuts the song to the sample window. If the window starts after the end of the song, unshackle shows a warning and keeps the full download.

unshackle writes no .mkv file for music, and the muxing options below do not apply.

The songs output template names the file. The albums folder template names the folder around it.

/home/user/Downloads/
  └─ The Artist - The Album (2024)/
     ├─ 01. First Track.flac
     └─ 02. Second Track.flac

Music metadata

After the file moves, unshackle writes the metadata into the audio file. It uses Vorbis comments for FLAC and Ogg, ID3 frames for MP3 and WAV, MP4 atoms for M4A, and Matroska tags for MKA. The tags hold the track title, artist, album artist, track and disc numbers, date, genre, ISRC, UPC, copyright, and record label. When the service gives them, unshackle also writes each artist of a song with several artists into ARTISTS, and the ReplayGain values into REPLAYGAIN_* tags. An Opus file gets no REPLAYGAIN_* tags, because RFC 7845 advises against them in Opus files. When tag and tag_group_name are set, unshackle also writes the group name into a GROUP tag.

unshackle embeds cover art when the service gives an artwork URL. It downloads the image and puts it in the file. With no artwork URL, it uses the first image attachment of the song. It converts a WebP image to JPEG. It skips an image larger than 16 MiB, the FLAC limit, with a warning. An MKA file gets no cover art.

unshackle writes lyrics when the service supplies them: a LYRICS Vorbis comment for FLAC, a USLT frame for MP3, and a ©lyr atom for M4A. Ogg uses the same LYRICS field as FLAC. unshackle does not write synchronized lyrics (SYLT).

The embedded lyrics are plain text. A service can also save timed lyrics in a file beside the audio, for example 08.Get.Lucky.lrc next to 08.Get.Lucky.m4a. A music player reads the timed lines from that file. The file also comes back to the client from a remote server.

A metadata fault does not stop the run. The file is already in place, so unshackle writes a warning and continues.

!!! note "--no-mux does not change music output" A song has no mux step, so --no-mux does not apply to it. The song gets the same file name, metadata, cover art and lyrics file as in a run without the flag.

Muxing options

!!! note "Height channels" A track with height channels is named bed.LFE.heights, such as 5.1.4.

Track names and language tags

When the service gives a track no name, unshackle names it with the English name of its language, such as English, Portuguese (Portugal) or Spanish (Latin America). The name leaves out the region that is the default for the language, so en-US is English and pt-BR is Portuguese, but en-GB is English (United Kingdom). A name from the service is kept as is. unshackle adds the SDH, CC, Forced or Descriptive label after either name.

A subtitle in a language with more than one script gets the script from its region:

Service tag Tag in the file Track name
zh-TW zh-Hant-TW Chinese (Traditional)
zh-HK zh-Hant-HK Chinese (Traditional, Hong Kong)
zh-CN zh-Hans-CN Chinese (Simplified)
sr-ME sr-Latn-ME Serbian (Latin, Montenegro)
zh zh Chinese

A tag without a region, such as zh, gets no script because the region is what tells the script. unshackle writes audio tags as the service gives them, because a script applies only to written text. Track selection, --list tags and file names use the service tag.

A service that knows the spoken language, such as Mandarin or Cantonese, gives the title language and the audio a region and no script, and gives the subtitles a script:

Tracks Mandarin, Taiwan Cantonese, Hong Kong
Title language and audio cmn-TW yue-HK
Subtitles zh-Hant or cmn-Hant yue-Hant

With these tags, -l orig selects the audio and -sl orig selects the Traditional subtitles. Do not mix the forms. A bare cmn implies Simplified Chinese, so a cmn title language makes -sl orig select Simplified subtitles. A zh-TW title language with cmn audio selects no audio, because zh-TW implies Traditional Chinese. Cantonese and Chinese never match, so -sl orig on a yue-HK title does not select zh-Hant subtitles; select them with -sl zh-Hant.

The {dual}, {multi} and {dubbed} file name tags count cmn as zh and keep yue separate (see dual_multi_mode).

Set muxing.track_names to native to name each track in its own language. The same rules apply to the script and the region:

muxing:
  track_names: native
Service tag Track name
zh-TW subtitle 中文(繁體)
zh-HK subtitle 中文(繁體,香港)
pt-PT Português (Portugal)
es-419 Español (Latinoamérica)
ja-JP 日本語

Set muxing.track_names to none to leave a track unnamed when the service gives it no name. An SDH, CC, Forced or Descriptive track then has only that label as its name.

The option also changes the names in --list and in the track_name field of the REST API.

Set muxing.original_label to add a label after the name of each audio and subtitle track in the title's original language. unshackle also sets the Matroska original flag on these tracks, but some players show only the name. MP4 output has no original flag, so there the label is the only marker:

muxing:
  original_label: "[Original]"
Track Track name
Japanese audio, original language Japanese [Original]
Japanese SDH subtitle, original language Japanese [Original] (SDH)
Korean subtitle Korean

The label can be any text, for example "| Original" or a label in another language. Put it in quotes: YAML reads an unquoted [Original] as a list, and an unquoted | Original stops the config from loading. unshackle ignores a value that is not text.

The label also applies to a name that the service sets, and to audio that a service keeps inside the video file. unshackle does not add the label when the name already contains its words, so a service name Original or Japanese (original) stays as it is.

!!! tip "Use an English label with Jellyfin 12" Jellyfin 12 adds its own "Original" to an original-language audio track from the flag, unless the name already contains the word. It adds none to a subtitle. A label in another language, such as [원어], then shows next to Jellyfin's "Original".

!!! note "Players that show the language next to the name" Some players, such as Jellyfin, show the track name and the language name together. They leave out the language when the name already contains it, so an English name shows once. A native name such as 日本語 shows next to Japanese in an English interface.

DTS:X Profile 2 and MPEG-H output

A title whose audio holds a dtsx or dtsy sample entry (DTS:X Profile 2, DTS-UHD), or an MPEG-H sample entry (mha1, mha2, mhm1, mhm2), muxes to MP4 with MP4Box, because Matroska has no CodecID for it. Without MP4Box installed the mux stops.

DTS:X Profile 1 is DTS-HD Master Audio and muxes to MKV as usual.

An MP4 title loses:

  • the default, forced, hearing-impaired and original track flags
  • attachments, such as subtitle fonts
  • SubStation Alpha (.ass) subtitles
  • container tags (mkvpropedit)

Audio Vivid output

No muxer carries Audio Vivid (AVS3-P3): Matroska has no CodecID for it, and FFmpeg and MP4Box cannot write it to MP4. unshackle leaves an Audio Vivid track out of the mux and saves its original MPEG-TS file beside the output, named like a --no-mux audio file (<name>.<language>.AV3A.ts).

Audio Vivid needs its own decoder, which you supply. unshackle does not ship one. A title whose only tracks are Audio Vivid is not muxed.

3D output

A stereoscopic 3D (MV-HEVC) video track also muxes to MP4 with MP4Box, because Matroska has no mapping for its second view and mkvmerge drops it. There is no 3D Matroska output. unshackle finds a 3D track from the manifest, or from a second video layer in the downloaded file. The MP4 title loses the same items as above. For a 3D title, unshackle also:

  • decrypts the track with mp4decrypt, whatever decryption selects
  • writes QuickTime chapters
  • keeps the whole downloaded segments of a --sample run, because the MP4Box cut removes the 3D signalling
  • does not repack the track or rewrite its colour metadata with FFmpeg
  • writes no --include-sample sample, because mkvmerge cuts only Matroska files
  • never uses the track in a HYBRID merge

A Dolby Vision profile 20 track has no HDR10 base layer, so a player without Dolby Vision shows wrong colours.

You configure muxing (the combination of video, audio, subtitle, chapter and attachment tracks into a single Matroska file with mkvmerge) under the muxing config key. unshackle muxes only movies and episodes. Read Music output files for what a music download does instead.

muxing:
  set_title: true
  merge_video: false
  merge_audio: true
  default_language:
    audio: en
    subtitle: en

The muxing reference gives the type, default and values of each config key.

When no track has the preferred language, unshackle applies sensible defaults. The video default falls back to the title language, then the original-language track, then the first track. The audio default is the original-language track. The subtitle default is a forced track in the language of the default audio track.

Set default_subtitle_type to give the subtitle default to a different type. default_subtitle_type: normal with default_language.subtitle: pl puts the flag on the full Polish track when the title also has a forced Polish track. Without default_language.subtitle, the first track of the type in file order gets the flag, and a forced track counts only in the language of the default audio track. When the title has no track of a listed type, the rules above apply.

!!! tip "Use normal for players that read the forced flag" A forced track always carries the Matroska forced flag. A player that reads it, such as mpv or Jellyfin in its Smart mode, shows the forced track when the audio is in your subtitle language and the default track when it is not. default_subtitle_type: forced puts the default flag on the forced track, and such a player then shows it in place of the full track.

!!! note "default_language only sets the default-track flag" default_language controls which track carries the MKV --default-track flag. Nothing else. It does not change track selection (that stays with -l/--a-lang and friends). It also does not touch which track carries the original flag: --original-flag still tags the true original-audio track. That is the point: you can make your player default to, say, Polish audio on an English-original title without altering the original marker. When the configured language is not present in the manifest, each track type falls back to its normal default rule described above.

!!! warning "merge_video collapses only the language dimension" merge_video groups video tracks by (resolution, range, codec) and merges them so that only language differs within a single file, with no re-encode and no concatenation. Different resolutions, ranges (SDR / HDR10 / HDR10+ / DV / HYBRID), and codecs (H.264 / H.265) always land in separate files. So -r HYBRID,DV,HDR10,SDR --merge-video gives one file per range, never a single fused file. English and French video of identical resolution, range, and codec gives one file that holds both video tracks. merge_audio works the same way for audio languages.

A few muxing behaviors are automatic and not configurable:

  • The output has no encoding date: mkvmerge gets --no-date and MP4Box gets -for-test.
  • Descriptive audio gets the visually-impaired flag. SDH subtitles get the hearing-impaired flag. Forced subtitles get the forced flag.
  • unshackle writes the chapters from the title's chapter list (see Chapters below).

The --no-mux flag skips muxing entirely and writes the individual track files, each with a track-type suffix, into the same output/folder structure. An audio track in an MP4 container gets the .m4a extension. A track that shaka-packager decrypts has its date set to 1970-01-01; other tracks keep the date of the source file.

Two output files of one title never get the same name. When a name is already in use, the second file gets the separator of the output template and a number, starting at 2. For example, an audio-description track in the same language and codec as the main audio is saved as <name>.en.AAC.2.m4a. With --split-audio, a muxed file whose name is already on disk first gets the name of its audio codec.

Sample files

--sample and --include-sample write a sample into a Sample folder inside the output folder of the title. The sample keeps the filename of the title, with a SAMPLE tag at the end. The tag uses the separator of the output template. --include-sample cuts the sample with mkvmerge, so a title that muxes to MP4 gets no sample.

Some.Movie.2026.1080p.EXAMPLE.WEB-DL.H.264-TAG/
├── Some.Movie.2026.1080p.EXAMPLE.WEB-DL.H.264-TAG.mkv
└── Sample/
    └── Some.Movie.2026.1080p.EXAMPLE.WEB-DL.H.264-TAG.SAMPLE.mkv

With --sample, the Sample folder holds the only output file. If the run makes no title folder, the Sample folder is in the downloads directory.

Tags & group naming

The release-group tag is the -TAG portion at the end of scene-style names, which the {tag} variable gives. You can swap it per release with tag_rules: ordered rules whose conditions read the release-attribute variables only (quality, resolution, hdr, source, lang_tag, title_type, and so on), and the first rule that matches wins. tag_rules cannot read the title's own fields, such as title and season_episode. See the reference page for the exact list.

tag: "MYGROUP"
tag_group_name: true
tag_imdb_tmdb: true

The tagging keys give the type and default of tag, tag_group_name and tag_imdb_tmdb. unshackle writes the IDs as the Matroska IMDB, TMDB, and TVDB2 tags. TVDB2 values carry the entity prefix the Matroska tagging spec requires: series/73871 for a show, movies/113 for a film.

You can override the tag per run without editing config:

unshackle dl --tag OTHERGROUP EXAMPLE "..."

The --repack flag adds the REPACK marker (surfaced through the {repack} variable) to the filename for that run:

unshackle dl --repack EXAMPLE "..."

!!! note "Empty tags collapse cleanly" If config.tag is empty and your template ends with -{tag?}, the trailing - and the placeholder are both removed. Use the optional form {tag?} if you sometimes download without a tag set.

Unicode filenames

By default unshackle transliterates non-ASCII characters into ASCII equivalents. Korean, Japanese, Chinese, and accented Latin are examples. This is safest for older tools, DDL, and P2P sharing. Set unicode_filenames to keep the native characters.

unicode_filenames: true

The unicode_filenames row gives both values. A title that a service sends in composed form and in decomposed form gives the same name.

Regardless of this setting, unshackle always removes or replaces a set of filesystem-unsafe and structural characters during sanitisation. For example, / and ; become &, and unshackle removes characters like \ * ! ? , ' " < > | $ # ~. This is why you must never put path-unsafe characters directly in a template. To change other text in a name, such as & to and, use filename_replacements.

unshackle warns at startup about a template that contains < > : " / \ | ? *. It examines a folder template per path segment, so you can use / there as a directory separator.

Directory & filename configuration

The directories config key moves unshackle's working folders, such as downloads, temp and cache. The filenames config key changes the names of unshackle's own working files, such as logs and the chapters file; it does not change the names of your media files. The Directories reference lists each folder and each file name, with its default.

Chapters naming

When a title has chapters, unshackle writes them to an OGM chapters file (filenames.chapters) and passes it to the muxer. A chapter with no name gets the chapter_fallback_name template:

chapter_fallback_name: "Chapter {i:02}"

Removed & migrated options

!!! warning "scene_naming was removed" The old scene_naming option no longer exists. If it is present in your config, unshackle exits immediately with an error asking you to configure output_template instead. Migrate any scene-naming setup to the templates described on this page.

Worked examples

Each tab shows a template and what it produces for a few different downloads, so you can see how the optional (?) variables appear and disappear.

=== "Movies"

```yaml
output_template:
  movies: "{title}.{year}.{edition?}.{quality}.{source}.WEB-DL.{audio_full}.{atmos?}.{video}.{hdr?}-{tag?}"
  folder:
    movies: "{title} ({year})"
```

A 4K Atmos HDR download fills every placeholder:

```text
The Movie (2024)/
  └─ The.Movie.2024.2160p.EXAMPLE.WEB-DL.DDP5.1.Atmos.H.265.HDR-TAG.mkv
```

The same template on a plain 1080p SDR stereo download, where `{edition?}`, `{atmos?}`
and `{hdr?}` collapse along with their dots:

```text
The Movie (2024)/
  └─ The.Movie.2024.1080p.EXAMPLE.WEB-DL.AAC2.0.H.264-TAG.mkv
```

A director's cut fills `{edition?}`:

```text
The Movie (2024)/
  └─ The.Movie.2024.Directors.Cut.2160p.EXAMPLE.WEB-DL.DDP5.1.Atmos.H.265.DV.HDR-TAG.mkv
```

=== "TV series"

```yaml
output_template:
  series: "{title}.{season_episode}.{episode_name?}.{quality}.{source}.WEB-DL.{audio_full}.{video}-{tag}"
  folder:
    series: "{title} ({year})/Season {season}"
```
```text
The Show (2023)/Season S02/
  └─ The.Show.S02E04.The.Reckoning.2160p.EXAMPLE.WEB-DL.DDP5.1.H.265-TAG.mkv
```

unshackle decides the separator style once for the whole folder template, and every
segment then follows it. Spaces outnumber dots in `{title} ({year})/Season {season}`,
so `Season {season}` keeps its space even though it holds only one variable.

When an episode has no on-screen name, `{episode_name?}` disappears cleanly:

```text
The Show (2023)/Season S02/
  └─ The.Show.S02E05.2160p.EXAMPLE.WEB-DL.DDP5.1.H.265-TAG.mkv
```

=== "Multi-language"

Place `{dual?}`, `{multi?}` and `{dubbed?}` next to each other. At most one of them is
ever set (see [`dual_multi_mode`](../reference/configuration/download.md#dual_multi_mode)), and the
empty ones collapse:

```yaml
output_template:
  movies: "{title}.{year}.{quality}.{source}.WEB-DL.{dual?}.{multi?}.{dubbed?}.{audio_full}.{video}-{tag}"
```

Original English audio plus a French dub (`-l en,fr`):

```text
The.Movie.2024.1080p.EXAMPLE.WEB-DL.DUAL.DDP5.1.H.264-TAG.mkv
```

Original plus several dubs (`-l en,fr,de,es`):

```text
The.Movie.2024.1080p.EXAMPLE.WEB-DL.MULTi.DDP5.1.H.264-TAG.mkv
```

Only a dub, original audio left out (`-l de` on an English-original title):

```text
The.Movie.2024.1080p.EXAMPLE.WEB-DL.DUBBED.DDP5.1.H.264-TAG.mkv
```

Two dialects of one language (`en-US` + `en-GB`) count as a single language, so none of the
three variables is set:

```text
The.Movie.2024.1080p.EXAMPLE.WEB-DL.DDP5.1.H.264-TAG.mkv
```

For finer control (for example a `SUBBED` tag driven by subtitle languages), use `{lang_tag?}`
with [`language_tags` rules](../reference/configuration/download.md#language_tags) instead.

=== "Daily shows"

Daily content needs no special template. When an episode carries an air date,
`{season_episode}` becomes the date automatically and `{episode}` and `{year}` clear:

```yaml
output_template:
  series: "{title}.{season_episode}.{episode_name?}.{quality}.{source}.WEB-DL.{audio_full}.{video}-{tag}"
```

A normal episode and a dated one, same template:

```text
The.Daily.Show.S28E101.1080p.EXAMPLE.WEB-DL.DDP5.1.H.264-TAG.mkv
The.Daily.Show.2024.06.01.1080p.EXAMPLE.WEB-DL.DDP5.1.H.264-TAG.mkv
```

The date separator follows your template style: dots here, spaces if your `series`
template uses spaces.

In folder names, `{season}` becomes the air year (`Season 2024` style grouping), and
unshackle skips a `{year?}` in the folder template when it would only repeat that year.

=== "Music"

```yaml
output_template:
  songs: "{track_number}. {title}"
  folder:
    albums: "{album_artist} - {album} ({year})"
```
```text
The Artist - The Album (2024)/
  └─ 01.Opening.Track.mka
```

In `"{track_number}. {title}"` the number of dots and spaces is equal, and a tie goes to
dot style. Add more spaces between variables (as below) if you want space-separated names.

A multi-disc album with explicit tracks, using more of the music variables. `{disc}` is
empty on disc 1, so `{disc?}` and its separator only appear from disc 2 onward:

```yaml
output_template:
  songs: "{disc?}-{track_number}. {title} {explicit?}"
  folder:
    albums: "{album_artist} - {album} ({year}) [{label?}]"
```
```text
The Artist - The Album (2024) [The Label]/
  ├─ 01. Opening Track.mka
  └─ 02-03. Closing Track Explicit.mka
```

See also

  • Configuration File: the full unshackle.yaml structure.
  • Downloading: the dl command and per-run flags like -o, --no-folder, --tag, and --repack.