subparams - get-iplayer/get_iplayer GitHub Wiki

Substitution parameters

(Return to ToC)

The following substitution parameters are available to certain options such as --command and --fileprefix. They are expanded into the corresponding values for the current programme being recorded. Preview the values for a specific programme with --info.

A limited subset of substitution parameters (corresponding to fields in programme index cache) can be used to format search results with the --listformat option. Only items marked with an asterisk (*) below are available for use with --listformat.

<available>(*)     = date/time programme available (ISO8601 format)
<brand>            = programme brand title
<categories>       = all programme categories (comma-separated list)
<category>         = main programme category
<channel>(*)       = programme channel
<credits>          = full path of downloaded programme credits file (if requested)
<cuesheet>         = full path of downloaded cue sheet file (if requested)
<desc>(*)          = brief description
<desclong>         = long description
<descmedium>       = medium description
<descshort>        = short description
<dir>              = directory of output media file
<dldate>           = date when the file was obtained in YYYY-MM-DD format
<dltime>           = time when the file was obtained in hh:mm:ss format
<duration>(*)      = programme duration in seconds
<episode>(*)       = episode title incl. episode number if available (not films)
<episodenum>(*)    = episode number (may be absent)
<episodepart>      = letter denoting part of multi-part episode
<episodeshort>     = episode title with episode number stripped (not films)
<expires>(*)       = time when programme will expire (epoch format)
<ext>              = filename extension of recorded file
<filename>         = full path of output media file
<filepart>         = full path of partially downloaded media stream
<fileprefix>       = filename prefix for files associated with programme
<firstbcast>       = date/time when programme was first broadcast (ISO8601 format)
<firstbcastdate>   = date portion of <firstbcast> in YYYY-MM-DD format
<firstbcastday>    = day portion of <firstbcastdate>
<firstbcastmonth>  = month portion of <firstbcastdate>
<firstbcastrel>    = relative time when programme was first broadcast
<firstbcasttime>   = time portion of <firstbcast> in hh:mm:ss format
<firstbcastyear>   = year portion of <firstbcastdate>
<index>(*)         = index number (changes with every cache refresh)
<longname>         = programme long name
<mode>             = stream used to record programme
<modeshort>        = stream used to record programme with stream number stripped
<name>(*)          = programme name
<nameshort>        = programme name with series number stripped
<pid>(*)           = programme ID
<player>           = episode player URL
<quality>          = recording quality of programme
<rawaudio>         = audio file produced with --raw from DASH TV streams
<rawvideo>         = video file produced with --raw from DASH TV streams
<releaseyear>      = year programme originally released if available, else <firstbcastyear>
<runtime>          = programme runtime in minutes
<sebcast>          = <firstbcast> in YYYYMMDDhhmm format
<sebcastdate>      = date portion of <sebcast> in YYYYMMDD format
<sebcasttime>      = time portion of <sebcast> in hhmm format
<senum>            = series and episode numbers in s##e## format (may be absent)
<senumx>           = series and episode numbers in ##x## format (may be absent)
<sesort>           = <senum> if present, else <sebcast>
<sesortx>          = <senumx> if present, else <sebcast>
<series>           = series title (may be absent)
<seriesnum>(*)     = series number (may be absent)
<seriessort>       = <series> if present, else <firstbcastyear>
<subsfile>         = full path of downloaded subtitles file [SRT] (if requested)
<subspart>         = full path of partially downloaded raw subtitles file (TTML) (if requested)
<subsraw>          = full path of downloaded raw subtitles file [TTML] (if requested)
<thumbfile>        = full path of downloaded thumbnail file (if requested)
<thumbnail>(*)     = programme thumbnail URL (only default size with `--list-format`)
<timeadded>(*)     = time when programme was added to cache (epoch format)
<title>            = programme full title
<tracklist>        = full path of downloaded track list file (if requested)
<type>(*)          = programme type: tv, radio
<verpid>           = PID of recorded version
<version>          = selected version, e.g, 'signed'
<web>(*)           = episode info URL
⚠️ **GitHub.com Fallback** ⚠️