Skip to content
dinkypumpkin edited this page Aug 22, 2018 · 25 revisions

Metadata Tagging

Click here for all metadata tagging options (Return to ToC)

Tag Scheme

get_iplayer uses the AtomicParsley utility to add metadata tags to output files in MP4 and M4A format. The table below describes the scheme used to convert get_iplayer metadata into tags for downloaded programmes. The tag names were selected to match AtomicParsley parameter names. Each tag is mapped, where possible, to the corresponding get_iplayer substitution parameter, AtomicParsley arg, MP4 atom. The list of iTunes fields indicate where each tag will appear in the iTunes Get Info dialog. Conversion rules specific to particular fields are indicated in the footnotes. If you wish to experiment with variations, the conversion of get_iplayer metadata to tag values is encapsulated in the Tagger::tags_from_metadata subroutine.

The TV* and hdvideo tags are written to video files only. The iTunes podcast-related tags are written when a --tag-podcast option is specified. All other tags are written to all files.

Tag Name Substitution Param1 AtomicParsley arg MP4 atom iTunes Field
stik2 <ext> --stik stik Options:Media Kind
advisory3 <guidance> --advisory rtng Summary:Advisory
copyright4 <dldate> --copyright cprt Summary:Copyright
title <episode>5 --title ©nam Info:Song/Title
artist <channel> --artist ©ART Info:Artist
albumArtist BBC <type>6 --albumArtist aART Info:Album Artist
album <name> --album ©alb Info:Album/Programme
grouping <categories> --grouping ©grp Info:Grouping
composer BBC iPlayer --composer ©wrt Info:Composer
comment <descshort> --comment ©cmt Info:Comments
genre7 <categories> --genre ©ge Info:Genre
year <firstbcast>8 --year ©day Info:Year
tracknum <episodenum> --tracknum trkn Info:Track Number
disk <seriesnum> --disk disk Info:Disc Number
lyrics <desc>9 --lyrics ©lyr Lyrics
description <descshort> --description desc Video:Description
longDescription <desc> --longdesc10 OR
--longDescription11
ldes (Hidden):Long Description
hdvideo12 <mode> --hdvideo13 hdvd (Browser):HD Icon
TVShowName <name> --TVShowName tvsh Video:Show
TVEpisode <senum>14 --TVEpisode tven Video:Episode ID
TVSeasonNum <seriesnum> --TVSeasonNum tvsh Video:Season Number
TVEpisodeNum <episodenum> --TVEpisodeNum tves Video:Episode Number
TVNetwork <channel> --TVNetwork tvnn (Hidden):TV Network
artwork <thumbfile> --artwork covr Artwork
podcastFlag15 true --podcastFlag pcst Options:Media Kind
category15 <categories>16 --category catg (Hidden):Podcast Category
keyword15 <categories> --keyword keyw (Hidden):Podcast Keywords
podcastGUID15 <player> --podcastGUID egid (Hidden):Podcast GUID
  1. Full list of substitution parameters may be found here.

  2. TV Show if MP4/M4V, Movie if MP4/M4V and <categories> contains "Film", Normal otherwise

  3. explicit if <guidance> non-empty, remove otherwise

  4. Year taken from <dldate>, e.g.: (C) 2011 British Broadcasting Corporation, all rights reserved

  5. Use --tag-format-title="<title>" for full title

  6. BBC TV, BBC Radio

  7. First item in <categories> used unless it is one of: ("Films", "Sign Zone", "Audio Described", "Northern Ireland", "Scotland", "Wales", "England"), in which case second item is used. If <categories> is empty, set to get_iplayer

  8. If <firstbcast> is not valid date, current date is used

  9. <player> and <web> appended if present

  10. Not available with all AtomicParsley versions

  11. Not available with all AtomicParsley versions

  12. true if <mode> contains "hd", false otherwise

  13. Not available with all AtomicParsley versions

  14. If <senum> empty, <pid> is used

  15. --tag-podcast required

  16. Uses same rules as genre [7]

Re-tagging files

Metadata tags can be added (or re-added) to existing files with the --tag-only option. Use --pid to identify the programme whose metadata is to be used and --tag-only-filename to identify the file to modify.

get_iplayer --pid=b08h31x5 --tag-only --tag-only-filename="Weather_for_the_Week_Ahead_-_2017-03-13_b08h31x5_original.mp4"

Notes

Obsolete AtomicParsley

Some Linux/BSD distros ship obsolete versions of AtomicParsley. Tagging will likely fail on large files (>4GB) if you are using AtomicParsley < 0.9.4, and there may be other problems. You may be able to install an alternate version of AtomicParsley - see manual installation. See the AtomicParsley Bitbucket repository for instructions on building your own up-to-date version. If you use Windows or macOS and follow the installation instructions, you will have an up-to-date build of AtomicParsley.

Content Encoding

The get_iplayer metadata is assumed to be encoded as UTF-8 and is then re-encoded as necessary for the different tagging applications. This doesn't always hold true, so substitution characters may sometimes appear in the tags, particularly lyrics or longDescription.

Clone this wiki locally