getvideo - Download YouTube and other videos.
Version 0.218
getvideo -h|-?|--help getvideo getvideo url [url ...] getvideo -f|--file filename
Download single videos or choose videos from a playlist or an uploader.
Call getvideo followed by the space separated urls. The urls can also be entered after calling getvideo - this is useful if urls contain shell metacharacters like &. As an other possibility the urls can be passed with a file: getvideo -f|--file filename. The urls in the file have to be space separated.
getvideo
&
getvideo -f|--file filename
If a passed url results in more than one video, it is shown a menu with the video titles. The user can then choose from the menu which videos to download. It is possible to filter the video titles of the list menu with a regexp. The filter can be inverted by adding !~ and a space in front of the regexp.
!~
See "USAGE-AND-RETURN-VALUES" in Term::Choose how to select more items with the SpaceBar or Ctrl-SpaceBar.
SpaceBar
Ctrl
Before the download the script shows some video info and lets you choose the video quality from the available qualities. It is possible to choose more than one video format with the SpaceBar key. Instead of choosing the quality manually it is possible to set and use preferred qualities.
The different options of getvideo can be reached by calling getvideo -h.
getvideo -h
App::YTDL uses youtube-dl to get the data required for the video download. To list the supported extractors call getvideo -h and select the entry Youtube-dl > Extractors.
App::YTDL
Downloaded files from the same video-id are tried to merge if
- the option Merge is enabled. See "Merge".
- ffmpeg and ffprobe are available.
ffmpeg
ffprobe
- not more and not less than 2 files from the same video-id and the same extractor have been downloaded.
- one of these two files has only an audio stream.
- one of these two files has a video stream.
Shows this HELP text.
Shows the path and the version of the running getvideo, the path of the video and configuration directories and the version of youtube-dl. If ffmpeg and ffprobe are available, their version is also shown.
youtube-dl
Choose an alternative main video directory.
no
Don't create/use extractor directories.
yes
Create/use extractor directories.
Don't create/use uploader directories.
if from list-menu
Create/use uploader directories if the videos are chosen from an uploader or a playlist.
always
Always create/use uploader directories.
Set the maximum length of the filename. Filenames longer then the maximum length are truncated.
If enabled, spaces in filenames are replaced with underscores.
keep all
Keep all characters in filenames.
replace / \ : " * ? < > | &
Replace each character matching the character class ["\/\\:*?<>|&] with a hyphen.
["\/\\:*?<>|&]
Leading dots are removed.
replace /
Replace / with a hyphen.
/
don't encode
Don't encode the filename.
use Text::Unidecode
Map the filename with Text::Unidecode to ASCII.
Text::Unidecode
Change the timestamps of the downloaded videos to the their upload date.
Set the auto quality mode:
manually
Choose the video quality always manually
keep_uploader_playlist
Keep the first quality chosen for a video of a playlist/uploader for all videos of that playlist/uploader if possible.
keep_extractor
Keep the first quality chosen for a video of an extractor for all videos of that extractor if possible.
preferred
Use preferred qualities.
default
Use the default (best) quality.
Set the number of the available preferred qualities slots.
If the preferred quality/qualities set in a slot (beginning at the first slot) is/are not available, the quality/qualities from the next set slot is/are used.
Prints the set preferred qualities.
How to set the preferred qualities:
Set the option auto quality mode to manually, keep_uploader_playlist or keep_extractor. Then, when downloading a video, instead of selecting the desired video quality select the entry Menu and then the entry Preferred qualities.
Menu
Preferred qualities
Set the useragent string.
If entered nothing, the default useragent string (Mozilla/5.0) is used.
If enabled skips the download for videos, whose video-id is saved in a download-archive file (each extractor has its file). Enabling skip archived does not automatically enable the option download archive.
If enabled, getvideo overwrites existing files else getvideo appends to partially downloaded files.
Set the number of download retries.
Connection timeout in seconds.
ask
If set to 'yes', ffmpeg overwrites an existing file when merging two files into one file else the user will be asked what to do.
Choose the container format for the new file: mkv, mp4, ogg, webm or flv.
mkv
mp4
ogg
webm
flv
error
Show all errors.
warning
Show all warnings and errors.
info
Show informative messages during processing. This is in addition to warnings and errors.
keep
Keep the merged input files.
move to "STREAM_FILES"
Move the merged input files to the directory "STREAM_FILES". The directory "STREAM_FILES" is created (if it not already exits) in the directory where the input files were downloaded.
remove
Remove the merged input files.
Download archive disabled.
Save the video-id of the downloaded videos.
Save the video-id and other info (title, upload date, download date, uploader, format) of the downloaded videos.
If no arguments are passed to getvideo, the user can choose videos from uploaders saved in the history file and the sticky file.
Size history sets the limit of the number of uploaders saved in the history file. Setting size history to 0 disables the uploader-history.
0
An uploader can be made sticky. Uploaders made sticky don't count regarding the size history limit. An uploader made sticky gets also a new timestamp.
When added to the uploader-history an uploader gets the return value of time() as a timestamp. If the size history limit is reached, the uploader with the oldest timestamp is removed first.
time()
The supported extractors are YouTube and Vimeo.
Sort the history
by name
by timestamp
If fast list-menu is enabled, the download of the required data for the list-menu takes less time since the data required for the video downloads is fetched only later for the chosen videos.
With fast list-menu enabled a progress info is shown.
Supported extractors:
Vimeo (no view-count available).
YouTube (the upload-date is relative to now).
This option has no meaning if fast list-menu is not enabled. The supported extractors are Vimeo and YouTube.
all
Show (fetch info for) all videos of the uploader.
latest
Show only the latest videos. (Vimeo: 48 videos, YouTube: 50 videos).
Sort the list-menu entries by
upload date
If there is no upload date data for the list, the title is used instead to the sort the list.
title
view count
If there is no view count data for the list, the upload date is used instead to the sort the list.
duration
If there is no duration data for the list, the upload date is used instead to the sort the list.
if sorted by view count
Show the view count in the list-menu entries only when sorted by view count.
Show the view count always.
Some extractors don't provide a view count.
replace with *
If replace with * is selected, unmappable characters are replaced with * before the output on the screen.
*
If use Text::Unidecode is selected, unidecode() from Text::Unidecode tries to "translate" words not mappable to the console-out encoding to ASCII. The output of unidecode() always consists entirely of US-ASCII characters.
unidecode()
Set the maximum width of the video info output.
Set the number of digits allocated for the "kilobyte per seconds" template.
Enable the youtube-dl option --netrc. See youtube-dl --help for more info.
--netrc
youtube-dl --help
List the extractors supported by youtube-dl.
Requires Perl version 5.10.0 or greater.
A recent version of youtube-dl is required.
The merge feature requires ffmpeg and ffprobe.
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 Perl-Community.de and the people form stackoverflow for the help.
Kuerbis <cuer2s@gmail.com>
Copyright (C) 2013-2015 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.
To install App::YTDL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::YTDL
CPAN shell
perl -MCPAN -e shell install App::YTDL
For more information on module installation, please visit the detailed CPAN module installation guide.