Matthäus Kiem > App-YTDL > yt-download


Annotate this POD

View/Report Bugs


yt-download - Download YouTube videos.


Version 0.022


    yt-download -h|-?|--help


    yt-download url|id [url|id ...]

    yt-download -f|--file filename

When passing only the id instead of the entire url it is needed to prefix every playlist id with p# and every channel id with c#.

Video ids are passed without any prefix.

The ids/urls can be entered after calling yt-download - this is useful if urls contain shell metacharacters like &.

The ids/urls can also be passed with a file: yt-download -f|--file filename. The urls/id in the file have to be space separated.


Download single YouTube videos or/and choose videos from playlists or/and channels.

When choosing from a channel or list it is possible to filter the displayed items with a regexp.

Before the download the script shows some video info and lets you choose the video quality from the available qualities.

Instead of choosing the quality manually it is possible to set and use preferred qualities.

To set the different options call yt-download -h.

App::YTDL uses youtube-dl to get the data required for the video download.

Legacy encodings

Non mappable characters on the output are replaced with *. In file names they are replaced with &#xNNN; where NNN is the Unicode code point in a decimal number.

Options ^


Shows this HELP text.


Shows the version and the path of the running yt-download and the path of the video directory, of the log file and of the configuration file.


Sets the useragent.

If entered nothing the default useragent (Mozilla/5.0) is used.


If Overwrite is enabled, existing files are overwritten.

If not enabled yt-download appends to partially downloaded file with the same name.

Set auto quality

Sets the auto quality (fmt) mode:

Preferred qualities

Sets the preferred qualities (fmts)

Download retries

Sets the number of download retries.

Connection timeout

timeout (seconds) is used as the value for the youtube-dl parameter --socket-timeout. timeout is also used as the value for the LWP::UserAgent option timeout when fetching the data required for the video download.

Enable logging

Enables info logging.

Max info width

Sets the maximum width of video info output.

Auto width

Increase the info output width automatically if the info text is long.

Max filename length

Sets the maximum length of the filename. Filenames longer as the maximum length are truncated.

Digits for "k/s"

Sets the number of digits allocated for the "kilobyte per seconds" template.

Video directory

Choose an alternative YouTube video directory.

Channel history

How many channels should be saved in the channel history file. Setting Channel history to "0" disables the channel


If no arguments are passed to yt-download the user can choose from the channels saved in the channel history file.

Sort order

If set to "YES" the latest videos from a channel/list are on top of the menu else they are at the end of the menu.


Perl version

Requires Perl version 5.10.0 or greater.


youtube-dl is required.

Encoding layer

For a correct output it is required an appropriate encoding layer for STDOUT matching the terminal's character set.

Monospaced font

It is required a terminal that uses a monospaced font which supports the printed characters.


App::YTDL uses youtube-dl to get the data required for the video download.

Thanks to the and the people form stackoverflow for the help.


Kuerbis <>


Copyright (C) 2013-2014 Kuerbis.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For details, see the full text of the licenses in the file LICENSE.

syntax highlighting: