id3

package
v0.0.0-...-c3d92d9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package id3 implements basic ID3 parsing for MP3 files.

Instead of providing access to every single ID3 frame this package exposes only the ID3v2 header and a few basic fields such as the artist, album, year, etc...

Index

Constants

This section is empty.

Variables

View Source
var ID3v1Frames = []ID3v1Frame{
	{"title", 30},
	{"artist", 30},
	{"album", 30},
	{"year", 4},
	{"comment", 30},
}
View Source
var ID3v22Tags = map[string]string{
	"TAL": "album",
	"TP1": "artist",
	"TP2": "band",
	"TBP": "bpm",
	"COM": "comments",
	"TCM": "composer",
	"TP3": "conductor",
	"TCR": "copyright",
	"TDA": "date",
	"TPA": "disc",
	"TEN": "encodedby",
	"TSS": "encoder",
	"TCO": "genre",
	"TT1": "group",
	"TLA": "language",
	"TMT": "media",
	"TOA": "originalartist",
	"TPB": "publisher",
	"TT2": "title",
	"TRK": "track",
	"TXT": "writer",
	"TYE": "year",
}
View Source
var ID3v23Tags = map[string]string{
	"TALB": "album",
	"TPE1": "artist",
	"TPE2": "band",
	"TBPM": "bpm",
	"COMM": "comments",
	"TCOM": "composer",
	"TPE3": "conductor",
	"TCOP": "copyright",
	"TDAT": "date",
	"TPOS": "disc",
	"TENC": "encodedby",
	"TSSE": "encoder",
	"TCON": "genre",
	"TIT1": "group",
	"TLAN": "language",
	"TLEN": "length",
	"TMED": "media",
	"TOPE": "originalartist",
	"TPUB": "publisher",
	"TIT2": "title",
	"TRCK": "track",
	"TEXT": "writer",
	"TYER": "year",
}
View Source
var ID3v24Tags = map[string]string{
	"TALB": "album",
	"TPE1": "artist",
	"TPE2": "band",
	"TBMP": "bpm",
	"COMM": "comments",
	"TCOM": "composer",
	"TPE3": "conductor",
	"TCOP": "copyright",
	"TDAT": "date",
	"TPOS": "disc",
	"TENC": "encodedby",
	"TSSE": "encoder",
	"TCON": "genre",
	"TIT1": "group",
	"TLAN": "language",
	"TLEN": "length",
	"TMED": "media",
	"TOPE": "originalartist",
	"TPUB": "publisher",
	"TIT2": "title",
	"TRCK": "track",
	"TEXT": "writer",
	"TDRC": "year",
}

Functions

func ISO8859_1ToUTF8

func ISO8859_1ToUTF8(data []byte) string

func ReadFile

func ReadFile(reader io.ReadSeeker) (map[string]string, error)

ReadFile parses seekable stream for ID3 information. Returns nil if ID3 tag is not found or parsing fails.

Types

type ID3v1Frame

type ID3v1Frame struct {
	// contains filtered or unexported fields
}

type ID3v2Header

type ID3v2Header struct {
	Version           int
	MinorVersion      int
	Unsynchronization bool
	Extended          bool
	Experimental      bool
	Footer            bool
	Size              int32
}

A parsed ID3v2 header as defined in Section 3 of http://id3.org/id3v2.4.0-structure

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL