
It can get this information from an ID3v1-tag, or an ID3v2-tag (from COMM frame with empty field), CDDB file (from EXTD or EXTT fields), or. (Deprecated name 'song' can be used instead of 'title' as well.) comment() $comment = $mp3->comment() # empty string unless foundĬomment() returns comment information. If an optional argument 'from' is given, the returned values (title, track number, artist, album name, the file comment, the year and genre) are array references with the first element being the value, the second the tag ( ID3v2 or ID3v1 or Inf or CDDB_File or Cue or filename) from which it is taken. If comment, year or genre are found, the hash will have keys 'comment' and/or 'year' and/or 'genre' too. The hash has four keys 'title', 'track', 'artist' and 'album' where the information is stored. You can change the order of lookup with the config() command.Īutoinfo() returns an array with the information or a hashref. The comment, year and genre are found differently, via the comment, year and genre methods. inf-file, and if these are not present either, it will use the filename to retrieve the title, track number, artist, album name. If this cannot be found it tries to find a ID3v1-tag, then to read an CDDB file, an. It will as default first try to find a ID3v2-tag to get this information. It can get this information from an ID3v1-tag, an ID3v2-tag, from CDDB file, from. This can be also called as MP3::Tag->genres autoinfo() ($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->autoinfo() Īutoinfo() returns information about the title, track number, artist, album name, the file comment, the year and genre. This function is only a shortcut to MP3::Tag::ID3v1->genres. Returns a list of all genres (reference to an array), or the according name or id to a given id or name. Normally this is done automatically by the module, so that you do not need to do this. You can use close() to explicitly close a file. $mp3->select_id3v2_frame_by_descr('TALB', 'New album name') # Edit in memory $mp3->title_set('New title') # Edit in-memory copy ($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->autoinfo() # get some information about the file in the easiest way

MP3::Tag - Module for reading tags of MP3 audio files SYNOPSIS use MP3::Tag
