Files
unshackle/reference/configuration/output/index.html
T
2026-12-05 03:00:15 +00:00

2879 lines
75 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="Movie, TV, and Music archival software. User guide and REST API reference">
<link rel="canonical" href="https://docs.unshackle.dev/reference/configuration/output/">
<link rel="prev" href="../download/">
<link rel="next" href="../drm/">
<link rel="icon" href="../../../assets/favicon.svg">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.8.2">
<title>Output & Naming Options - unshackle</title>
<link rel="stylesheet" href="../../../assets/stylesheets/main.57a0d79d.min.css">
<link rel="stylesheet" href="../../../assets/stylesheets/palette.fb2fffe2.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<link rel="stylesheet" href="../../../assets/_mkdocstrings.css">
<link rel="stylesheet" href="../../../assets/extra.css">
<script>__md_scope=new URL("../../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="black" data-md-color-accent="indigo">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#output-naming" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../.." title="unshackle" class="md-header__button md-logo" aria-label="unshackle" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="m800-274-80-80v-206H514l-80-80h166v-80q0-50-34.5-85T481-840q-50 0-84 34.5T363-720v9l-73-73q22-61 75-98.5T481-920q83 0 141 58.5T680-720v80h40q33 0 56.5 23.5T800-560v286Zm20 246-62-62q-11 5-20 7.5T720-80H240q-33 0-56.5-23.5T160-160v-400q0-25 14.5-46t37.5-30L28-820l56-56L876-84l-56 56ZM686-160 539-309q-11 11-25.5 17t-31.5 6q-33 0-56.5-23.5T402-366q0-17 6-31.5t17-25.5L286-560h-46v400h446ZM486-360Zm131-97Z"/></svg>
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
unshackle
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Output & Naming Options
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="(prefers-color-scheme)" data-md-color-scheme="default" data-md-color-primary="black" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_0">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7a5 5 0 0 0-5 5 5 5 0 0 0 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4a5 5 0 0 0 5-5 5 5 0 0 0-5-5"/></svg>
</label>
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="black" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 7H7a5 5 0 0 0-5 5 5 5 0 0 0 5 5h10a5 5 0 0 0 5-5 5 5 0 0 0-5-5m0 8a3 3 0 0 1-3-3 3 3 0 0 1 3-3 3 3 0 0 1 3 3 3 3 0 0 1-3 3"/></svg>
</label>
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="black" data-md-color-accent="indigo" aria-label="Switch to system preference" type="radio" name="__palette" id="__palette_2">
<label class="md-header__button md-icon" title="Switch to system preference" for="__palette_0" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 7H7a5 5 0 0 0-5 5 5 5 0 0 0 5 5h10a5 5 0 0 0 5-5 5 5 0 0 0-5-5M7 15a3 3 0 0 1-3-3 3 3 0 0 1 3-3 3 3 0 0 1 3 3 3 3 0 0 1-3 3"/></svg>
</label>
</form>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<a href="javascript:void(0)" class="md-search__icon md-icon" title="Share" aria-label="Share" data-clipboard data-clipboard-text="" data-md-component="search-share" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.15c-.05.21-.08.43-.08.66 0 1.61 1.31 2.91 2.92 2.91s2.92-1.3 2.92-2.91A2.92 2.92 0 0 0 18 16.08"/></svg>
</a>
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
</button>
</nav>
<div class="md-search__suggest" data-md-component="search-suggest"></div>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/unshackle-dl/unshackle" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
</div>
<div class="md-source__repository">
unshackle-dl/unshackle
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
<div class="md-grid">
<ul class="md-tabs__list">
<li class="md-tabs__item">
<a href="../../.." class="md-tabs__link">
Home
</a>
</li>
<li class="md-tabs__item">
<a href="../../../getting-started/installation/" class="md-tabs__link">
Getting Started
</a>
</li>
<li class="md-tabs__item">
<a href="../../../guide/downloading/" class="md-tabs__link">
User Guide
</a>
</li>
<li class="md-tabs__item md-tabs__item--active">
<a href="../" class="md-tabs__link">
Configuration
</a>
</li>
<li class="md-tabs__item">
<a href="../../../dev/creating-a-service/" class="md-tabs__link">
Developer
</a>
</li>
</ul>
</div>
</nav>
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../../.." title="unshackle" class="md-nav__button md-logo" aria-label="unshackle" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="m800-274-80-80v-206H514l-80-80h166v-80q0-50-34.5-85T481-840q-50 0-84 34.5T363-720v9l-73-73q22-61 75-98.5T481-920q83 0 141 58.5T680-720v80h40q33 0 56.5 23.5T800-560v286Zm20 246-62-62q-11 5-20 7.5T720-80H240q-33 0-56.5-23.5T160-160v-400q0-25 14.5-46t37.5-30L28-820l56-56L876-84l-56 56ZM686-160 539-309q-11 11-25.5 17t-31.5 6q-33 0-56.5-23.5T402-366q0-17 6-31.5t17-25.5L286-560h-46v400h446ZM486-360Zm131-97Z"/></svg>
</a>
unshackle
</label>
<div class="md-nav__source">
<a href="https://github.com/unshackle-dl/unshackle" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
</div>
<div class="md-source__repository">
unshackle-dl/unshackle
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../.." class="md-nav__link">
<span class="md-ellipsis">
Home
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" >
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
<span class="md-ellipsis">
Getting Started
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
Getting Started
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../getting-started/installation/" class="md-nav__link">
<span class="md-ellipsis">
Installation
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../getting-started/quickstart/" class="md-nav__link">
<span class="md-ellipsis">
Quick Start
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../getting-started/configuration-file/" class="md-nav__link">
<span class="md-ellipsis">
The Configuration File
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
<span class="md-ellipsis">
User Guide
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
User Guide
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../guide/downloading/" class="md-nav__link">
<span class="md-ellipsis">
Downloading
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../guide/cli-reference/" class="md-nav__link">
<span class="md-ellipsis">
CLI Reference
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../guide/drm-and-cdm/" class="md-nav__link">
<span class="md-ellipsis">
DRM & CDM Setup
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../guide/proxies-and-vpn/" class="md-nav__link">
<span class="md-ellipsis">
Proxies & VPN
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../guide/vaults/" class="md-nav__link">
<span class="md-ellipsis">
Key Vaults
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../guide/output-and-naming/" class="md-nav__link">
<span class="md-ellipsis">
Output & Naming
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../guide/subtitles/" class="md-nav__link">
<span class="md-ellipsis">
Subtitles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../guide/troubleshooting/" class="md-nav__link">
<span class="md-ellipsis">
Troubleshooting
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_9" >
<div class="md-nav__link md-nav__container">
<a href="../../../dev/rest-api/" class="md-nav__link ">
<span class="md-ellipsis">
Server
</span>
</a>
<label class="md-nav__link " for="__nav_3_9" id="__nav_3_9_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_9_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3_9">
<span class="md-nav__icon md-icon"></span>
Server
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../dev/rest-api/authentication/" class="md-nav__link">
<span class="md-ellipsis">
Authentication
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../dev/rest-api/dashboard/" class="md-nav__link">
<span class="md-ellipsis">
Dashboard
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../guide/remote-sessions/" class="md-nav__link">
<span class="md-ellipsis">
Remote Sessions
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" checked>
<div class="md-nav__link md-nav__container">
<a href="../" class="md-nav__link ">
<span class="md-ellipsis">
Configuration
</span>
</a>
<label class="md-nav__link " for="__nav_4" id="__nav_4_label" tabindex="">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_4">
<span class="md-nav__icon md-icon"></span>
Configuration
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../directories/" class="md-nav__link">
<span class="md-ellipsis">
Directories
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../services/" class="md-nav__link">
<span class="md-ellipsis">
Services & Authentication
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../download/" class="md-nav__link">
<span class="md-ellipsis">
Download & Processing
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
<span class="md-ellipsis">
Output & Naming Options
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
Output & Naming Options
</span>
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#output_template" class="md-nav__link">
<span class="md-ellipsis">
output_template
</span>
</a>
<nav class="md-nav" aria-label="output_template">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#template-variables" class="md-nav__link">
<span class="md-ellipsis">
Template variables
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#tagging-naming-keys" class="md-nav__link">
<span class="md-ellipsis">
Tagging &amp; naming keys
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#codec_names" class="md-nav__link">
<span class="md-ellipsis">
codec_names
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#filename_replacements" class="md-nav__link">
<span class="md-ellipsis">
filename_replacements
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#tag_rules" class="md-nav__link">
<span class="md-ellipsis">
tag_rules
</span>
</a>
<nav class="md-nav" aria-label="tag_rules">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#operators" class="md-nav__link">
<span class="md-ellipsis">
Operators
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../drm/" class="md-nav__link">
<span class="md-ellipsis">
DRM & CDM
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../network/" class="md-nav__link">
<span class="md-ellipsis">
Network & Proxy
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../vaults/" class="md-nav__link">
<span class="md-ellipsis">
Key Vault Options
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../post-scripts/" class="md-nav__link">
<span class="md-ellipsis">
Post-Scripts
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../misc/" class="md-nav__link">
<span class="md-ellipsis">
Other Settings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../example/" class="md-nav__link">
<span class="md-ellipsis">
Annotated Example
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
<span class="md-ellipsis">
Developer
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
Developer
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../dev/creating-a-service/" class="md-nav__link">
<span class="md-ellipsis">
Creating a Service
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../dev/service-architecture/" class="md-nav__link">
<span class="md-ellipsis">
Service Architecture
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_3" >
<label class="md-nav__link" for="__nav_5_3" id="__nav_5_3_label" tabindex="0">
<span class="md-ellipsis">
REST API
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5_3">
<span class="md-nav__icon md-icon"></span>
REST API
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../dev/rest-api/quickstart/" class="md-nav__link">
<span class="md-ellipsis">
REST API Quick Start
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../dev/rest-api/endpoints/" class="md-nav__link">
<span class="md-ellipsis">
Endpoints
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../dev/rest-api/job-lifecycle/" class="md-nav__link">
<span class="md-ellipsis">
Job Lifecycle
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../dev/rest-api/errors/" class="md-nav__link">
<span class="md-ellipsis">
Error Responses
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../dev/rest-api/remote-sessions/" class="md-nav__link">
<span class="md-ellipsis">
Remote Session Protocol
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_4" >
<label class="md-nav__link" for="__nav_5_4" id="__nav_5_4_label" tabindex="0">
<span class="md-ellipsis">
Python API
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5_4">
<span class="md-nav__icon md-icon"></span>
Python API
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../api/service/" class="md-nav__link">
<span class="md-ellipsis">
Service
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../api/config/" class="md-nav__link">
<span class="md-ellipsis">
Config
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../api/tracks/" class="md-nav__link">
<span class="md-ellipsis">
Tracks
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../api/titles/" class="md-nav__link">
<span class="md-ellipsis">
Titles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../api/drm/" class="md-nav__link">
<span class="md-ellipsis">
DRM
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#output_template" class="md-nav__link">
<span class="md-ellipsis">
output_template
</span>
</a>
<nav class="md-nav" aria-label="output_template">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#template-variables" class="md-nav__link">
<span class="md-ellipsis">
Template variables
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#tagging-naming-keys" class="md-nav__link">
<span class="md-ellipsis">
Tagging &amp; naming keys
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#codec_names" class="md-nav__link">
<span class="md-ellipsis">
codec_names
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#filename_replacements" class="md-nav__link">
<span class="md-ellipsis">
filename_replacements
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#tag_rules" class="md-nav__link">
<span class="md-ellipsis">
tag_rules
</span>
</a>
<nav class="md-nav" aria-label="tag_rules">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#operators" class="md-nav__link">
<span class="md-ellipsis">
Operators
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="output-naming">Output &amp; Naming<a class="headerlink" href="#output-naming" title="Permanent link">&para;</a></h1>
<p>Keys that control the output filename, the per-title subfolder, release-group tagging, and
filename character handling. For how unshackle builds a path, and for worked naming examples, see
the <a href="../../../guide/output-and-naming/">Output &amp; naming guide</a>.</p>
<h2 id="output_template"><code>output_template</code><a class="headerlink" href="#output_template" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>dict</code> &nbsp;·&nbsp; <strong>Required</strong> (no usable default; <code>dl</code> exits with an error if this is missing)</li>
</ul>
<p>Filename templates keyed by media kind, using <code>{variable}</code> placeholders. <code>dl</code> stops with
<code>No 'output_template' in your unshackle.yaml</code> when the config key is missing or empty. A trailing <code>?</code> on
a variable (e.g. <code>{quality?}</code>) marks it optional: if empty, it and one adjacent separator are
dropped.</p>
<table>
<thead>
<tr>
<th>Kind</th>
<th>Applies to</th>
<th>When unset</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>movies</code></td>
<td>Movies</td>
<td>The title name and year, with spaces: <code>The Movie (2024)</code>.</td>
</tr>
<tr>
<td><code>series</code></td>
<td>TV episodes</td>
<td>The show, year, episode number and name, with spaces: <code>The Show 2024 S01E05 Pilot</code>.</td>
</tr>
<tr>
<td><code>sports</code></td>
<td>Episodes that the service marks as a sports event</td>
<td>The <code>series</code> template.</td>
</tr>
<tr>
<td><code>songs</code></td>
<td>Songs</td>
<td><code>"{track_number}. {title}"</code></td>
</tr>
<tr>
<td><code>albums</code></td>
<td>Album folders, in <code>folder</code> only</td>
<td>The <code>songs</code> folder template, then a single-string <code>folder</code>, then <code>"{artist} - {album} ({year})"</code>, or <code>"{artist} - {album}"</code> with no year.</td>
</tr>
</tbody>
</table>
<div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nt">output_template</span><span class="p">:</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="w"> </span><span class="nt">movies</span><span class="p">:</span><span class="w"> </span><span class="s">"{title}.{year}.{quality?}.{source}-{tag}"</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="w"> </span><span class="nt">series</span><span class="p">:</span><span class="w"> </span><span class="s">"{title}.{season_episode}.{episode_name?}.{quality?}.{source}-{tag}"</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="w"> </span><span class="nt">sports</span><span class="p">:</span><span class="w"> </span><span class="s">"{title}.{year?}.{date?}.{episode_name}.{quality?}.{source}-{tag}"</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a><span class="w"> </span><span class="nt">songs</span><span class="p">:</span><span class="w"> </span><span class="s">"{track_number}.</span><span class="nv"> </span><span class="s">{title}"</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a><span class="w"> </span><span class="nt">folder</span><span class="p">:</span><span class="w"> </span><span class="c1"># special nested key, see below</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a><span class="w"> </span><span class="nt">movies</span><span class="p">:</span><span class="w"> </span><span class="s">"{title}</span><span class="nv"> </span><span class="s">({year})"</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a><span class="w"> </span><span class="nt">series</span><span class="p">:</span><span class="w"> </span><span class="s">"{title}</span><span class="nv"> </span><span class="s">({year})"</span>
</span><span id="__span-0-9"><a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a><span class="w"> </span><span class="nt">sports</span><span class="p">:</span><span class="w"> </span><span class="s">"{title}.{year?}"</span>
</span></code></pre></div>
<p><strong>The nested <code>folder</code> sub-key</strong> controls output subfolders, and unshackle pops it out of
<code>output_template</code>:</p>
<ul>
<li>A <strong>dict</strong> sets per-kind folder templates (kinds: <code>movies</code>, <code>series</code>, <code>sports</code>, <code>songs</code>, <code>albums</code>).</li>
<li>A <strong>str</strong> sets a single folder template for everything.</li>
</ul>
<p>unshackle validates templates on load and emits warnings for unknown variables, non-string
values, filesystem-unsafe characters (<code>&lt; &gt; : " / \ | ? *</code>), empty templates, and unknown
folder-kind keys.</p>
<h3 id="template-variables">Template variables<a class="headerlink" href="#template-variables" title="Permanent link">&para;</a></h3>
<p>unshackle takes the values from the downloaded media (through MediaInfo), from the title
metadata, or from your config. A variable that does not apply to a title becomes an empty
string. The common and audio variables work in every template. The episode variables belong to
the <code>series</code> and <code>sports</code> templates, and the music variables to the <code>songs</code> and <code>albums</code>
templates. unshackle warns at startup about such a variable in another template, also in a
single-string <code>folder</code> template, which still fills it in for the titles that have it.</p>
<p><strong>Common and video</strong></p>
<table>
<thead>
<tr>
<th>Variable</th>
<th>Meaning</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>title</code></td>
<td>Title name (movie/show/song name; <code>$</code> is rendered as <code>S</code>)</td>
<td><code>The Show</code></td>
</tr>
<tr>
<td><code>title_type</code></td>
<td>Media kind of the title</td>
<td><code>movie</code>, <code>series</code>, <code>music</code></td>
</tr>
<tr>
<td><code>year</code></td>
<td>Release year</td>
<td><code>2024</code></td>
</tr>
<tr>
<td><code>source</code></td>
<td>Service tag / class name (empty with <code>--no-source</code>)</td>
<td><code>EXAMPLE</code></td>
</tr>
<tr>
<td><code>quality</code></td>
<td>Standard resolution with scan suffix</td>
<td><code>1080p</code>, <code>2160p</code>, <code>576i</code></td>
</tr>
<tr>
<td><code>resolution</code></td>
<td>Standard resolution number only</td>
<td><code>1080</code></td>
</tr>
<tr>
<td><code>video</code></td>
<td>Video codec; rename it with <a href="#codec_names"><code>codec_names</code></a></td>
<td><code>H.264</code>, <code>H.265</code></td>
</tr>
<tr>
<td><code>hdr</code></td>
<td>Dynamic-range label</td>
<td><code>HDR</code>, <code>HDR10P</code>, <code>DV</code>, <code>DV.HDR</code>, <code>DV.HDR10P</code>, <code>DV.HDRVivid</code>, <code>HDRVivid</code>, <code>HLG</code></td>
</tr>
<tr>
<td><code>hfr</code></td>
<td>High frame rate marker (frame rate &gt; 30)</td>
<td><code>HFR</code></td>
</tr>
<tr>
<td><code>3d</code></td>
<td>Stereoscopic 3D marker (MV-HEVC video)</td>
<td><code>3D</code></td>
</tr>
<tr>
<td><code>edition</code></td>
<td>Edition label from the track, if any</td>
<td><code>Directors Cut</code></td>
</tr>
<tr>
<td><code>tag</code></td>
<td>Release-group tag (from <a href="#tagging-naming-keys"><code>tag</code></a>, <a href="#tag_rules"><code>tag_rules</code></a> or <code>--tag</code>)</td>
<td><code>TAG</code></td>
</tr>
<tr>
<td><code>repack</code></td>
<td><code>REPACK</code> when the <code>--repack</code> flag is used</td>
<td><code>REPACK</code></td>
</tr>
<tr>
<td><code>lang_tag</code></td>
<td>Result of your <a href="../download/#language_tags"><code>language_tags</code></a> rules, if configured</td>
<td><code>MULTi</code></td>
</tr>
</tbody>
</table>
<p><strong>Audio</strong></p>
<table>
<thead>
<tr>
<th>Variable</th>
<th>Meaning</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>audio</code></td>
<td>Audio codec; rename it with <a href="#codec_names"><code>codec_names</code></a></td>
<td><code>DDP</code>, <code>DD</code>, <code>AAC</code>, <code>DTS-X</code></td>
</tr>
<tr>
<td><code>audio_channels</code></td>
<td>Channel layout; bed.LFE.heights when the track has height channels</td>
<td><code>5.1</code>, <code>2.0</code>, <code>5.1.4</code></td>
</tr>
<tr>
<td><code>audio_full</code></td>
<td>Codec + channels combined; a name that ends in a digit gets a separator</td>
<td><code>DDP5.1</code>, <code>DTS-X.5.1.4</code>, <code>AC4.2.0</code></td>
</tr>
<tr>
<td><code>atmos</code></td>
<td><code>Atmos</code> when an audio track in the file carries JOC or is marked Atmos, as in the <code>--list</code> row (MediaInfo shows no JOC for AC-4)</td>
<td><code>Atmos</code></td>
</tr>
<tr>
<td><code>dual</code></td>
<td><code>DUAL</code> for two audio languages (see <a href="../download/#dual_multi_mode"><code>dual_multi_mode</code></a>)</td>
<td><code>DUAL</code></td>
</tr>
<tr>
<td><code>multi</code></td>
<td><code>MULTi</code> for more than two audio languages</td>
<td><code>MULTi</code></td>
</tr>
<tr>
<td><code>dubbed</code></td>
<td><code>DUBBED</code> for a single audio language that is not the original (strict mode only)</td>
<td><code>DUBBED</code></td>
</tr>
</tbody>
</table>
<p><strong>Episode</strong> (<code>series</code> and <code>sports</code> templates)</p>
<table>
<thead>
<tr>
<th>Variable</th>
<th>Meaning</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>season</code></td>
<td>Zero-padded season (<code>S%02d</code>)</td>
<td><code>S01</code></td>
</tr>
<tr>
<td><code>episode</code></td>
<td>Zero-padded episode (<code>E%02d</code>)</td>
<td><code>E05</code></td>
</tr>
<tr>
<td><code>season_episode</code></td>
<td>Combined</td>
<td><code>S01E05</code></td>
</tr>
<tr>
<td><code>episode_name</code></td>
<td>Episode title</td>
<td><code>Pilot</code></td>
</tr>
<tr>
<td><code>part</code></td>
<td>Part index of a <a href="../../../guide/output-and-naming/#split-episodes">split episode</a>, empty otherwise</td>
<td><code>2</code></td>
</tr>
<tr>
<td><code>absolute</code></td>
<td>Absolute episode number, zero-padded to 3 digits, empty when unknown</td>
<td><code>007</code></td>
</tr>
<tr>
<td><code>date</code></td>
<td>ISO air date, empty when the episode has none</td>
<td><code>2024-06-01</code></td>
</tr>
</tbody>
</table>
<p>When an episode has an air date, <code>season</code> and <code>season_episode</code> become the formatted air date,
unshackle clears <code>episode</code> and <code>year</code>, and <code>{date}</code> holds the ISO date. The separator inside
the date follows the style of the template. A <code>sports</code> template differs: <code>{date}</code> holds the
air date in the separator style of the template (<code>2026.11.01</code>), and <code>{year}</code> is empty when the
event has an air date. See <a href="../../../guide/output-and-naming/#sports-events">Sports events</a>.</p>
<p><strong>Music</strong> (<code>songs</code> and <code>albums</code> templates)</p>
<table>
<thead>
<tr>
<th>Variable</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>track_number</code></td>
<td>Zero-padded track number</td>
</tr>
<tr>
<td><code>artist</code> / <code>album_artist</code></td>
<td>Artist / album artist (falls back to artist)</td>
</tr>
<tr>
<td><code>album</code></td>
<td>Album name</td>
</tr>
<tr>
<td><code>disc</code></td>
<td>Disc number (only shown when greater than 1)</td>
</tr>
<tr>
<td><code>track_total</code> / <code>disc_total</code></td>
<td>Totals</td>
</tr>
<tr>
<td><code>release_type</code></td>
<td><code>album</code>, <code>single</code>, <code>ep</code>, or another type the service supplies</td>
</tr>
<tr>
<td><code>genre</code></td>
<td>Genre</td>
</tr>
<tr>
<td><code>explicit</code></td>
<td><code>Explicit</code> when flagged</td>
</tr>
<tr>
<td><code>isrc</code> / <code>upc</code> / <code>label</code></td>
<td>ISRC, UPC and record label</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="admonition-title"><code>quality</code> and <code>resolution</code> use the standard height</p>
<p>unshackle names a video by the nearest standard height (4320, 2160, 1440, 1080, 720, 576, 540,
480, 360 or 240) when it is within 10%. It measures the short side and the height that a 16:9
picture of the same width has, and uses the larger one. So a cropped 1920x800, a padded
1920x1088 and a 1080x1920 portrait video are all <code>1080p</code>. A short side within 16 lines of
2160, 1440 or 1080 gives that height, so an ultrawide 2560x1080 is <code>1080p</code>. A size with no
standard height near it, such as 1600x900, keeps its own height. <code>dl -q</code> and the
<code>dl --export</code> file name use the same rule.</p>
</div>
<div class="admonition warning">
<p class="admonition-title">An unknown variable stops the naming</p>
<p>unshackle warns at startup about a variable that is not in the tables above, and continues.
When it names a file, a required variable (no <code>?</code>) that the title does not have, such as a
typo like <code>{quailty}</code> or <code>{season}</code> in a <code>movies</code> template, stops the title with
<code>Missing required template variables</code>. An optional <code>{quailty?}</code> is removed.</p>
</div>
<div class="admonition warning">
<p class="admonition-title"><code>{part?}</code> is already inside <code>{season_episode}</code></p>
<p><code>part</code> holds the bare part index of a
<a href="../../../guide/output-and-naming/#split-episodes">split episode</a> (<code>2</code>) and is empty on
every other title. unshackle folds it into <code>{episode}</code> and <code>{season_episode}</code>, so the
shipped <code>series</code> template names split episodes correctly with no edit. Putting
<code>{part?}</code> next to either of them renders the part twice (<code>S01E01.Part.2.2</code>). Use the
standalone variable only in a template that names neither <code>{episode}</code> nor
<code>{season_episode}</code>, and note that it is always empty in a folder template, since
folders do not carry the part.</p>
</div>
<div class="admonition tip">
<p class="admonition-title"><code>{absolute}</code> counts episodes across seasons</p>
<p><code>absolute</code> holds the absolute episode number, zero-padded to 3 digits (<code>007</code>), and is
empty on titles that have none. You add it to the name yourself, and it never replaces <code>{season}</code>
or <code>{episode}</code>. Any series with a TVDB absolute order can use it, anime most often.
Services can supply it, and
<a href="../../../guide/downloading/#metadata-and-tagging"><code>--enrich</code></a> fills it in from TVDB.
Use <code>{absolute?}</code> so the name stays clean when it is unknown. To keep the season and
continue the episode number instead (<code>S02E05</code>), use
<a href="../../../guide/downloading/#continuous-episode-numbers"><code>--continuous-episodes</code></a>.</p>
</div>
<div class="admonition tip">
<p class="admonition-title"><code>sports</code> names an event by year or date</p>
<p>A service marks an event episode as sport, and that episode then uses the <code>sports</code>
templates. Without them it uses the <code>series</code> templates. For the variables and
examples, see <a href="../../../guide/output-and-naming/#sports-events">Sports events</a>.</p>
</div>
<h2 id="tagging-naming-keys">Tagging &amp; naming keys<a class="headerlink" href="#tagging-naming-keys" title="Permanent link">&para;</a></h2>
<table>
<thead>
<tr>
<th>Key</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>tag</code></td>
<td>str</td>
<td><code>""</code></td>
<td>Release-group tag. Fills the <code>{tag}</code> template variable and is written into MKV/audio tags.</td>
</tr>
<tr>
<td><code>tag_group_name</code></td>
<td>bool</td>
<td><code>true</code></td>
<td>Include the group name (<code>tag</code>) in the MKV <code>Group</code> tag.</td>
</tr>
<tr>
<td><code>tag_imdb_tmdb</code></td>
<td>bool</td>
<td><code>true</code></td>
<td>Write IMDb/TMDB/TVDB external-ID tags into the MKV (needs metadata providers).</td>
</tr>
<tr>
<td><code>chapter_fallback_name</code></td>
<td>str</td>
<td><code>""</code></td>
<td>The name of a chapter that has no name, as a template, e.g. <code>"Chapter {i:02}"</code>. <code>{i}</code> is the chapter number, from 1; <code>{j}</code> counts only the chapters without a name. Format directives such as <code>{i:02}</code> work.</td>
</tr>
<tr>
<td><code>unicode_filenames</code></td>
<td>bool</td>
<td><code>false</code></td>
<td><code>false</code> transliterates non-ASCII characters to ASCII and removes accents. <code>true</code> keeps the native characters in file and folder names, with the vowel and tone marks of languages such as Thai, Hindi and Bengali. With each value, unshackle first normalises the name to Unicode NFC.</td>
</tr>
<tr>
<td><a href="#filename_replacements"><code>filename_replacements</code></a></td>
<td>dict</td>
<td><code>{}</code></td>
<td>Replace text in file and folder names, e.g. <code>&amp;</code> with <code>and</code>.</td>
</tr>
</tbody>
</table>
<h2 id="codec_names"><code>codec_names</code><a class="headerlink" href="#codec_names" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>dict</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>{}</code></li>
</ul>
<p>Renames the codec and HDR names in the filename. Each map key is a name that unshackle writes by
default, and its value is the name to write instead. The map applies to the <code>video</code>, <code>audio</code>,
and <code>hdr</code> <a href="#template-variables">template variables</a>, and so
also to <code>audio_full</code>. A name that is not in the map stays as it is, and an empty value removes
the name. You can also set <code>codec_names</code> for one service under <code>services</code>.</p>
<div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="nt">codec_names</span><span class="p">:</span>
</span><span id="__span-1-2"><a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a><span class="w"> </span><span class="nt">DDP</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">EAC3</span><span class="w"> </span><span class="c1"># DDP5.1 -&gt; EAC3.5.1</span>
</span><span id="__span-1-3"><a id="__codelineno-1-3" name="__codelineno-1-3" href="#__codelineno-1-3"></a><span class="w"> </span><span class="nt">DD</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">AC3</span><span class="w"> </span><span class="c1"># DD5.1 -&gt; AC3.5.1</span>
</span><span id="__span-1-4"><a id="__codelineno-1-4" name="__codelineno-1-4" href="#__codelineno-1-4"></a><span class="w"> </span><span class="nt">H.265</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">HEVC</span><span class="w"> </span><span class="c1"># H.265 -&gt; HEVC</span>
</span><span id="__span-1-5"><a id="__codelineno-1-5" name="__codelineno-1-5" href="#__codelineno-1-5"></a><span class="w"> </span><span class="nt">HDR10P</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">HDR10+</span><span class="w"> </span><span class="c1"># DV.HDR10P -&gt; DV.HDR10+</span>
</span></code></pre></div>
<p>For <code>hdr</code>, unshackle renames each part of a Dolby Vision label separately, so <code>HDR10P</code> also
changes <code>DV.HDR10P</code> to <code>DV.HDR10+</code>. When an audio name ends in a digit, <code>audio_full</code> puts a
separator before the channels: <code>EAC3.5.1</code>, not <code>EAC35.1</code>.</p>
<p>The REST API fields <code>codec_display</code> and <code>range_display</code> use the same names and the same map.
The <code>dl --export</code> file name does not use <code>codec_names</code>.</p>
<div class="admonition note">
<p class="admonition-title"><code>tag_rules</code> see the new names</p>
<p>unshackle evaluates <a href="#tag_rules"><code>tag_rules</code></a> after the rename. With the example above, a
rule must match <code>audio: EAC3</code>, not <code>audio: DDP</code>.</p>
</div>
<h2 id="filename_replacements"><code>filename_replacements</code><a class="headerlink" href="#filename_replacements" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>dict</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>{}</code></li>
</ul>
<p>Replaces text in file and folder names. Each entry of the map names the text to find, and its
value is the text to write instead. An empty value removes the text. unshackle applies the map
in order, before it sanitises the name, so a later entry also sees the result of an earlier
entry. You can also set <code>filename_replacements</code> for one service under <code>services</code>.</p>
<div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><pre><span></span><code><span id="__span-2-1"><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a><span class="nt">filename_replacements</span><span class="p">:</span>
</span><span id="__span-2-2"><a id="__codelineno-2-2" name="__codelineno-2-2" href="#__codelineno-2-2"></a><span class="w"> </span><span class="s">"&amp;"</span><span class="p p-Indicator">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">and</span><span class="w"> </span><span class="c1"># Tom &amp; Jerry -&gt; Tom.and.Jerry, Tom&amp;Jerry -&gt; Tom.and.Jerry</span>
</span></code></pre></div>
<p>Put quotes around text such as <code>"&amp;"</code>: YAML reads a bare <code>&amp;</code> as an anchor. When the text to
find has no letters or digits and the replacement is a word, unshackle puts a separator on each
side of the replacement, so <code>Tom&amp;Jerry</code> gives <code>Tom.and.Jerry</code>. The map also changes text
inside a word: <code>AT&amp;T</code> gives <code>AT.and.T</code>. An entry that does not map text to text stops
unshackle at startup with an error.</p>
<p>The map applies to the whole name that a template makes, and also to the title part of the
<code>dl --export</code> file name. Find only text that titles contain: an entry for <code>-</code> also changes
<code>WEB-DL</code> and the <code>-{tag}</code> separator. The <code>&amp;</code> that unshackle writes for <code>/</code> and <code>;</code> in a
multi-episode name stays as it is, unless the map has an entry for <code>/</code> or <code>;</code>.</p>
<p>unshackle finds the text before it transliterates the name to ASCII. For a title that uses a
variant of a character, such as the fullwidth <code>&</code>, add an entry for that variant too.</p>
<h2 id="tag_rules"><code>tag_rules</code><a class="headerlink" href="#tag_rules" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>list</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>[]</code></li>
</ul>
<p>Conditionally replaces <a href="#tagging-naming-keys"><code>tag</code></a> for a given download. Each rule pairs a <code>when</code>
dict of conditions with the <code>tag</code> to use when they hold. unshackle evaluates the rules in
order and the first match wins. If no rule matches, the global <code>tag</code> stays.</p>
<div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><pre><span></span><code><span id="__span-3-1"><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="nt">tag_rules</span><span class="p">:</span>
</span><span id="__span-3-2"><a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">when</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> title_type</span><span class="p">:</span><span class="w"> </span><span class="nv">movie</span><span class="p p-Indicator">,</span><span class="nt"> lang_tag</span><span class="p">:</span><span class="w"> </span><span class="nv">SUBBED</span><span class="w"> </span><span class="p p-Indicator">}</span>
</span><span id="__span-3-3"><a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">SUBMOVIES</span>
</span><span id="__span-3-4"><a id="__codelineno-3-4" name="__codelineno-3-4" href="#__codelineno-3-4"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">when</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> quality</span><span class="p">:</span><span class="w"> </span><span class="nv">2160p</span><span class="p p-Indicator">,</span><span class="nt"> hdr</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">DV</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">DV.HDR</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">DV.HDR10P</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">HDR</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">HDR10P</span><span class="p p-Indicator">]</span><span class="w"> </span><span class="p p-Indicator">}</span>
</span><span id="__span-3-5"><a id="__codelineno-3-5" name="__codelineno-3-5" href="#__codelineno-3-5"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">UHDGROUP</span>
</span></code></pre></div>
<p>Rule semantics:</p>
<ul>
<li>Every condition in <code>when</code> must hold (they are AND-ed).</li>
<li>A value can be a scalar or a list. A list matches if <strong>any</strong> entry matches.</li>
<li>Comparison is case-insensitive string equality.</li>
<li>The keys of <code>when</code> are the filename template variables for the release itself:
<code>title_type</code>, <code>quality</code>, <code>resolution</code>, <code>source</code>, <code>video</code>, <code>hdr</code>, <code>hfr</code>, <code>3d</code>, <code>audio</code>,
<code>audio_channels</code>, <code>audio_full</code>, <code>atmos</code>, <code>dual</code>, <code>multi</code>, <code>dubbed</code>, <code>edition</code>, <code>repack</code>,
and <code>lang_tag</code>. Only these are available. unshackle adds the title's own fields (<code>title</code>,
<code>year</code>, <code>season</code>, <code>episode</code>, and so on) after it evaluates the rules, so a condition cannot
use them.</li>
<li>An unknown key in <code>when</code> is a mistake: unshackle logs a warning that names the key
and skips that rule. unshackle also warns about a rule without conditions or without a <code>tag</code>, and skips it.</li>
</ul>
<p>Put the more specific rules first, because unshackle stops at the first match.</p>
<div class="admonition warning">
<p class="admonition-title">Match <code>hdr</code> on the exact value</p>
<p>Matching is exact, and <code>hdr</code> is a composite label for Dolby Vision titles: a DV title with
an HDR10 base layer gives <code>DV.HDR</code>, with an HDR10+ base layer <code>DV.HDR10P</code>, and with an HDR Vivid base
layer <code>DV.HDRVivid</code>. Plain <code>DV</code> does <strong>not</strong> match those. Name every variant you want, as the example above does. Note
also that HDR10 gives <code>HDR</code>, not <code>HDR10</code>, and so does a PQ video track with no HDR10
metadata. The full set of values is <code>HDR</code>, <code>HDR10P</code>, <code>DV</code>, <code>DV.HDR</code>, <code>DV.HDR10P</code>,
<code>DV.HDRVivid</code>, <code>HDRVivid</code>, and <code>HLG</code>, as listed in the
<a href="#template-variables">variable table</a>.</p>
</div>
<h3 id="operators">Operators<a class="headerlink" href="#operators" title="Permanent link">&para;</a></h3>
<p>A condition value can start with a comparison operator, which unshackle applies to the rest of
the value:</p>
<div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><pre><span></span><code><span id="__span-4-1"><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="nt">tag_rules</span><span class="p">:</span>
</span><span id="__span-4-2"><a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">when</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> resolution</span><span class="p">:</span><span class="w"> </span><span class="s">"&lt;1080"</span><span class="w"> </span><span class="p p-Indicator">}</span>
</span><span id="__span-4-3"><a id="__codelineno-4-3" name="__codelineno-4-3" href="#__codelineno-4-3"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">SDGROUP</span>
</span><span id="__span-4-4"><a id="__codelineno-4-4" name="__codelineno-4-4" href="#__codelineno-4-4"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">when</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> quality</span><span class="p">:</span><span class="w"> </span><span class="s">"&gt;=2160"</span><span class="w"> </span><span class="p p-Indicator">}</span>
</span><span id="__span-4-5"><a id="__codelineno-4-5" name="__codelineno-4-5" href="#__codelineno-4-5"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">UHDGROUP</span>
</span><span id="__span-4-6"><a id="__codelineno-4-6" name="__codelineno-4-6" href="#__codelineno-4-6"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">when</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> video</span><span class="p">:</span><span class="w"> </span><span class="s">"!=H.265"</span><span class="w"> </span><span class="p p-Indicator">}</span>
</span><span id="__span-4-7"><a id="__codelineno-4-7" name="__codelineno-4-7" href="#__codelineno-4-7"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">AVCGROUP</span>
</span></code></pre></div>
<ul>
<li><code>&gt;</code>, <code>&lt;</code>, <code>&gt;=</code>, <code>&lt;=</code> compare numbers. unshackle reads the first number out of the actual
value, so <code>"&gt;=2160"</code> matches a quality of <code>2160p</code>. If the actual value has no number, the
condition fails.</li>
<li><code>=</code>, <code>==</code>, and <code>!=</code> compare text, case-insensitively, when the operand is not a number.
With a numeric operand they compare numbers like the operators above. A value with no number
in it is never equal to a number, so <code>"!=2160"</code> holds for it and <code>"==2160"</code> does not.</li>
<li>An ordering operator with a text operand (for example <code>"&gt;DV"</code>) is a mistake: unshackle logs
a warning and the condition fails. So does an operator with nothing after it (<code>"&gt;="</code>).</li>
<li>A value with no operator keeps the plain equality behaviour described above.</li>
</ul>
<div class="admonition warning">
<p class="admonition-title">Quote operator values in YAML</p>
<p>Two of these operators break an unquoted YAML value, and both stop the config from
loading:</p>
<ul>
<li><code>&gt;</code> opens a folded block scalar, so <code>quality: &gt;=2160</code> fails with a "while scanning a
block scalar" error.</li>
<li><code>!</code> starts a tag, so <code>hdr: !=DV</code> fails with a "could not determine a constructor"
error.</li>
</ul>
<p>Quote every operator value: <code>quality: "&gt;=2160"</code>, <code>resolution: "&lt;1080"</code>, <code>video: "!=H.265"</code>.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Keep a negation out of lists</p>
<p>A list matches if any entry matches, so two or more <code>!=</code> entries in one list are always
true. Give a negation as a single value, not as a list entry.</p>
</div>
<p><code>title_type</code> is the media kind of the title: <code>movie</code>, <code>series</code>, or <code>music</code>. It is useful to
give each kind its own group:</p>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-5-1"><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><span class="nt">tag_rules</span><span class="p">:</span>
</span><span id="__span-5-2"><a id="__codelineno-5-2" name="__codelineno-5-2" href="#__codelineno-5-2"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">when</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> title_type</span><span class="p">:</span><span class="w"> </span><span class="nv">movie</span><span class="w"> </span><span class="p p-Indicator">}</span>
</span><span id="__span-5-3"><a id="__codelineno-5-3" name="__codelineno-5-3" href="#__codelineno-5-3"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">MOVIEGRP</span>
</span><span id="__span-5-4"><a id="__codelineno-5-4" name="__codelineno-5-4" href="#__codelineno-5-4"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">when</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> title_type</span><span class="p">:</span><span class="w"> </span><span class="nv">series</span><span class="w"> </span><span class="p p-Indicator">}</span>
</span><span id="__span-5-5"><a id="__codelineno-5-5" name="__codelineno-5-5" href="#__codelineno-5-5"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">TVGRP</span>
</span></code></pre></div>
<p>The resolved tag applies to the <code>{tag}</code> filename variable only. The <code>Group</code> metadata tag
written into MKV and music files always uses <a href="#tagging-naming-keys"><code>tag</code></a>.</p>
<div class="admonition note">
<p class="admonition-title"><code>--tag</code> wins</p>
<p>An explicit <code>dl --tag</code> on the command line disables the rules completely and uses the
given tag.</p>
</div>
</article>
</div>
<script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
<button type="button" class="md-top md-icon" data-md-component="top" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
Back to top
</button>
</main>
<footer class="md-footer">
<nav class="md-footer__inner md-grid" aria-label="Footer" >
<a href="../download/" class="md-footer__link md-footer__link--prev" aria-label="Previous: Download &amp; Processing">
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</div>
<div class="md-footer__title">
<span class="md-footer__direction">
Previous
</span>
<div class="md-ellipsis">
Download & Processing
</div>
</div>
</a>
<a href="../drm/" class="md-footer__link md-footer__link--next" aria-label="Next: DRM &amp; CDM">
<div class="md-footer__title">
<span class="md-footer__direction">
Next
</span>
<div class="md-ellipsis">
DRM & CDM
</div>
</div>
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11z"/></svg>
</div>
</a>
</nav>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"annotate": null, "base": "../../..", "features": ["content.code.annotate", "content.code.copy", "content.tabs.link", "content.tooltips", "navigation.footer", "navigation.indexes", "navigation.sections", "navigation.tabs", "navigation.top", "navigation.tracking", "search.highlight", "search.share", "search.suggest", "toc.follow"], "search": "../../../assets/javascripts/workers/search.a7633da7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
<script src="../../../assets/javascripts/bundle.a5f9d56c.min.js"></script>
</body>
</html>