> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/yt-dlp/yt-dlp/llms.txt
> Use this file to discover all available pages before exploring further.

# Filesystem Options

> Configure output paths, filenames, file handling, metadata files, and cookies

## Input Sources

<ParamField path="-a, --batch-file" type="string">
  File containing URLs to download ("-" for stdin), one URL per line

  Lines starting with "#", ";" or "]" are considered as comments and ignored

  **Example:**

  ```bash theme={null}
  yt-dlp -a urls.txt
  cat urls.txt | yt-dlp -a -
  ```
</ParamField>

<ParamField path="--no-batch-file" type="flag" default="true">
  Do not read URLs from batch file
</ParamField>

## Output Path Configuration

<ParamField path="-P, --paths" type="string">
  The paths where the files should be downloaded

  Format: `[TYPES:]PATH`

  Specify the type of file and the path separated by a colon ":". All the same TYPES as `--output` are supported. Additionally, you can also provide "home" (default) and "temp" paths.

  All intermediary files are first downloaded to the temp path and then the final files are moved over to the home path after download is finished.

  This option is ignored if `--output` is an absolute path.

  **Example:**

  ```bash theme={null}
  yt-dlp -P ~/Downloads -P "temp:/tmp" URL
  ```
</ParamField>

<ParamField path="-o, --output" type="string">
  Output filename template

  Format: `[TYPES:]TEMPLATE`

  See "OUTPUT TEMPLATE" for details

  **Example:**

  ```bash theme={null}
  yt-dlp -o "%(title)s.%(ext)s" URL
  yt-dlp -o "%(uploader)s/%(title)s-%(id)s.%(ext)s" URL
  ```
</ParamField>

<ParamField path="--output-na-placeholder" type="string" default="NA">
  Placeholder for unavailable fields in `--output`
</ParamField>

## Filename Restrictions

<ParamField path="--restrict-filenames" type="flag">
  Restrict filenames to only ASCII characters, and avoid "&" and spaces in filenames
</ParamField>

<ParamField path="--no-restrict-filenames" type="flag" default="true">
  Allow Unicode characters, "&" and spaces in filenames
</ParamField>

<ParamField path="--windows-filenames" type="flag">
  Force filenames to be Windows-compatible
</ParamField>

<ParamField path="--no-windows-filenames" type="flag">
  Sanitize filenames only minimally
</ParamField>

<ParamField path="--trim-filenames" type="number">
  Limit the filename length (excluding extension) to the specified number of characters

  **Example:**

  ```bash theme={null}
  yt-dlp --trim-filenames 100 URL
  ```
</ParamField>

## File Overwrite Behavior

<ParamField path="-w, --no-overwrites" type="flag">
  Do not overwrite any files
</ParamField>

<ParamField path="--force-overwrites" type="flag">
  Overwrite all video and metadata files

  This option includes `--no-continue`
</ParamField>

<ParamField path="--no-force-overwrites" type="flag" default="true">
  Do not overwrite the video, but overwrite related files
</ParamField>

<ParamField path="-c, --continue" type="flag" default="true">
  Resume partially downloaded files/fragments
</ParamField>

<ParamField path="--no-continue" type="flag">
  Do not resume partially downloaded fragments. If the file is not fragmented, restart download of the entire file
</ParamField>

<ParamField path="--part" type="flag" default="true">
  Use .part files instead of writing directly into output file
</ParamField>

<ParamField path="--no-part" type="flag">
  Do not use .part files - write directly into output file
</ParamField>

## File Timestamps

<ParamField path="--mtime" type="flag">
  Use the Last-modified header to set the file modification time
</ParamField>

<ParamField path="--no-mtime" type="flag" default="true">
  Do not use the Last-modified header to set the file modification time
</ParamField>

## Metadata Files

<ParamField path="--write-description" type="flag">
  Write video description to a .description file
</ParamField>

<ParamField path="--no-write-description" type="flag" default="true">
  Do not write video description
</ParamField>

<ParamField path="--write-info-json" type="flag">
  Write video metadata to a .info.json file

  This may contain personal information
</ParamField>

<ParamField path="--no-write-info-json" type="flag" default="true">
  Do not write video metadata
</ParamField>

<ParamField path="--write-playlist-metafiles" type="flag" default="true">
  Write playlist metadata in addition to the video metadata when using `--write-info-json`, `--write-description` etc.
</ParamField>

<ParamField path="--no-write-playlist-metafiles" type="flag">
  Do not write playlist metadata when using `--write-info-json`, `--write-description` etc.
</ParamField>

<ParamField path="--clean-info-json" type="flag" default="true">
  Remove some internal metadata such as filenames from the infojson
</ParamField>

<ParamField path="--no-clean-info-json" type="flag">
  Write all fields to the infojson
</ParamField>

## Comments

<ParamField path="--write-comments" type="flag">
  Retrieve video comments to be placed in the infojson

  The comments are fetched even without this option if the extraction is known to be quick

  Alias: `--get-comments`
</ParamField>

<ParamField path="--no-write-comments" type="flag">
  Do not retrieve video comments unless the extraction is known to be quick

  Alias: `--no-get-comments`
</ParamField>

<ParamField path="--load-info-json" type="string">
  JSON file containing the video information (created with the `--write-info-json` option)

  **Example:**

  ```bash theme={null}
  yt-dlp --load-info-json video.info.json
  ```
</ParamField>

## Cookies

<ParamField path="--cookies" type="string">
  Netscape formatted file to read cookies from and dump cookie jar in

  **Example:**

  ```bash theme={null}
  yt-dlp --cookies cookies.txt URL
  ```
</ParamField>

<ParamField path="--no-cookies" type="flag" default="true">
  Do not read/dump cookies from/to file
</ParamField>

<ParamField path="--cookies-from-browser" type="string">
  The name of the browser to load cookies from

  Format: `BROWSER[+KEYRING][:PROFILE][::CONTAINER]`

  Supported browsers: `brave`, `chrome`, `chromium`, `edge`, `firefox`, `opera`, `safari`, `vivaldi`, `whale`

  Optionally:

  * KEYRING used for decrypting Chromium cookies on Linux
  * Name/path of the PROFILE to load cookies from
  * CONTAINER name (if Firefox) ("none" for no container)

  By default, all containers of the most recently accessed profile are used.

  Supported keyrings: `basictext`, `gnomekeyring`, `kwallet`, `kwallet5`, `kwallet6`

  **Example:**

  ```bash theme={null}
  yt-dlp --cookies-from-browser chrome URL
  yt-dlp --cookies-from-browser firefox:default::container1 URL
  ```
</ParamField>

<ParamField path="--no-cookies-from-browser" type="flag" default="true">
  Do not load cookies from browser
</ParamField>

## Cache

<ParamField path="--cache-dir" type="string">
  Location in the filesystem where yt-dlp can store some downloaded information (such as client ids and signatures) permanently

  Default: `${XDG_CACHE_HOME}/yt-dlp`

  **Example:**

  ```bash theme={null}
  yt-dlp --cache-dir ~/.cache/yt-dlp URL
  ```
</ParamField>

<ParamField path="--no-cache-dir" type="flag">
  Disable filesystem caching
</ParamField>

<ParamField path="--rm-cache-dir" type="flag">
  Delete all filesystem cache files
</ParamField>

## Thumbnail Options

<ParamField path="--write-thumbnail" type="flag">
  Write thumbnail image to disk

  **Example:**

  ```bash theme={null}
  yt-dlp --write-thumbnail URL
  ```
</ParamField>

<ParamField path="--no-write-thumbnail" type="flag" default="true">
  Do not write thumbnail image to disk
</ParamField>

<ParamField path="--write-all-thumbnails" type="flag">
  Write all thumbnail image formats to disk

  **Example:**

  ```bash theme={null}
  yt-dlp --write-all-thumbnails URL
  ```
</ParamField>

<ParamField path="--list-thumbnails" type="flag">
  List available thumbnails of each video

  Simulate unless `--no-simulate` is used

  **Example:**

  ```bash theme={null}
  yt-dlp --list-thumbnails URL
  ```
</ParamField>

## Internet Shortcut Options

<ParamField path="--write-link" type="flag">
  Write an internet shortcut file, depending on the current platform (.url, .webloc or .desktop)

  The URL may be cached by the OS

  **Example:**

  ```bash theme={null}
  yt-dlp --write-link URL
  ```
</ParamField>

<ParamField path="--write-url-link" type="flag">
  Write a .url Windows internet shortcut

  The OS caches the URL based on the file path
</ParamField>

<ParamField path="--write-webloc-link" type="flag">
  Write a .webloc macOS internet shortcut
</ParamField>

<ParamField path="--write-desktop-link" type="flag">
  Write a .desktop Linux internet shortcut
</ParamField>
