Files
unshackle/reference/configuration/download/index.html
T
2026-11-11 00:53:46 +00:00

3114 lines
90 KiB
HTML

<!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/download/">
<link rel="prev" href="../services/">
<link rel="next" href="../output/">
<link rel="icon" href="../../../assets/favicon.svg">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.8.1">
<title>Download & Processing - 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="#download-processing" 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">
Download & Processing
</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>
<li class="md-tabs__item">
<a href="../../api/service/" class="md-tabs__link">
API Reference
</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>
</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 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">
Download & Processing
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
Download & Processing
</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="#dl" class="md-nav__link">
<span class="md-ellipsis">
dl
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#continue_downloads" class="md-nav__link">
<span class="md-ellipsis">
continue_downloads
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#merge_segments" class="md-nav__link">
<span class="md-ellipsis">
merge_segments
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#subtitle" class="md-nav__link">
<span class="md-ellipsis">
subtitle
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#audio" class="md-nav__link">
<span class="md-ellipsis">
audio
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#muxing" class="md-nav__link">
<span class="md-ellipsis">
muxing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#language_tags" class="md-nav__link">
<span class="md-ellipsis">
language_tags
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#dual_multi_mode" class="md-nav__link">
<span class="md-ellipsis">
dual_multi_mode
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#hdr10plus_probe" class="md-nav__link">
<span class="md-ellipsis">
hdr10plus_probe
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#generate_dv_mode" class="md-nav__link">
<span class="md-ellipsis">
generate_dv_mode
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../output/" class="md-nav__link">
<span class="md-ellipsis">
Output & Naming
</span>
</a>
</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 Vaults
</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" >
<div class="md-nav__link md-nav__container">
<a href="../../../dev/rest-api/" class="md-nav__link ">
<span class="md-ellipsis">
REST API
</span>
</a>
<label class="md-nav__link " for="__nav_5_3" id="__nav_5_3_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<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">
Quick Start
</span>
</a>
</li>
<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/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/dashboard/" class="md-nav__link">
<span class="md-ellipsis">
Dashboard
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../dev/rest-api/remote-sessions/" class="md-nav__link">
<span class="md-ellipsis">
Remote Sessions
</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>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" >
<label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
<span class="md-ellipsis">
API Reference
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_6">
<span class="md-nav__icon md-icon"></span>
API Reference
</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>
</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="#dl" class="md-nav__link">
<span class="md-ellipsis">
dl
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#continue_downloads" class="md-nav__link">
<span class="md-ellipsis">
continue_downloads
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#merge_segments" class="md-nav__link">
<span class="md-ellipsis">
merge_segments
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#subtitle" class="md-nav__link">
<span class="md-ellipsis">
subtitle
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#audio" class="md-nav__link">
<span class="md-ellipsis">
audio
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#muxing" class="md-nav__link">
<span class="md-ellipsis">
muxing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#language_tags" class="md-nav__link">
<span class="md-ellipsis">
language_tags
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#dual_multi_mode" class="md-nav__link">
<span class="md-ellipsis">
dual_multi_mode
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#hdr10plus_probe" class="md-nav__link">
<span class="md-ellipsis">
hdr10plus_probe
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#generate_dv_mode" class="md-nav__link">
<span class="md-ellipsis">
generate_dv_mode
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="download-processing">Download &amp; processing<a class="headerlink" href="#download-processing" title="Permanent link">&para;</a></h1>
<h2 id="dl"><code>dl</code><a class="headerlink" href="#dl" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>dict</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>{}</code></li>
</ul>
<p>Persistent defaults for the <code>dl</code> command. unshackle uses the block as Click's <code>default_map</code>,
so you can give any <code>dl</code> flag a default here. See <a href="../../../guide/downloading/">Downloading</a> and the
<a href="../../../guide/cli-reference/">CLI Reference</a> for what each flag does.</p>
<p><strong>Config key naming.</strong> A config key is the flag's long name with dashes replaced by
underscores (<code>--best-available</code> → <code>best_available</code>, <code>--sub-format</code> → <code>sub_format</code>). A few
config keys use the flag's internal destination and not its visible name. Set these exact
config keys:</p>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Config key</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-r</code> / <code>--range</code></td>
<td><code>range</code></td>
</tr>
<tr>
<td><code>--list</code></td>
<td><code>list</code></td>
</tr>
<tr>
<td><code>--tmdb</code></td>
<td><code>tmdb_id</code></td>
</tr>
<tr>
<td><code>--imdb</code></td>
<td><code>imdb_id</code></td>
</tr>
<tr>
<td><code>--anilist</code></td>
<td><code>anilist_id</code></td>
</tr>
<tr>
<td><code>-naa</code> / <code>--noatmos</code></td>
<td><code>no_atmos</code></td>
</tr>
<tr>
<td><code>-o</code> / <code>--output</code></td>
<td><code>output_dir</code></td>
</tr>
<tr>
<td><code>--cdm-only</code> / <code>--vaults-only</code></td>
<td><code>cdm_only</code></td>
</tr>
</tbody>
</table>
<p><strong>Precedence</strong> (highest first): an explicit CLI flag → a per-service
<a href="../services/"><code>services.&lt;TAG&gt;.dl</code></a> override → this global <code>dl:</code> block → the built-in
default. In other words, config only fills in options you did not set on the command line.</p>
<p>Common config keys. This is a useful subset, and every <code>dl</code> flag works:</p>
<table>
<thead>
<tr>
<th>Key</th>
<th>Type</th>
<th>Default</th>
<th>Sets</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>lang</code></td>
<td>list</td>
<td><code>["orig"]</code></td>
<td>Video/audio language(s); <code>orig</code> = original language. A <code>-</code> prefix excludes, e.g. <code>[all, -es]</code>.</td>
</tr>
<tr>
<td><code>a_lang</code> / <code>v_lang</code></td>
<td>list</td>
<td><code>[]</code></td>
<td>Audio- / video-only language override. A <code>-</code> prefix excludes.</td>
</tr>
<tr>
<td><code>s_lang</code></td>
<td>list</td>
<td><code>["all"]</code></td>
<td>Subtitle language(s). A <code>-</code> prefix excludes, e.g. <code>[all, -es]</code>.</td>
</tr>
<tr>
<td><code>quality</code></td>
<td>list</td>
<td><code>[]</code> (best)</td>
<td>Resolution(s), e.g. <code>[1080]</code>.</td>
</tr>
<tr>
<td><code>vcodec</code></td>
<td>list</td>
<td><code>[]</code> (any)</td>
<td>Video codec(s), e.g. <code>[H265]</code>.</td>
</tr>
<tr>
<td><code>acodec</code></td>
<td>list</td>
<td><code>[]</code> (any)</td>
<td>Audio codec(s), e.g. <code>[EC3]</code>.</td>
</tr>
<tr>
<td><code>range</code></td>
<td>list</td>
<td><code>["SDR"]</code></td>
<td>Colour range(s): <code>SDR</code>, <code>HLG</code>, <code>HDR10</code>, <code>HDR10P</code>, <code>DV</code>, <code>HYBRID</code>.</td>
</tr>
<tr>
<td><code>channels</code></td>
<td>float</td>
<td><em>(unset)</em></td>
<td>Audio channels, e.g. <code>6</code> for 5.1.</td>
</tr>
<tr>
<td><code>sub_format</code></td>
<td>str</td>
<td><em>(unset)</em></td>
<td>Convert subtitles to this format (<code>srt</code>, <code>vtt</code>, <code>original</code>, ...).</td>
</tr>
<tr>
<td><code>forced_subs</code></td>
<td>bool</td>
<td><code>false</code></td>
<td>Include forced subtitle tracks.</td>
</tr>
<tr>
<td><code>forced_s_lang</code></td>
<td>list</td>
<td><code>[]</code></td>
<td>Forced subtitle language(s); implies <code>forced_subs</code>. A <code>-</code> prefix excludes.</td>
</tr>
<tr>
<td><code>forced_subs_only</code></td>
<td>bool</td>
<td><code>false</code></td>
<td>Keep only forced subtitle tracks; implies <code>forced_subs</code>.</td>
</tr>
<tr>
<td><code>audio_description</code></td>
<td>bool</td>
<td><code>false</code></td>
<td>Include descriptive (audio-description) tracks.</td>
</tr>
<tr>
<td><code>audio_description_only</code></td>
<td>bool</td>
<td><code>false</code></td>
<td>Keep only descriptive (audio-description) tracks.</td>
</tr>
<tr>
<td><code>no_subs</code> / <code>no_audio</code> / <code>no_chapters</code> / <code>no_attachments</code></td>
<td>bool</td>
<td><code>false</code></td>
<td>Skip that track type. <code>no_attachments</code> also skips attaching subtitle fonts.</td>
</tr>
<tr>
<td><code>downloads</code></td>
<td>int</td>
<td><code>1</code></td>
<td>Tracks downloaded concurrently.</td>
</tr>
<tr>
<td><code>workers</code></td>
<td>int</td>
<td><em>(downloader default)</em></td>
<td>Threads per track.</td>
</tr>
<tr>
<td><code>speed_limit</code></td>
<td>str</td>
<td><em>(unlimited)</em></td>
<td>Total download speed cap across all downloads combined, e.g. <code>500k</code>, <code>5M</code>, <code>1.5G</code> or plain bytes/sec. Values are bytes, not bits (<code>5M</code> = 5.0 MB/s).</td>
</tr>
<tr>
<td><code>slow</code></td>
<td>str</td>
<td><em>(unset)</em></td>
<td>Inter-title delay, e.g. <code>"20-40"</code>.</td>
</tr>
<tr>
<td><code>best_available</code></td>
<td>bool</td>
<td><code>false</code></td>
<td>Warn instead of failing when a requested resolution, range, video language, or audio language is missing, or when one DRM system does not license under <code>--all-drm</code>. The CLI flag is <code>--best-available</code>, also spelled <code>--warn-only</code>.</td>
</tr>
<tr>
<td><code>generate_dv</code></td>
<td>bool</td>
<td><code>false</code></td>
<td>With <code>-r HYBRID</code>, make Dolby Vision from the HDR10+ metadata or the decoded video when a title has no DV track. With <code>-r HDR10</code> or <code>-r HDR10P</code>, make it for that base and ignore a DV track. See <a href="../../../guide/downloading/#dolby-vision-without-a-dv-track">Dolby Vision without a DV track</a>.</td>
</tr>
<tr>
<td><code>proxy</code></td>
<td>str</td>
<td><em>(unset)</em></td>
<td>Default proxy URI or 2-letter country.</td>
</tr>
<tr>
<td><code>no_folder</code></td>
<td>bool</td>
<td><code>false</code></td>
<td>Do not create a per-title folder.</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="admonition-title"><code>no</code> and <code>yes</code> are language tags</p>
<p>YAML reads a bare <code>no</code> as <code>false</code> and a bare <code>yes</code> as <code>true</code>. unshackle puts both back to
the tags <code>no</code> (Norwegian) and <code>yes</code> (Nyankpa) in every config key that takes a language: <code>lang</code>,
<code>v_lang</code>, <code>a_lang</code>, <code>s_lang</code>, <code>forced_s_lang</code>, <code>require_audio</code>, <code>require_video</code>,
<code>require_subs</code>, <a href="#subtitle"><code>language_priority</code></a>, <a href="#muxing"><code>muxing.default_language</code></a> and
the <a href="#language_tags"><code>language_tags</code></a> rules. Quotes (<code>lang: "no"</code>) work as well.</p>
</div>
<div class="language-yaml highlight"><span class="filename">Global download defaults</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">dl</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">lang</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">en</span><span class="p p-Indicator">]</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">quality</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">1080</span><span class="p p-Indicator">]</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">range</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">HDR10</span><span class="p p-Indicator">]</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">vcodec</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">H265</span><span class="p p-Indicator">]</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">sub_format</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">srt</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">downloads</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">2</span>
</span></code></pre></div>
<div class="admonition note">
<p class="admonition-title">Language exclusions in YAML</p>
<p>The language keys accept the same <code>-</code> exclusion tokens as the command line. Give them
as a list or as one comma-separated string.</p>
<div class="language-yaml highlight"><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">dl</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">s_lang</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">all</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">-es</span><span class="p p-Indicator">]</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">a_lang</span><span class="p">:</span><span class="w"> </span><span class="s">"orig,-es"</span>
</span></code></pre></div>
<p>See <a href="../../../guide/downloading/#excluding-languages">Excluding languages</a> for the rules.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Per-service overrides</p>
<p>A <code>dl</code> block nested under a service in <a href="../services/"><code>services</code></a> takes the same keys and
applies to that service only.</p>
<div class="language-yaml highlight"><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">dl</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="nt">lang</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">en</span><span class="p p-Indicator">]</span>
</span><span id="__span-2-3"><a id="__codelineno-2-3" name="__codelineno-2-3" href="#__codelineno-2-3"></a><span class="nt">services</span><span class="p">:</span>
</span><span id="__span-2-4"><a id="__codelineno-2-4" name="__codelineno-2-4" href="#__codelineno-2-4"></a><span class="w"> </span><span class="nt">EXAMPLE1</span><span class="p">:</span>
</span><span id="__span-2-5"><a id="__codelineno-2-5" name="__codelineno-2-5" href="#__codelineno-2-5"></a><span class="w"> </span><span class="nt">dl</span><span class="p">:</span>
</span><span id="__span-2-6"><a id="__codelineno-2-6" name="__codelineno-2-6" href="#__codelineno-2-6"></a><span class="w"> </span><span class="nt">lang</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">en</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">ja</span><span class="p p-Indicator">]</span>
</span><span id="__span-2-7"><a id="__codelineno-2-7" name="__codelineno-2-7" href="#__codelineno-2-7"></a><span class="w"> </span><span class="nt">range</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></code></pre></div>
</div>
<div class="admonition note">
<p class="admonition-title"><code>serve</code> uses these same keys</p>
<p>The <a href="../services/#serve"><code>serve</code></a> block accepts most of the same <code>dl</code> option keys at its top level
to set server-wide download defaults for every request it handles. The API ignores the
config keys it does not know there, <code>speed_limit</code> for example. <code>serve</code> has its own
<code>global_speed_limit</code>.</p>
</div>
<h2 id="continue_downloads"><code>continue_downloads</code><a class="headerlink" href="#continue_downloads" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>bool</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>false</code></li>
</ul>
<p>Keep a failed download's completed segment files so the next download resumes from where it
stopped instead of restarting from byte zero.</p>
<p>unshackle keeps the segments of a failed track in a <code>resume</code> directory inside the temp
directory, and the next download of the same track takes them back from there. It removes a
kept entry after 7 days, and <code>unshackle env clear temp</code> removes them all. A process that is
killed, or a job cancelled over the REST API, keeps nothing.</p>
<p>unshackle reuses only whole, fully downloaded segments. It always discards partially written
segments, and no partial-byte (<code>Range</code>) resume across runs takes place. Reuse is possible only
with proof that the segmentation did not change. The manifest URL, segment count, and byte
ranges must all match the previous download, or the download silently restarts clean.</p>
<div class="admonition note">
<p class="admonition-title">What can and cannot resume</p>
<ul>
<li>Segmented DASH, ISM, and HLS tracks resume.</li>
<li>Single-file (non-segmented) downloads and DASH tracks collapsed to a single ranged
download never make segment files, so this option does not apply to them (the
downloader has its own in-flight partial-file handling for those).</li>
<li>HLS resumes Widevine/PlayReady and unencrypted titles only. An AES-128 title always
restarts. An HLS failure during the post-download merge step also restarts.</li>
<li>A track downloaded with <a href="#merge_segments"><code>merge_segments</code></a> or
<a href="../drm/#decrypt_segments"><code>decrypt_segments</code></a> never resumes. Both options consume
or rewrite the segment files during the download.</li>
</ul>
</div>
<p>For a one-off resume without changing config, pass <code>dl --continue-downloads</code> on the
command line (the flag can only enable resume, never disable it).</p>
<div class="language-yaml highlight"><span class="filename">Resume failed downloads</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">continue_downloads</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</span></code></pre></div>
<h2 id="merge_segments"><code>merge_segments</code><a class="headerlink" href="#merge_segments" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>bool</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>false</code></li>
</ul>
<p>Appends each segment to the output file as soon as it and every segment before it have
arrived, instead of joining all the segment files after the last one lands. The join runs
during the download, so the "Merging" step after the last segment goes away. The output file
is the same either way.</p>
<p>Segments arrive out of order because the workers run in parallel. unshackle keeps a cursor on
the next segment it needs and appends every segment that is ready in order, then deletes the
segment file. With <a href="../drm/#decrypt_segments"><code>decrypt_segments</code></a> also on, each segment is
appended after its decryption completes, never before.</p>
<p>This option is off by default because it disables resume, and because its cost during the
download is not measured. The append reads each segment straight after a worker wrote it, so
the read usually comes from the page cache. On a hard disk, the append to one file while the
workers write many segment files can still make the head seek. If a download gets slower with
the option on, turn it off.</p>
<p>This applies to video and audio tracks from DASH, ISM, and HLS. An HLS track qualifies
only when every segment shares one init segment and one <code>EXT-X-KEY</code>, with no
<code>EXT-X-DISCONTINUITY</code>, and the DRM is Widevine, PlayReady, or none. AES-128 tracks, tracks
with content key rotation or discontinuities, and subtitle tracks keep the merge after the download.</p>
<div class="admonition note">
<p class="admonition-title">No resume</p>
<p>A track that merges segment by segment always downloads from the start.
<a href="#continue_downloads"><code>continue_downloads</code></a> cannot reuse its segments, because unshackle
deletes each segment after it appends it.</p>
</div>
<div class="language-yaml highlight"><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">merge_segments</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</span></code></pre></div>
<h2 id="subtitle"><code>subtitle</code><a class="headerlink" href="#subtitle" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>dict</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>{}</code></li>
</ul>
<p>Subtitle handling: SDH stripping, format conversion, and whether unshackle muxes the subtitles
in or writes them as sidecar files. See <a href="../../../guide/subtitles/">Subtitles</a> for the full guide.</p>
<table>
<thead>
<tr>
<th>Sub-key</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>strip_sdh</code></td>
<td>bool</td>
<td><code>true</code></td>
<td>Strip SDH/CC cues (hearing-impaired annotations) into a clean track.</td>
</tr>
<tr>
<td><code>sdh_method</code></td>
<td>str</td>
<td><code>"auto"</code></td>
<td>SDH-stripping backend to use.</td>
</tr>
<tr>
<td><code>preserve_formatting</code></td>
<td>bool</td>
<td><code>true</code></td>
<td>Pass WebVTT cue text through as written. <code>false</code> re-encodes it through pycaption, which merges identical cues but flattens styling. unshackle removes WebVTT-only cue markup either way.</td>
</tr>
<tr>
<td><code>convert_before_strip</code></td>
<td>bool</td>
<td><code>true</code></td>
<td>Convert to the working format before stripping SDH.</td>
</tr>
<tr>
<td><code>conversion_method</code></td>
<td>str</td>
<td><code>"auto"</code></td>
<td>Subtitle conversion backend.</td>
</tr>
<tr>
<td><code>output_mode</code></td>
<td>str</td>
<td><code>"mux"</code></td>
<td><code>mux</code> embeds subtitles in the MKV; <code>sidecar</code> writes separate files; <code>both</code> writes sidecars and still muxes.</td>
</tr>
<tr>
<td><code>sidecar_format</code></td>
<td>str</td>
<td><code>"srt"</code></td>
<td>Format for sidecar files when <code>output_mode</code> is <code>sidecar</code> or <code>both</code>.</td>
</tr>
<tr>
<td><code>type_priority</code></td>
<td>list</td>
<td><em>(unset)</em></td>
<td>Ordered ranking of subtitle types (<code>forced</code>, <code>normal</code>, <code>sdh</code>; CC counts as SDH). Types you leave out fall to the end.</td>
</tr>
<tr>
<td><code>group_by</code></td>
<td>str</td>
<td><code>"type"</code></td>
<td>Which key groups the subtitle tracks. <code>type</code> puts all forced tracks together, then all normal, then all SDH. <code>language</code> keeps each language next to its own variants.</td>
</tr>
<tr>
<td><code>language_priority</code></td>
<td>list</td>
<td><em>(unset)</em></td>
<td>Languages to sort to the top, in the order you give. The rest keep the default order: original language first, then alphabetical. Nothing is removed.</td>
</tr>
<tr>
<td><code>dedupe_codecs</code></td>
<td>list</td>
<td><em>(unset)</em></td>
<td>Subtitle codecs in order of preference, by value or name, for example <code>[VTT, STPP, WVTT]</code>. When tracks of the same language, forced/SDH/CC type and name come in several listed codecs, unshackle drops the ones in a later codec. It always keeps codecs you leave out. Unset keeps every track.</td>
</tr>
</tbody>
</table>
<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">subtitle</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="nt">strip_sdh</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</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">output_mode</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">sidecar</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="nt">sidecar_format</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">srt</span>
</span></code></pre></div>
<div class="admonition note">
<p class="admonition-title"><code>group_by</code> track order</p>
<table>
<thead>
<tr>
<th><code>group_by</code></th>
<th>Result</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>type</code></td>
<td>Danish, Finnish, French, … Danish SDH, Finnish SDH, French SDH</td>
</tr>
<tr>
<td><code>language</code></td>
<td>Danish, Danish SDH, Finnish, Finnish SDH, French, French SDH</td>
</tr>
</tbody>
</table>
<p><code>type_priority</code> still sets the order of the variants, so with <code>group_by: language</code> it
controls the order inside each language.</p>
</div>
<div class="admonition note">
<p class="admonition-title"><code>language_priority</code> sorts languages, it does not select them</p>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-6-1"><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a><span class="nt">subtitle</span><span class="p">:</span>
</span><span id="__span-6-2"><a id="__codelineno-6-2" name="__codelineno-6-2" href="#__codelineno-6-2"></a><span class="w"> </span><span class="nt">group_by</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">language</span>
</span><span id="__span-6-3"><a id="__codelineno-6-3" name="__codelineno-6-3" href="#__codelineno-6-3"></a><span class="w"> </span><span class="nt">language_priority</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">en</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">es</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">fr</span><span class="p p-Indicator">]</span>
</span></code></pre></div>
<table>
<thead>
<tr>
<th></th>
<th>Result for an English title</th>
</tr>
</thead>
<tbody>
<tr>
<td>Default</td>
<td>English, Arabic, Bulgarian, Spanish, French, Japanese</td>
</tr>
<tr>
<td>With the list above</td>
<td>English, Spanish, French, Arabic, Bulgarian, Japanese</td>
</tr>
</tbody>
</table>
<p>unshackle removes nothing, unlike <code>-sl</code>, which drops every subtitle language it does not name.</p>
<p>Use <code>orig</code> in the list for the title's original language. A base tag puts the variant it
means first and its other regional forms after it, so <code>en</code> sorts <code>en-US</code> and then
<code>en-GB</code>, but <code>zh</code> does <strong>not</strong> cover <code>zh-Hant</code>, which you must name. A tag with a region sorts only that variant, so
<code>[en-US]</code> puts <code>en-US</code> before <code>en-GB</code>. The sort ignores entries that match no track, and
it ignores entries that are not valid language tags.</p>
<p><code>--exact-lang</code> applies here too: with it, <code>en</code> sorts only the variant it means, and
<code>en-GB</code> falls to the alphabetical tail with the rest. Name each tag you want when you use
that flag.</p>
</div>
<div class="admonition note">
<p class="admonition-title"><code>type_priority</code> alone does not pick the default subtitle</p>
<p>At mux time the <code>default</code> flag goes to every forced subtitle whose language matches the
default audio track, so a full dialogue track never becomes default on its own.
<code>type_priority</code> changes the order of the tracks in the file. It decides the flag only
between the tracks of one language, when you set <code>muxing.default_language.subtitle</code>. Set
<a href="#muxing"><code>muxing.default_subtitle_type</code></a> to name the type that gets the flag:</p>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-7-1"><a id="__codelineno-7-1" name="__codelineno-7-1" href="#__codelineno-7-1"></a><span class="nt">muxing</span><span class="p">:</span>
</span><span id="__span-7-2"><a id="__codelineno-7-2" name="__codelineno-7-2" href="#__codelineno-7-2"></a><span class="w"> </span><span class="nt">default_subtitle_type</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">normal</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">sdh</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">forced</span><span class="p p-Indicator">]</span>
</span><span id="__span-7-3"><a id="__codelineno-7-3" name="__codelineno-7-3" href="#__codelineno-7-3"></a><span class="w"> </span><span class="nt">default_language</span><span class="p">:</span>
</span><span id="__span-7-4"><a id="__codelineno-7-4" name="__codelineno-7-4" href="#__codelineno-7-4"></a><span class="w"> </span><span class="nt">subtitle</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">en</span>
</span></code></pre></div>
<p>Here the flag goes to the full English track, then to the English SDH track when the
title has no full one, then to the forced one. Without <code>default_language.subtitle</code>, the
first track of the type in file order gets the flag, in any language. A forced track is
the exception: it gets the flag only in the language of the default audio track.</p>
</div>
<h2 id="audio"><code>audio</code><a class="headerlink" href="#audio" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>dict</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>{}</code></li>
</ul>
<p>Audio handling options. The most notable sub-key is <strong><code>codec_priority</code></strong>, an ordered list of
audio codecs used to break ties in track selection. <strong><code>language_priority</code></strong> is an ordered list
of languages that sort to the top of the audio tracks.</p>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-8-1"><a id="__codelineno-8-1" name="__codelineno-8-1" href="#__codelineno-8-1"></a><span class="nt">audio</span><span class="p">:</span>
</span><span id="__span-8-2"><a id="__codelineno-8-2" name="__codelineno-8-2" href="#__codelineno-8-2"></a><span class="w"> </span><span class="nt">codec_priority</span><span class="p">:</span>
</span><span id="__span-8-3"><a id="__codelineno-8-3" name="__codelineno-8-3" href="#__codelineno-8-3"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">EAC3</span>
</span><span id="__span-8-4"><a id="__codelineno-8-4" name="__codelineno-8-4" href="#__codelineno-8-4"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">AC3</span>
</span><span id="__span-8-5"><a id="__codelineno-8-5" name="__codelineno-8-5" href="#__codelineno-8-5"></a><span class="w"> </span><span class="nt">language_priority</span><span class="p">:</span>
</span><span id="__span-8-6"><a id="__codelineno-8-6" name="__codelineno-8-6" href="#__codelineno-8-6"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">orig</span>
</span><span id="__span-8-7"><a id="__codelineno-8-7" name="__codelineno-8-7" href="#__codelineno-8-7"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">en</span>
</span></code></pre></div>
<div class="admonition note">
<p class="admonition-title"><code>codec_priority</code> is a soft priority: nothing is dropped</p>
<p><code>codec_priority</code> outranks bitrate: any listed codec sorts above every unlisted one, and among
listed codecs the list order decides. Bitrate order survives only within a single codec rank.
Nothing is ever removed. Two higher-level rules still override it: <strong>Atmos
tracks always take precedence over <code>codec_priority</code></strong>, and <strong>audio-description tracks are
always forced to the end</strong> regardless of it. When <code>codec_priority</code> is unset, tracks sort by
bitrate alone, with those same Atmos/descriptive rules still applied.</p>
</div>
<h2 id="muxing"><code>muxing</code><a class="headerlink" href="#muxing" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>dict</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>{}</code></li>
</ul>
<p>Matroska (MKV) muxing options.</p>
<table>
<thead>
<tr>
<th>Sub-key</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>set_title</code></td>
<td>bool</td>
<td><code>true</code></td>
<td>Write a human-readable title into the MKV container.</td>
</tr>
<tr>
<td><code>default_language</code></td>
<td>dict</td>
<td><code>{}</code></td>
<td>Force which language is flagged <em>default</em> per track type, e.g. <code>{audio: en, subtitle: en}</code>. A tag with a region, such as <code>en-US</code>, matches only that variant.</td>
</tr>
<tr>
<td><code>default_subtitle_type</code></td>
<td>str or list</td>
<td>unset</td>
<td>The subtitle types that can take the <em>default</em> flag, in order: <code>forced</code>, <code>normal</code>, <code>sdh</code> (CC counts as SDH, and <code>cc</code> is the same as <code>sdh</code>). The first subtitle track of the first type that the title has gets the flag. With <code>default_language.subtitle</code>, only the tracks in that language count. unshackle ignores a different word with a warning. <code>normal</code> is the value for players that read the forced flag. Read <a href="../../../guide/output-and-naming/#muxing-options">Muxing</a>.</td>
</tr>
<tr>
<td><code>merge_audio</code></td>
<td>bool</td>
<td><code>true</code></td>
<td>Merge all audio into one file. <code>--split-audio</code> on the CLI flips this off.</td>
</tr>
<tr>
<td><code>merge_video</code></td>
<td>bool</td>
<td><code>false</code></td>
<td>Merge video tracks that share height, range, and codec into one file, so only language varies inside a file. <code>--merge-video</code> on the CLI flips this on.</td>
</tr>
<tr>
<td><code>track_names</code></td>
<td>str</td>
<td><code>english</code></td>
<td>The language of the name unshackle gives a track that the service left unnamed: <code>english</code> (<code>Chinese (Traditional)</code>), <code>native</code>, the name in the language itself (<code>中文(繁體)</code>), or <code>none</code>, which leaves the track unnamed. Read <a href="../../../guide/output-and-naming/#track-names-and-language-tags">Track names and language tags</a>.</td>
</tr>
<tr>
<td><code>original_label</code></td>
<td>str</td>
<td>unset</td>
<td>Text that unshackle adds after the name of an audio or subtitle track in the title's original language, such as <code>[Original]</code>. Read <a href="../../../guide/output-and-naming/#track-names-and-language-tags">Track names and language tags</a>.</td>
</tr>
<tr>
<td><code>concurrency</code></td>
<td>int</td>
<td><code>4</code></td>
<td>How many mkvmerge processes run at the same time when a title muxes more than one output file (one per video variant or audio codec). Each process uses one CPU core, so this shortens the mux step on an SSD. Set it to <code>1</code> on a hard disk, where parallel writes are slower.</td>
</tr>
</tbody>
</table>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-9-1"><a id="__codelineno-9-1" name="__codelineno-9-1" href="#__codelineno-9-1"></a><span class="nt">muxing</span><span class="p">:</span>
</span><span id="__span-9-2"><a id="__codelineno-9-2" name="__codelineno-9-2" href="#__codelineno-9-2"></a><span class="w"> </span><span class="nt">set_title</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</span><span id="__span-9-3"><a id="__codelineno-9-3" name="__codelineno-9-3" href="#__codelineno-9-3"></a><span class="w"> </span><span class="nt">concurrency</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">4</span>
</span><span id="__span-9-4"><a id="__codelineno-9-4" name="__codelineno-9-4" href="#__codelineno-9-4"></a><span class="w"> </span><span class="nt">default_language</span><span class="p">:</span>
</span><span id="__span-9-5"><a id="__codelineno-9-5" name="__codelineno-9-5" href="#__codelineno-9-5"></a><span class="w"> </span><span class="nt">audio</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">en</span>
</span><span id="__span-9-6"><a id="__codelineno-9-6" name="__codelineno-9-6" href="#__codelineno-9-6"></a><span class="w"> </span><span class="nt">subtitle</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">en</span>
</span><span id="__span-9-7"><a id="__codelineno-9-7" name="__codelineno-9-7" href="#__codelineno-9-7"></a><span class="w"> </span><span class="nt">default_subtitle_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">normal</span>
</span></code></pre></div>
<h2 id="language_tags"><code>language_tags</code><a class="headerlink" href="#language_tags" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>dict</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>{}</code></li>
</ul>
<p>Language-tag remapping and the rule engine behind the <code>{lang_tag}</code> filename variable. When a
<code>rules</code> list is present, unshackle evaluates each rule in order and uses the first match's
<code>tag</code>. A rule can examine:</p>
<table>
<thead>
<tr>
<th>Condition</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>audio</code></td>
<td>At least one audio language matches.</td>
</tr>
<tr>
<td><code>audio_contain_all</code></td>
<td>Every listed language must be present in the audio.</td>
</tr>
<tr>
<td><code>subs_contain</code></td>
<td>At least one subtitle language matches.</td>
</tr>
<tr>
<td><code>subs_contain_all</code></td>
<td>Every listed language must be present in the subtitles.</td>
</tr>
<tr>
<td><code>dual</code> / <code>multi</code> / <code>dubbed</code></td>
<td><code>true</code> matches when that filename variable is set, <code>false</code> when it is not.</td>
</tr>
</tbody>
</table>
<p>Each language condition takes one language tag or a list of them. A list matches when <strong>any</strong>
entry matches, except <code>audio_contain_all</code> and <code>subs_contain_all</code>, which need them all. An empty
list never matches. An entry that is not a valid language tag (for example <code>japanese</code>) never
matches. A tag with a region matches only that variant, so <code>audio: es-419</code> does not match
<code>es-ES</code> audio. <code>dual</code>, <code>multi</code> and <code>dubbed</code> take a bare <code>true</code> or <code>false</code>, not a quoted string.
unshackle skips a rule with a condition name it does not know, or with any other value in a
boolean condition. It logs a warning in each of these cases and tries the next rule.</p>
<p><code>dual</code>, <code>multi</code> and <code>dubbed</code> carry the same meaning as the
<a href="#dual_multi_mode">filename variables of those names</a>. Pair one with a language to name a
release yourself, in place of the fixed <code>DUAL</code>, <code>MULTi</code> and <code>DUBBED</code> text. A rule that names
<code>dubbed: true</code> and a language tags a localized dub without tagging a native release the same way.</p>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-10-1"><a id="__codelineno-10-1" name="__codelineno-10-1" href="#__codelineno-10-1"></a><span class="nt">language_tags</span><span class="p">:</span>
</span><span id="__span-10-2"><a id="__codelineno-10-2" name="__codelineno-10-2" href="#__codelineno-10-2"></a><span class="w"> </span><span class="nt">rules</span><span class="p">:</span>
</span><span id="__span-10-3"><a id="__codelineno-10-3" name="__codelineno-10-3" href="#__codelineno-10-3"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">audio</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">ja</span><span class="p p-Indicator">]</span>
</span><span id="__span-10-4"><a id="__codelineno-10-4" name="__codelineno-10-4" href="#__codelineno-10-4"></a><span class="w"> </span><span class="nt">subs_contain</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">en</span><span class="p p-Indicator">]</span>
</span><span id="__span-10-5"><a id="__codelineno-10-5" name="__codelineno-10-5" href="#__codelineno-10-5"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="s">"SUBBED"</span>
</span><span id="__span-10-6"><a id="__codelineno-10-6" name="__codelineno-10-6" href="#__codelineno-10-6"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">audio</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">th</span>
</span><span id="__span-10-7"><a id="__codelineno-10-7" name="__codelineno-10-7" href="#__codelineno-10-7"></a><span class="w"> </span><span class="nt">dubbed</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</span><span id="__span-10-8"><a id="__codelineno-10-8" name="__codelineno-10-8" href="#__codelineno-10-8"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="s">"THAIDUB"</span>
</span><span id="__span-10-9"><a id="__codelineno-10-9" name="__codelineno-10-9" href="#__codelineno-10-9"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">audio</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">th</span>
</span><span id="__span-10-10"><a id="__codelineno-10-10" name="__codelineno-10-10" href="#__codelineno-10-10"></a><span class="w"> </span><span class="nt">dual</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</span><span id="__span-10-11"><a id="__codelineno-10-11" name="__codelineno-10-11" href="#__codelineno-10-11"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="s">"THAIDUAL"</span>
</span></code></pre></div>
<p>unshackle examines the rules in order, so put a rule that needs more languages before a rule that
needs fewer. Here, a release with both French dubs gets <code>VF2</code>, not <code>VFQ</code>:</p>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-11-1"><a id="__codelineno-11-1" name="__codelineno-11-1" href="#__codelineno-11-1"></a><span class="nt">language_tags</span><span class="p">:</span>
</span><span id="__span-11-2"><a id="__codelineno-11-2" name="__codelineno-11-2" href="#__codelineno-11-2"></a><span class="w"> </span><span class="nt">rules</span><span class="p">:</span>
</span><span id="__span-11-3"><a id="__codelineno-11-3" name="__codelineno-11-3" href="#__codelineno-11-3"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">audio_contain_all</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">fr-FR</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">fr-CA</span><span class="p p-Indicator">]</span>
</span><span id="__span-11-4"><a id="__codelineno-11-4" name="__codelineno-11-4" href="#__codelineno-11-4"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="s">"VF2"</span>
</span><span id="__span-11-5"><a id="__codelineno-11-5" name="__codelineno-11-5" href="#__codelineno-11-5"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">audio</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fr-CA</span>
</span><span id="__span-11-6"><a id="__codelineno-11-6" name="__codelineno-11-6" href="#__codelineno-11-6"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="s">"VFQ"</span>
</span><span id="__span-11-7"><a id="__codelineno-11-7" name="__codelineno-11-7" href="#__codelineno-11-7"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">audio</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fr-FR</span>
</span><span id="__span-11-8"><a id="__codelineno-11-8" name="__codelineno-11-8" href="#__codelineno-11-8"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="s">"VFF"</span>
</span></code></pre></div>
<div class="admonition tip">
<p class="admonition-title">Give regional tags in an <code>_all</code> list</p>
<p>A tag without a region also matches a regional track, so one <code>fr-CA</code> track satisfies both
entries of <code>[fr, fr-CA]</code>. Use <code>[fr-FR, fr-CA]</code> to require two different tracks.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Put <code>{lang_tag}</code> where you want the name</p>
<p>These rules fill <code>{lang_tag}</code>. To use your own name in place of the fixed text, keep
<code>{lang_tag?}</code> in the template and leave out <code>{dual?}</code>, <code>{multi?}</code> and <code>{dubbed?}</code>.</p>
</div>
<h2 id="dual_multi_mode"><code>dual_multi_mode</code><a class="headerlink" href="#dual_multi_mode" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>str</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>strict</code></li>
</ul>
<p>Rule set for the <code>{dual}</code>, <code>{multi}</code>, and <code>{dubbed}</code> filename variables.</p>
<div class="tabbed-set tabbed-alternate" data-tabs="1:2"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1"><code>strict</code> (default)</label><label for="__tabbed_1_2"><code>count</code> (legacy)</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
<table>
<thead>
<tr>
<th>Variable</th>
<th>Set when</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>{dual}</code></td>
<td>Exactly two audio languages <strong>and one is the title's original language</strong>.</td>
</tr>
<tr>
<td><code>{multi}</code></td>
<td>Three or more audio languages, even without the original.</td>
</tr>
<tr>
<td><code>{dubbed}</code></td>
<td>A single audio language that is not the title's original language (requires a known original).</td>
</tr>
</tbody>
</table>
</div>
<div class="tabbed-block">
<table>
<thead>
<tr>
<th>Variable</th>
<th>Set when</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>{dual}</code></td>
<td>Exactly two audio languages (original language ignored).</td>
</tr>
<tr>
<td><code>{multi}</code></td>
<td>Three or more audio languages.</td>
</tr>
<tr>
<td><code>{dubbed}</code></td>
<td>Never set.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-12-1"><a id="__codelineno-12-1" name="__codelineno-12-1" href="#__codelineno-12-1"></a><span class="nt">dual_multi_mode</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">strict</span>
</span></code></pre></div>
<div class="admonition note">
<p class="admonition-title">Dialects count as one language</p>
<p>Regional variants of the same base language (e.g. <code>en-US</code> and <code>en-GB</code>) collapse to a single
language in both modes, so they never trigger <code>{dual}</code> on their own. An individual language
counts as its macrolanguage: <code>cmn</code> and <code>zh</code> are one language, and so are <code>arb</code> and <code>ar</code>.
Norwegian <code>nb</code> (Bokmål) and <code>nn</code> (Nynorsk) count as <code>no</code>.
Cantonese (<code>yue</code>) stays separate, so <code>cmn</code> and <code>yue</code> audio give <code>{dual}</code>.</p>
</div>
<h2 id="hdr10plus_probe"><code>hdr10plus_probe</code><a class="headerlink" href="#hdr10plus_probe" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>bool</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>true</code></li>
</ul>
<p>Find the HDR10+ tracks that a service labels as HDR10. Before unshackle lists or selects tracks, it
reads the first fragment of HEVC HDR10 tracks from DASH, HLS fMP4 and one-file sources. A track
whose first frame carries HDR10+ (SMPTE ST 2094-40) metadata becomes <code>HDR10P</code>. Then <code>-r HDR10P</code>,
<code>--list</code> and <a href="../../../guide/downloading/#dolby-vision-without-a-dv-track"><code>--generate-dv</code></a> use it.</p>
<p>unshackle also probes HEVC Dolby Vision tracks. A DV track that carries HDR10+ keeps its <code>DV</code>
range, so <code>-r DV</code> selects it, and <code>--list</code> shows it as <code>DV+HDR10P</code>. <code>-r HYBRID</code> uses it as the
<a href="../../../guide/downloading/#colour-range">hybrid</a> of its resolution, with no base track. The
HDR10 tracks and the DV tracks of a title are sampled as two separate sets.</p>
<p>When two HDR10 tracks have the same resolution, they can be an HDR10 encode and an HDR10+ encode
side by side, so unshackle probes every track. When each track has its own resolution, unshackle
probes the two highest and the two lowest bitrates first:</p>
<table>
<thead>
<tr>
<th>Result</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>All four carry HDR10+</td>
<td>Every HDR10 track of the title becomes <code>HDR10P</code>.</td>
</tr>
<tr>
<td>Some carry HDR10+</td>
<td>The title has HDR10 and HDR10+ encodes side by side, so unshackle probes every track.</td>
</tr>
<tr>
<td>None carry HDR10+</td>
<td>Every track stays <code>HDR10</code>.</td>
</tr>
</tbody>
</table>
<p>A probe that fails, or a fragment whose metadata is encrypted, keeps the label from the service.
unshackle does not probe ISM tracks. Each probe makes one to three small requests: the 64 KiB
fragment, plus the playlist of an HLS track or the header of a one-file track. The probes run in
parallel, with no more at a time than <code>--workers</code> (or <code>dl.workers</code>) sets for a track download.</p>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-13-1"><a id="__codelineno-13-1" name="__codelineno-13-1" href="#__codelineno-13-1"></a><span class="nt">hdr10plus_probe</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</span></code></pre></div>
<p>A remote server probes its tracks before it sends them, so the setting on the server applies to
remote downloads and to the REST API.</p>
<h2 id="generate_dv_mode"><code>generate_dv_mode</code><a class="headerlink" href="#generate_dv_mode" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>Type:</strong> <code>str</code> &nbsp;·&nbsp; <strong>Default:</strong> <code>v29</code></li>
</ul>
<p>How <a href="../../../guide/downloading/#dolby-vision-without-a-dv-track"><code>--generate-dv</code></a> sets the Level 1 brightness
values of the Dolby Vision it makes from HDR10+. All modes make one shot per HDR10+ scene and keep the
same peak and letterbox area. They differ in the scene average, which the TV uses to tone-map.</p>
<table>
<thead>
<tr>
<th>Mode</th>
<th>Scene average</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>v29</code> (default)</td>
<td>unshackle's average from the HDR10+ brightness distribution, at least about 2.4 nits. Closest to the pixels.</td>
</tr>
<tr>
<td><code>v40</code></td>
<td>The same average, at least about 10 nits, as in studio Dolby Vision (CM v4.0). Dark scenes read brighter than <code>v29</code>.</td>
</tr>
<tr>
<td><code>legacy</code></td>
<td>The <code>dovi_tool generate --hdr10plus-json</code> average. Most scenes read brighter than the pixels.</td>
</tr>
</tbody>
</table>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-14-1"><a id="__codelineno-14-1" name="__codelineno-14-1" href="#__codelineno-14-1"></a><span class="nt">generate_dv_mode</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">v29</span>
</span></code></pre></div>
<p>Dolby Vision that unshackle measures from the decoded video uses its measured average in all modes.
<code>v40</code> raises the lowest average to about 10 nits, and <code>legacy</code> is the same as <code>v29</code>.</p>
<p>The setting applies on the machine that runs the hybrid step: the client for a remote download, the
server for a REST API job.</p>
</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="../services/" class="md-footer__link md-footer__link--prev" aria-label="Previous: Services &amp; Authentication">
<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">
Services & Authentication
</div>
</div>
</a>
<a href="../output/" class="md-footer__link md-footer__link--next" aria-label="Next: Output &amp; Naming">
<div class="md-footer__title">
<span class="md-footer__direction">
Next
</span>
<div class="md-ellipsis">
Output & Naming
</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>