eyed3.id3 package

Submodules

eyed3.id3.apple module

Here lies Apple frames, all of which are non-standard. All of these would have been standard user text frames by anyone not being a bastard, on purpose.

class eyed3.id3.apple.PCST(id=b'PCST')[source]

Bases: eyed3.id3.frames.Frame

Indicates a podcast. The 4 bytes of data is undefined, and is typically all 0.

render()[source]
class eyed3.id3.apple.TKWD(id=b'TKWD')[source]

Bases: eyed3.id3.frames.TextFrame

Podcast keywords.

class eyed3.id3.apple.TDES(id=b'TDES')[source]

Bases: eyed3.id3.frames.TextFrame

Podcast description. One encoding byte followed by text per encoding.

class eyed3.id3.apple.TGID(id=b'TGID')[source]

Bases: eyed3.id3.frames.TextFrame

Podcast URL of the audio file. This should be a W frame!

class eyed3.id3.apple.WFED(id=b'WFED', url='')[source]

Bases: eyed3.id3.frames.TextFrame

Another podcast URL, the feed URL it is said.

eyed3.id3.frames module

exception eyed3.id3.frames.FrameException(*args)[source]

Bases: eyed3.Error

class eyed3.id3.frames.Frame(*args, **kwargs)[source]

Bases: object

header
parse(*args, **kwargs)
render()[source]
static decompress(data)[source]
static compress(data)[source]
static decrypt(data)[source]
static encrypt(data)[source]
text_delim
encoding
class eyed3.id3.frames.TextFrame(*args, **kwargs)[source]

Bases: eyed3.id3.frames.Frame

Text frames. Data string format: encoding (one byte) + text

text
parse(data, frame_header)[source]
render()[source]
class eyed3.id3.frames.UserTextFrame(*args, **kwargs)[source]

Bases: eyed3.id3.frames.TextFrame

description
parse(data, frame_header)[source]

Data string format: encoding (one byte) + description + b”” + text

render()[source]
class eyed3.id3.frames.DateFrame(id, date='')[source]

Bases: eyed3.id3.frames.TextFrame

parse(data, frame_header)[source]
date
class eyed3.id3.frames.UrlFrame(*args, **kwargs)[source]

Bases: eyed3.id3.frames.Frame

url(*args, **kwargs)
parse(data, frame_header)[source]
render()[source]
class eyed3.id3.frames.UserUrlFrame(*args, **kwargs)[source]

Bases: eyed3.id3.frames.UrlFrame

Data string format: encoding (one byte) + description + b”” + url (ascii)

description
parse(data, frame_header)[source]
render()[source]
class eyed3.id3.frames.ImageFrame(*args, **kwargs)[source]

Bases: eyed3.id3.frames.Frame

OTHER = 0
ICON = 1
OTHER_ICON = 2
FRONT_COVER = 3
BACK_COVER = 4
LEAFLET = 5
MEDIA = 6
LEAD_ARTIST = 7
ARTIST = 8
CONDUCTOR = 9
BAND = 10
COMPOSER = 11
LYRICIST = 12
RECORDING_LOCATION = 13
DURING_RECORDING = 14
DURING_PERFORMANCE = 15
VIDEO = 16
BRIGHT_COLORED_FISH = 17
ILLUSTRATION = 18
MIN_TYPE = 0
MAX_TYPE = 20
URL_MIME_TYPE = b'-->'
URL_MIME_TYPE_STR = '-->'
URL_MIME_TYPE_VALUES = (b'-->', '-->')
description
mime_type
picture_type
parse(data, frame_header)[source]
render()[source]
static picTypeToString(t)[source]
static stringToPicType(s)[source]
makeFileName(name=None)[source]
class eyed3.id3.frames.ObjectFrame(*args, **kwargs)[source]

Bases: eyed3.id3.frames.Frame

description
mime_type
filename
parse(data, frame_header)[source]

Parse the frame from data bytes using details from frame_header.

Data string format: <Header for ‘General encapsulated object’, ID: “GEOB”> Text encoding $xx MIME type <text string> $00 Filename <text string according to encoding> $00 (00) Content description <text string according to encoding> $00 (00) Encapsulated object <binary data>

render()[source]
class eyed3.id3.frames.PrivateFrame(id=b'PRIV', owner_id=b'', owner_data=b'')[source]

Bases: eyed3.id3.frames.Frame

PRIV

parse(data, frame_header)[source]
render()[source]
class eyed3.id3.frames.MusicCDIdFrame(id=b'MCDI', toc=b'')[source]

Bases: eyed3.id3.frames.Frame

toc
parse(data, frame_header)[source]
class eyed3.id3.frames.PlayCountFrame(id=b'PCNT', count=0)[source]

Bases: eyed3.id3.frames.Frame

parse(data, frame_header)[source]
render()[source]
class eyed3.id3.frames.PopularityFrame(id=b'POPM', email=b'', rating=0, count=0)[source]

Bases: eyed3.id3.frames.Frame

Frame type for ‘POPM’ frames; popularity. Frame format: <Header for ‘Popularimeter’, ID: “POPM”> Email to user <text string> $00 Rating $xx Counter $xx xx xx xx (xx ...)

rating
email
count
parse(data, frame_header)[source]
render()[source]
class eyed3.id3.frames.UniqueFileIDFrame(id=b'UFID', owner_id=None, uniq_id=None)[source]

Bases: eyed3.id3.frames.Frame

parse(data, frame_header)[source]

Data format Owner identifier <text string> $00 Identifier up to 64 bytes binary data>

render()[source]
class eyed3.id3.frames.LanguageCodeMixin[source]

Bases: object

lang
class eyed3.id3.frames.DescriptionLangTextFrame(*args, **kwargs)[source]

Bases: eyed3.id3.frames.Frame, eyed3.id3.frames.LanguageCodeMixin

description
text
parse(data, frame_header)[source]
render()[source]
class eyed3.id3.frames.CommentFrame(id=b'COMM', description='', lang=b'eng', text='')[source]

Bases: eyed3.id3.frames.DescriptionLangTextFrame

class eyed3.id3.frames.LyricsFrame(id=b'USLT', description='', lang=b'eng', text='')[source]

Bases: eyed3.id3.frames.DescriptionLangTextFrame

class eyed3.id3.frames.TermsOfUseFrame(*args, **kwargs)[source]

Bases: eyed3.id3.frames.Frame, eyed3.id3.frames.LanguageCodeMixin

text
parse(data, frame_header)[source]
render()[source]
class eyed3.id3.frames.TocFrame(*args, **kwargs)[source]

Bases: eyed3.id3.frames.Frame

Table of content frame. There may be more than one, but only one may have the top-level flag set.

Data format: Element ID: <string>TOC flags: %000000ab Entry count: %xx Child elem IDs: <string>(... num entry count) Description: TIT2 frame (optional)

TOP_LEVEL_FLAG_BIT = 6
ORDERED_FLAG_BIT = 7
parse(data, frame_header)[source]
render()[source]
class eyed3.id3.frames.StartEndTuple(start, end)

Bases: tuple

A 2-tuple, with names ‘start’ and ‘end’.

end

Alias for field number 1

start

Alias for field number 0

class eyed3.id3.frames.ChapterFrame(id=b'CHAP', element_id=None, times=None, offsets=None, sub_frames=None)[source]

Bases: eyed3.id3.frames.Frame

Frame type for chapter/section of the audio file. <ID3v2.3 or ID3v2.4 frame header, ID: “CHAP”> (10 bytes) Element ID <text string> $00 Start time $xx xx xx xx End time $xx xx xx xx Start offset $xx xx xx xx End offset $xx xx xx xx <Optional embedded sub-frames>

NO_OFFSET = 4294967295

No offset value, aka “0xff0xff0xff0xff”

parse(data, frame_header)[source]
render()[source]
title
subtitle
user_url
class eyed3.id3.frames.FrameSet[source]

Bases: dict

parse(f, tag_header, extended_header)[source]

Read frames starting from the current read position of the file object. Returns the amount of padding which occurs after the tag, but before the audio content. A return valule of 0 does not mean error.

getAllFrames()[source]

Return all the frames in the set as a list. The list is sorted in an arbitrary but consistent order.

setTextFrame(*args, **kwargs)
eyed3.id3.frames.deunsyncData(data)[source]
eyed3.id3.frames.createFrame(tag_header, frame_header, data)[source]
eyed3.id3.frames.decodeUnicode(bites, encoding)[source]
eyed3.id3.frames.splitUnicode(data, encoding)[source]
eyed3.id3.frames.id3EncodingToString(encoding)[source]
eyed3.id3.frames.stringToEncoding(s)[source]
eyed3.id3.frames.map2_2FrameId(orig_id)[source]

eyed3.id3.headers module

class eyed3.id3.headers.TagHeader(version=(2, 4, 0))[source]

Bases: object

SIZE = 10
clear()[source]
version
major_version
minor_version
rev_version
parse(f)[source]

Parse an ID3 v2 header starting at the current position of f. If a header is parsed True is returned, otherwise False. If a header is found but malformed an eyed3.id3.tag.TagException is thrown.

render(tag_len=None)[source]
class eyed3.id3.headers.ExtendedTagHeader[source]

Bases: object

RESTRICT_TAG_SZ_LARGE = 0
RESTRICT_TAG_SZ_MED = 1
RESTRICT_TAG_SZ_SMALL = 2
RESTRICT_TAG_SZ_TINY = 3
RESTRICT_TEXT_ENC_NONE = 0
RESTRICT_TEXT_ENC_UTF8 = 1
RESTRICT_TEXT_LEN_NONE = 0
RESTRICT_TEXT_LEN_1024 = 1
RESTRICT_TEXT_LEN_128 = 2
RESTRICT_TEXT_LEN_30 = 3
RESTRICT_IMG_ENC_NONE = 0
RESTRICT_IMG_ENC_PNG_JPG = 1
RESTRICT_IMG_SZ_NONE = 0
RESTRICT_IMG_SZ_256 = 1
RESTRICT_IMG_SZ_64 = 2
RESTRICT_IMG_SZ_64_EXACT = 3
update_bit
crc_bit
crc
restrictions_bit
tag_size_restriction
tag_size_restriction_description
text_enc_restriction
text_enc_restriction_description
text_length_restriction
text_length_restriction_description
image_enc_restriction
image_enc_restriction_description
image_size_restriction
image_size_restriction_description
render(version, frame_data, padding=0)[source]
parse(fp, version)[source]

Parse an ID3 v2 extended header starting at the current position of fp and per the format defined by version. This method should only be called when the presence of an extended header is known since it moves the file position. If a header is found but malformed an eyed3.id3.tag.TagException is thrown. The return value is None.

class eyed3.id3.headers.FrameHeader(*args, **kwargs)[source]

Bases: object

A header for each and every ID3 frame in a tag.

TAG_ALTER = None
FILE_ALTER = None
READ_ONLY = None
COMPRESSED = None
ENCRYPTED = None
GROUPED = None
UNSYNC = None
DATA_LEN = None
copyFlags(rhs)[source]
major_version
minor_version
version
tag_alter
file_alter
read_only
compressed
encrypted
grouped
unsync
data_length_indicator
render(data_size)[source]
static parse(f, version)[source]

eyed3.id3.tag module

exception eyed3.id3.tag.TagException(*args)[source]

Bases: eyed3.Error

class eyed3.id3.tag.Tag(**kwargs)[source]

Bases: eyed3.core.Tag

clear()[source]

Reset all tag data.

parse(fileobj, version=(3, None, None))[source]
version
isV1()[source]

Test ID3 major version for v1.x

isV2()[source]

Test ID3 major version for v2.x

setTextFrame(*args, **kwargs)
getTextFrame(fid)[source]
comments
bpm
play_count
publisher
cd_id
images
encoding_date
best_release_date

This method tries its best to return a date of some sort, amongst alll the possible date frames. The order of preference for a release date is 1) date of original release 2) date of this versions release 3) the recording date. Or None is returned.

getBestDate(prefer_recording_date=False)[source]

This method returns a date of some sort, amongst all the possible date frames. The order of preference is:

  1. date of original release
  2. date of this versions release
  3. the recording date.

Unless prefer_recording_date is True in which case the order is 3, 1, 2.

None will be returned if no dates are available.

release_date

The date the audio was released. This is NOT the original date the work was released, instead it is more like the pressing or version of the release. Original release date is usually what is intended but many programs use this frame and/or don’t distinguish between the two.

original_release_date

The date the work was originally released.

recording_date

The date of the recording. Many applications use this for release date regardless of the fact that this value is rarely known, and release dates are more correct.

tagging_date
lyrics
disc_num
objects
privates
popularities
genre
non_std_genre

partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.

user_text_frames
commercial_url
copyright_url
audio_file_url
audio_source_url
artist_url
internet_radio_url
payment_url
publisher_url
user_url_frames
unique_file_ids
terms_of_use
save(filename=None, version=None, encoding=None, backup=False, preserve_file_time=False, max_padding=None)[source]

Save the tag. If filename is not give the value from the file_info member is used, or a TagException is raised. The version argument can be used to select an ID3 version other than the version read. Select text encoding with ``encoding or use the existing (or default) encoding. If backup is True the orignal file is preserved; likewise if preserve_file_time is True the file´s modification/access times are not updated.

static remove(filename, version=(3, None, None), preserve_file_time=False)[source]
chapters
table_of_contents
album_type
artist_origin

Returns a 3-tuple: (city, state, country) Any may be None.

frameiter(fids=None)[source]

A iterator for tag frames. If fids is passed it must be a list of frame IDs to filter and return.

class eyed3.id3.tag.FileInfo(file_name, tagsz=0, tpadd=0)[source]

Bases: object

This class is for storing information about a parsed file. It containts info such as the filename, original tag size, and amount of padding; all of which can make rewriting faster.

initStatTimes()[source]
touch(times)[source]

times is a 2-tuple of (atime, mtime).

class eyed3.id3.tag.AccessorBase(fid, fs, match_func=None)[source]

Bases: object

get(*args, **kwargs)[source]
remove(*args, **kwargs)[source]

Returns the removed item or None if not found.

class eyed3.id3.tag.DltAccessor(FrameClass, fid, fs)[source]

Bases: eyed3.id3.tag.AccessorBase

set(*args, **kwargs)
remove(*args, **kwargs)
get(*args, **kwargs)
class eyed3.id3.tag.CommentsAccessor(fs)[source]

Bases: eyed3.id3.tag.DltAccessor

class eyed3.id3.tag.LyricsAccessor(fs)[source]

Bases: eyed3.id3.tag.DltAccessor

class eyed3.id3.tag.ImagesAccessor(fs)[source]

Bases: eyed3.id3.tag.AccessorBase

set(*args, **kwargs)
remove(*args, **kwargs)
get(*args, **kwargs)
class eyed3.id3.tag.ObjectsAccessor(fs)[source]

Bases: eyed3.id3.tag.AccessorBase

set(*args, **kwargs)
remove(*args, **kwargs)
get(*args, **kwargs)
class eyed3.id3.tag.PrivatesAccessor(fs)[source]

Bases: eyed3.id3.tag.AccessorBase

set(data, owner_id)[source]
remove(owner_id)[source]
get(owner_id)[source]
class eyed3.id3.tag.UserTextsAccessor(fs)[source]

Bases: eyed3.id3.tag.AccessorBase

set(*args, **kwargs)
remove(*args, **kwargs)
get(*args, **kwargs)
class eyed3.id3.tag.UniqueFileIdAccessor(fs)[source]

Bases: eyed3.id3.tag.AccessorBase

set(data, owner_id)[source]
remove(owner_id)[source]
get(owner_id)[source]
class eyed3.id3.tag.UserUrlsAccessor(fs)[source]

Bases: eyed3.id3.tag.AccessorBase

set(*args, **kwargs)
remove(*args, **kwargs)
get(*args, **kwargs)
class eyed3.id3.tag.PopularitiesAccessor(fs)[source]

Bases: eyed3.id3.tag.AccessorBase

set(email, rating, play_count)[source]
remove(email)[source]
get(email)[source]
class eyed3.id3.tag.ChaptersAccessor(fs)[source]

Bases: eyed3.id3.tag.AccessorBase

set(element_id, times, offsets=(None, None), sub_frames=None)[source]
remove(element_id)[source]
get(element_id)[source]
class eyed3.id3.tag.TocAccessor(fs)[source]

Bases: eyed3.id3.tag.AccessorBase

set(*args, **kwargs)
remove(element_id)[source]
get(element_id)[source]
class eyed3.id3.tag.TagTemplate(pattern, path_friendly=True, dotted_dates=False)[source]

Bases: string.Template

pattern = re.compile('\n \\$(?:\n (?P<escaped>\\$) | # Escape sequence of two delimiters\n (?P<named>[_a-z][_a-z0-9:]*) | # delimiter and a Python identifier\n {(?P<braced>[_a-z][_a-z0-9:]*)} , re.IGNORECASE|re.VERBOSE)
idpattern = '[_a-z][_a-z0-9:]*'
substitute(tag, zeropad=True)[source]
safe_substitute(tag, zeropad=True)

Module contents

eyed3.id3.ID3_V1 = (1, None, None)

Version 1, 1.0 or 1.1

eyed3.id3.ID3_V1_0 = (1, 0, 0)

Version 1.0, specifically

eyed3.id3.ID3_V1_1 = (1, 1, 0)

Version 1.1, specifically

eyed3.id3.ID3_V2 = (2, None, None)

Version 2, 2.2, 2.3 or 2.4

eyed3.id3.ID3_V2_2 = (2, 2, 0)

Version 2.2, specifically

eyed3.id3.ID3_V2_3 = (2, 3, 0)

Version 2.3, specifically

eyed3.id3.ID3_V2_4 = (2, 4, 0)

Version 2.4, specifically

eyed3.id3.ID3_DEFAULT_VERSION = (2, 4, 0)

The default version for eyeD3 tags and save operations.

eyed3.id3.ID3_ANY_VERSION = (3, None, None)

Useful for operations where any version will suffice.

eyed3.id3.LATIN1_ENCODING = b'\x00'

Byte code for latin1

eyed3.id3.UTF_16_ENCODING = b'\x01'

Byte code for UTF-16

eyed3.id3.UTF_16BE_ENCODING = b'\x02'

Byte code for UTF-16 (big endian)

eyed3.id3.UTF_8_ENCODING = b'\x03'

Byte code for UTF-8 (Not supported in ID3 versions < 2.4)

eyed3.id3.DEFAULT_LANG = b'eng'

Default language code for frames that contain a language portion.

eyed3.id3.isValidVersion(v, fully_qualified=False)[source]

Check the tuple v against the list of valid ID3 version constants. If fully_qualified is True it is enforced that there are 3 components to the version in v. Returns True when valid and False otherwise.

eyed3.id3.normalizeVersion(v)[source]

If version tuple v is of the non-specific type (v1 or v2, any, etc.) a fully qualified version is returned.

eyed3.id3.versionToString(v)[source]

Conversion version tuple v to a string description.

exception eyed3.id3.GenreException(*args)[source]

Bases: eyed3.Error

Excpetion type for exceptions related to genres.

class eyed3.id3.Genre(*args, **kwargs)[source]

Bases: eyed3.compat.UnicodeMixin

A genre in terms of a name and and id. Only when name is a “standard” genre (as defined by ID3 v1) will id be a value other than None.

id

The Genre’s id property. When setting the value is strictly enforced and if the value is not a valid genre code a ValueError is raised. Otherwise the id is set and the name property is updated to the code’s string name.

name

The Genre’s name property. When setting the value the name is looked up in the standard genre map and if found the id ppropery is set to the numeric valud and the name is normalized to the sting found in the map. Non standard genres are set (with a warning log) and the id is set to None. It is valid to set the value to None.

static parse(*args, **kwargs)
class eyed3.id3.GenreMap(*args)[source]

Bases: dict

Classic genres defined around ID3 v1 but suitable anywhere. This class is used primarily as a way to map numeric genre values to a string name. Genre strings on the other hand are not required to exist in this list.

The optional *args are passed directly to the dict constructor.

GENRE_MIN = 0
GENRE_MAX = 191
ID3_GENRE_MIN = 0
ID3_GENRE_MAX = 79
WINAMP_GENRE_MIN = 80
WINAMP_GENRE_MAX = 191
class eyed3.id3.TagFile(path, version=(3, None, None))[source]

Bases: eyed3.core.AudioFile

A shim class for dealing with files that contain only ID3 data, no audio.

initTag(version=(2, 4, 0))[source]

Add a id3.Tag to the file (removing any existing tag if one exists).

eyed3.id3.ID3_GENRES = ['Blues', 'Classic Rock', 'Country', 'Dance', 'Disco', 'Funk', 'Grunge', 'Hip-Hop', 'Jazz', 'Metal', 'New Age', 'Oldies', 'Other', 'Pop', 'R&B', 'Rap', 'Reggae', 'Rock', 'Techno', 'Industrial', 'Alternative', 'Ska', 'Death Metal', 'Pranks', 'Soundtrack', 'Euro-Techno', 'Ambient', 'Trip-Hop', 'Vocal', 'Jazz+Funk', 'Fusion', 'Trance', 'Classical', 'Instrumental', 'Acid', 'House', 'Game', 'Sound Clip', 'Gospel', 'Noise', 'AlternRock', 'Bass', 'Soul', 'Punk', 'Space', 'Meditative', 'Instrumental Pop', 'Instrumental Rock', 'Ethnic', 'Gothic', 'Darkwave', 'Techno-Industrial', 'Electronic', 'Pop-Folk', 'Eurodance', 'Dream', 'Southern Rock', 'Comedy', 'Cult', 'Gangsta Rap', 'Top 40', 'Christian Rap', 'Pop / Funk', 'Jungle', 'Native American', 'Cabaret', 'New Wave', 'Psychedelic', 'Rave', 'Showtunes', 'Trailer', 'Lo-Fi', 'Tribal', 'Acid Punk', 'Acid Jazz', 'Polka', 'Retro', 'Musical', 'Rock & Roll', 'Hard Rock', 'Folk', 'Folk-Rock', 'National Folk', 'Swing', 'Fast Fusion', 'Bebob', 'Latin', 'Revival', 'Celtic', 'Bluegrass', 'Avantgarde', 'Gothic Rock', 'Progressive Rock', 'Psychedelic Rock', 'Symphonic Rock', 'Slow Rock', 'Big Band', 'Chorus', 'Easy Listening', 'Acoustic', 'Humour', 'Speech', 'Chanson', 'Opera', 'Chamber Music', 'Sonata', 'Symphony', 'Booty Bass', 'Primus', 'Porn Groove', 'Satire', 'Slow Jam', 'Club', 'Tango', 'Samba', 'Folklore', 'Ballad', 'Power Ballad', 'Rhythmic Soul', 'Freestyle', 'Duet', 'Punk Rock', 'Drum Solo', 'A Cappella', 'Euro-House', 'Dance Hall', 'Goa', 'Drum & Bass', 'Club-House', 'Hardcore', 'Terror', 'Indie', 'BritPop', 'Negerpunk', 'Polsk Punk', 'Beat', 'Christian Gangsta Rap', 'Heavy Metal', 'Black Metal', 'Crossover', 'Contemporary Christian', 'Christian Rock', 'Merengue', 'Salsa', 'Thrash Metal', 'Anime', 'JPop', 'Synthpop', 'Abstract', 'Art Rock', 'Baroque', 'Bhangra', 'Big Beat', 'Breakbeat', 'Chillout', 'Downtempo', 'Dub', 'EBM', 'Eclectic', 'Electro', 'Electroclash', 'Emo', 'Experimental', 'Garage', 'Global', 'IDM', 'Illbient', 'Industro-Goth', 'Jam Band', 'Krautrock', 'Leftfield', 'Lounge', 'Math Rock', 'New Romantic', 'Nu-Breakz', 'Post-Punk', 'Post-Rock', 'Psytrance', 'Shoegaze', 'Space Rock', 'Trop Rock', 'World Music', 'Neoclassical', 'Audiobook', 'Audio Theatre', 'Neue Deutsche Welle', 'Podcast', 'Indie Rock', 'G-Funk', 'Dubstep', 'Garage Rock', 'Psybient']

ID3 genres, as defined in ID3 v1. The position in the list is the genre’s numeric byte value.

eyed3.id3.genres = {0: 'Blues', 'blues': 0, 1: 'Classic Rock', 'classic rock': 1, 2: 'Country', 'country': 2, 3: 'Dance', 'dance': 3, 4: 'Disco', 'disco': 4, 5: 'Funk', 'funk': 5, 6: 'Grunge', 'grunge': 6, 7: 'Hip-Hop', 'hip-hop': 7, 8: 'Jazz', 'jazz': 8, 9: 'Metal', 'metal': 9, 10: 'New Age', 'new age': 10, 11: 'Oldies', 'oldies': 11, 12: 'Other', 'other': 12, 13: 'Pop', 'pop': 13, 14: 'R&B', 'r&b': 14, 15: 'Rap', 'rap': 15, 16: 'Reggae', 'reggae': 16, 17: 'Rock', 'rock': 17, 18: 'Techno', 'techno': 18, 19: 'Industrial', 'industrial': 19, 20: 'Alternative', 'alternative': 20, 21: 'Ska', 'ska': 21, 22: 'Death Metal', 'death metal': 22, 23: 'Pranks', 'pranks': 23, 24: 'Soundtrack', 'soundtrack': 24, 25: 'Euro-Techno', 'euro-techno': 25, 26: 'Ambient', 'ambient': 26, 27: 'Trip-Hop', 'trip-hop': 27, 28: 'Vocal', 'vocal': 28, 29: 'Jazz+Funk', 'jazz+funk': 29, 30: 'Fusion', 'fusion': 30, 31: 'Trance', 'trance': 31, 32: 'Classical', 'classical': 32, 33: 'Instrumental', 'instrumental': 33, 34: 'Acid', 'acid': 34, 35: 'House', 'house': 35, 36: 'Game', 'game': 36, 37: 'Sound Clip', 'sound clip': 37, 38: 'Gospel', 'gospel': 38, 39: 'Noise', 'noise': 39, 40: 'AlternRock', 'alternrock': 40, 41: 'Bass', 'bass': 41, 42: 'Soul', 'soul': 42, 43: 'Punk', 'punk': 43, 44: 'Space', 'space': 44, 45: 'Meditative', 'meditative': 45, 46: 'Instrumental Pop', 'instrumental pop': 46, 47: 'Instrumental Rock', 'instrumental rock': 47, 48: 'Ethnic', 'ethnic': 48, 49: 'Gothic', 'gothic': 49, 50: 'Darkwave', 'darkwave': 50, 51: 'Techno-Industrial', 'techno-industrial': 51, 52: 'Electronic', 'electronic': 52, 53: 'Pop-Folk', 'pop-folk': 53, 54: 'Eurodance', 'eurodance': 54, 55: 'Dream', 'dream': 55, 56: 'Southern Rock', 'southern rock': 56, 57: 'Comedy', 'comedy': 57, 58: 'Cult', 'cult': 58, 59: 'Gangsta Rap', 'gangsta rap': 59, 60: 'Top 40', 'top 40': 60, 61: 'Christian Rap', 'christian rap': 61, 62: 'Pop / Funk', 'pop / funk': 62, 63: 'Jungle', 'jungle': 63, 64: 'Native American', 'native american': 64, 65: 'Cabaret', 'cabaret': 65, 66: 'New Wave', 'new wave': 66, 67: 'Psychedelic', 'psychedelic': 67, 68: 'Rave', 'rave': 68, 69: 'Showtunes', 'showtunes': 69, 70: 'Trailer', 'trailer': 70, 71: 'Lo-Fi', 'lo-fi': 71, 72: 'Tribal', 'tribal': 72, 73: 'Acid Punk', 'acid punk': 73, 74: 'Acid Jazz', 'acid jazz': 74, 75: 'Polka', 'polka': 75, 76: 'Retro', 'retro': 76, 77: 'Musical', 'musical': 77, 78: 'Rock & Roll', 'rock & roll': 78, 79: 'Hard Rock', 'hard rock': 79, 80: 'Folk', 'folk': 80, 81: 'Folk-Rock', 'folk-rock': 81, 82: 'National Folk', 'national folk': 82, 83: 'Swing', 'swing': 83, 84: 'Fast Fusion', 'fast fusion': 84, 85: 'Bebob', 'bebob': 85, 86: 'Latin', 'latin': 86, 87: 'Revival', 'revival': 87, 88: 'Celtic', 'celtic': 88, 89: 'Bluegrass', 'bluegrass': 89, 90: 'Avantgarde', 'avantgarde': 90, 91: 'Gothic Rock', 'gothic rock': 91, 92: 'Progressive Rock', 'progressive rock': 92, 93: 'Psychedelic Rock', 'psychedelic rock': 93, 94: 'Symphonic Rock', 'symphonic rock': 94, 95: 'Slow Rock', 'slow rock': 95, 96: 'Big Band', 'big band': 96, 97: 'Chorus', 'chorus': 97, 98: 'Easy Listening', 'easy listening': 98, 99: 'Acoustic', 'acoustic': 99, 100: 'Humour', 'humour': 100, 101: 'Speech', 'speech': 101, 102: 'Chanson', 'chanson': 102, 103: 'Opera', 'opera': 103, 104: 'Chamber Music', 'chamber music': 104, 105: 'Sonata', 'sonata': 105, 106: 'Symphony', 'symphony': 106, 107: 'Booty Bass', 'booty bass': 107, 108: 'Primus', 'primus': 108, 109: 'Porn Groove', 'porn groove': 109, 110: 'Satire', 'satire': 110, 111: 'Slow Jam', 'slow jam': 111, 112: 'Club', 'club': 112, 113: 'Tango', 'tango': 113, 114: 'Samba', 'samba': 114, 115: 'Folklore', 'folklore': 115, 116: 'Ballad', 'ballad': 116, 117: 'Power Ballad', 'power ballad': 117, 118: 'Rhythmic Soul', 'rhythmic soul': 118, 119: 'Freestyle', 'freestyle': 119, 120: 'Duet', 'duet': 120, 121: 'Punk Rock', 'punk rock': 121, 122: 'Drum Solo', 'drum solo': 122, 123: 'A Cappella', 'a cappella': 123, 124: 'Euro-House', 'euro-house': 124, 125: 'Dance Hall', 'dance hall': 125, 126: 'Goa', 'goa': 126, 127: 'Drum & Bass', 'drum & bass': 127, 128: 'Club-House', 'club-house': 128, 129: 'Hardcore', 'hardcore': 129, 130: 'Terror', 'terror': 130, 131: 'Indie', 'indie': 131, 132: 'BritPop', 'britpop': 132, 133: 'Negerpunk', 'negerpunk': 133, 134: 'Polsk Punk', 'polsk punk': 134, 135: 'Beat', 'beat': 135, 136: 'Christian Gangsta Rap', 'christian gangsta rap': 136, 137: 'Heavy Metal', 'heavy metal': 137, 138: 'Black Metal', 'black metal': 138, 139: 'Crossover', 'crossover': 139, 140: 'Contemporary Christian', 'contemporary christian': 140, 141: 'Christian Rock', 'christian rock': 141, 142: 'Merengue', 'merengue': 142, 143: 'Salsa', 'salsa': 143, 144: 'Thrash Metal', 'thrash metal': 144, 145: 'Anime', 'anime': 145, 146: 'JPop', 'jpop': 146, 147: 'Synthpop', 'synthpop': 147, 148: 'Abstract', 'abstract': 148, 149: 'Art Rock', 'art rock': 149, 150: 'Baroque', 'baroque': 150, 151: 'Bhangra', 'bhangra': 151, 152: 'Big Beat', 'big beat': 152, 153: 'Breakbeat', 'breakbeat': 153, 154: 'Chillout', 'chillout': 154, 155: 'Downtempo', 'downtempo': 155, 156: 'Dub', 'dub': 156, 157: 'EBM', 'ebm': 157, 158: 'Eclectic', 'eclectic': 158, 159: 'Electro', 'electro': 159, 160: 'Electroclash', 'electroclash': 160, 161: 'Emo', 'emo': 161, 162: 'Experimental', 'experimental': 162, 163: 'Garage', 'garage': 163, 164: 'Global', 'global': 164, 165: 'IDM', 'idm': 165, 166: 'Illbient', 'illbient': 166, 167: 'Industro-Goth', 'industro-goth': 167, 168: 'Jam Band', 'jam band': 168, 169: 'Krautrock', 'krautrock': 169, 170: 'Leftfield', 'leftfield': 170, 171: 'Lounge', 'lounge': 171, 172: 'Math Rock', 'math rock': 172, 173: 'New Romantic', 'new romantic': 173, 174: 'Nu-Breakz', 'nu-breakz': 174, 175: 'Post-Punk', 'post-punk': 175, 176: 'Post-Rock', 'post-rock': 176, 177: 'Psytrance', 'psytrance': 177, 178: 'Shoegaze', 'shoegaze': 178, 179: 'Space Rock', 'space rock': 179, 180: 'Trop Rock', 'trop rock': 180, 181: 'World Music', 'world music': 181, 182: 'Neoclassical', 'neoclassical': 182, 183: 'Audiobook', 'audiobook': 183, 184: 'Audio Theatre', 'audio theatre': 184, 185: 'Neue Deutsche Welle', 'neue deutsche welle': 185, 186: 'Podcast', 'podcast': 186, 187: 'Indie Rock', 'indie rock': 187, 188: 'G-Funk', 'g-funk': 188, 189: 'Dubstep', 'dubstep': 189, 190: 'Garage Rock', 'garage rock': 190, 191: 'Psybient', 'psybient': 191, 192: None, 193: None, 194: None, 195: None, 196: None, 197: None, 198: None, 199: None, 200: None, 201: None, 202: None, 203: None, 204: None, 205: None, 206: None, 207: None, 208: None, 209: None, 210: None, 211: None, 212: None, 213: None, 214: None, 215: None, 216: None, 217: None, 218: None, 219: None, 220: None, 221: None, 222: None, 223: None, 224: None, 225: None, 226: None, 227: None, 228: None, 229: None, 230: None, 231: None, 232: None, 233: None, 234: None, 235: None, 236: None, 237: None, 238: None, 239: None, 240: None, 241: None, 242: None, 243: None, 244: None, 245: None, 246: None, 247: None, 248: None, 249: None, 250: None, 251: None, 252: None, 253: None, 254: None, 255: None, None: 255}

A map of standard genre names and IDs per the ID3 v1 genre definition.