Search
gatecrasher777 edited this page Oct 25, 2021
·
7 revisions
General options and
--features -F live|4k|hd|subtitles|cc|360|vr180|3d|hdr|location|purchased
you can add one (ie -F live) or more (ie -F live -F hd) features from:
* live - only include live videos
* 4k - only include videos with 4k resolution
* hd - only include videos with high definition
* subtitles - only include videos with subtitles or close captions
* cc - only include videos published under creative commons licence
* 360 - only include 360 degree videos
* vr180 - only include virtual reality 180 degree videos
* 3d - only include 3 dimensional videos
* hdr - only include videos with high dynamic range
* location - only include videos with geolocation tagging
* purchased - only include videos you have purchased
--items -i any|videos|channels|playlists|movies - what items to search for - default: videos
* any - results may include videos, channels or playlists
* videos - results must contain videos only (default)
* playlists - results must contain playlists only
* channels - results must contain channels only
* movies - results must contain movies (videos tagged as movies)
--length -l any|short|medium|long - length of videos to include in search results
* any - videos of any length (default)
* short - videos less than 4 minutes long
* medium - videos from 4 to 20 minutes long
* long - videos longer than 20 minutes
--order -o relevance|age|views|rating - order of results - one of
* relevance - in order of relevance to search term
* age - in age order, newest to oldest
* views - in order of view count, most to least
* rating - in order of like/dislike rating (1 to 5)
--period -P hour|day|week|month|year|any - search result period - default: day
--query -q string - provide a search term - default: "video"
--quantity -Q number - if available the number of results will equal or exceed this number - default: 100
General options and
--audioFormat -A number - specific audio stream number to download - default: -1 (use preference algorithm and
fallback streams)
--audioQuality -a highest|medium|lowest|none - audio quality preference - none for video only - default: medium
--container -C any|mp4|webm|mkv - provide your container preference - default: any
* any - no preference between mp4 (h264 with aac) or webm
(vp9 with opus) (default)
* mp4 - prefers mp4 codecs to webm codecs when quality is equal
* webm - prefers webm codecs to mp4 codecs when quality is equal
* mkv - no preference and can additionally allow mixed formats
(vp9 with aac) or (mp4 with opus).
* mp3 - force audio only download and convert aac/opus to .mp3
* flac - force audio only download and convert aac/opus to lossless .flac
--features -F live|4k|hd|subtitles|cc|360|vr180|3d|hdr|location|purchased
you can add one (ie -F live) or more (ie -F live -F hd) features from:
* live - only include live videos
* 4k - only include videos with 4k resolution
* hd - only include videos with high definition
* subtitles - only include videos with subtitles or close captions
* cc - only include videos published under creative commons licence
* 360 - only include 360 degree videos
* vr180 - only include virtual reality 180 degree videos
* 3d - only include 3 dimensional videos
* hdr - only include videos with high dynamic range
* location - only include videos with geolocation tagging
* purchased - only include videos you have purchased
--filename -f string - supply a filename - you can use the following placeholders in your filename string,
such as:
* ${audioCodec} - aac or opus
* ${author} - channel display name
* ${channel} - channel id of video
* ${date} - YYYYMMDD - published date for video
* ${datetime} - YYYYMMDD HHMMSS - published date & time for video
* ${id} - video id
* ${timestamp} - unix timestamp - seconds since the epoch, published timestamp for video
* ${title} - video title
* ${videoCodec} - h264 or vp9
* ${videoQuality} - i.e. 1080p, 360p, etc
* ${...} - you can use any other video/channel/search info properties
Default filename: "${author}_${datetime}_${title}_${id}_${videoQuality}_${videoCodec}_${audioCodec}"
--items -i any|videos|channels|playlists|movies - what items to search for - default: videos
* any - results may include videos, channels or playlists
* videos - results must contain videos only
* playlists - results must contain playlists only
* channels - results must contain channels only
* movies - results must contain movies (videos tagged as movies)
--length -l any|short|medium|long - length of videos to include in search results
* any - videos of any length (default)
* short - videos less than 4 minutes long
* medium - videos from 4 to 20 minutes long
* long - videos longer than 20 minutes
--limit -L number [number] - limit concurrent downloads (default 10) and the total number of downloads (optional)
--mediaBitrate -M highest|lowest - prefered bitrate when quality of two streams is equal - default: highest
--metadata -m author|title|description|keywords|published|comment|key [string] - video property to embed in
downloaded file - one or more (i.e. -m author -m title) of
* author - reflects as AUTHOR in webm/mkv containers, as artist in mp4 containers
* title - reflects as TITLE in webm/mkv containers, as title in mp4 containers
* description - reflects as DESCRIPTION in webm/mkv containers, as description in mp4 containers
* keywords - reflects as KEYWORDS in webm/mkv containers, as synopsis in mp4 containers
* published - reflects as DATE in webm/mkv containers, as date in mp4 containers
* comment text - custom text, reflects as COMMENT in webm/mkv, as comment in mp4 containers
* key value - custom key, custom value. key must be a single word without spaces
[string] is required for a comment metadata, and if specified for any other metadata fields its value
will be used to override the fetched video property.
--order -o relevance|age|views|rating - order of results - one of
* relevance - in order of relevance to search term
* age - in age order, newest to oldest
* views - in order of view count, most to least
* rating - in order of like/dislike rating (1 to 5)
--overwrite -O yes|no - whether to download existing files again.
* yes - video will be downloaded again and overwrite the existing file.
* no - video downloading will be skipped. (default)
--path -p string - video download path. Defaults to the current directory.
--period -P hour|day|week|month|year|any - search result period - default: day
--query -q string - provide a search term - default: "video"
--quantity -Q number - if available the number of results will equal or exceed this number - default: 100
--subtitles -b string - specify subtitle languages to download as .srt files if available. Use comma separated
language codes, for example 'es,es,ja' for english, spanish and Japanese. See * link below for codes.
--videoFormat -V number - specific video stream to download. Default: -1 (use preference algorithm and fallback streams)
--videoQuality -v highest|1080p|720p|480p|medium|360p|240p|144p|lowest|none - video quality preference - none for
audio only - default 1080p
- See language codes
Get the 40 most viewed short "soccer" videos in the past month
>ytcog-dl --result --query "soccer" --quantity 40 --order views --period month --length short
>ytcog-dl -r -q "soccer" -Q 40 -o views -P month -l short
Download the top 10 videos of the previous query
>ytcog-dl --download --query "soccer" --quantity 40 --order views --period month --length short --limit 10 10
>ytcog-dl -d -q "soccer" -Q 40 -o views -P month -l short -L 10 10