The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Audio::Metadata - Manipulate metadata in audio files

DESCRIPTION

The aim of this module suite is to read and write metadata in various audio formats with minimum limitations and no dependencies on external libraries.

This module defines the API and implements common methods. Format-specific functionality is implemented in subclasses of Audio::Metadata, such as Audio::Metadata::Flac.

SYNOPSIS

 my $metadata = Audio::Metadata->new_from_path('/home/user/audio/song.flac');
 $metadata->set_var(artist => 'Joe Zawinul');
 $metadata->save;

METHODS AND FUNCTIONS

new_from_path($file_path)

    Builds object from file name given as string. Reads file with given name and returns an object representing it. Object is of type specific to the codec, i.e.: Audio::Tag::PlainText::AudioFile::Flac, Audio::Tag::PlainText::AudioFile::Mp3

file_path($extension)

    Returns absolute path to the file.

get_var($var)

    Returns value of specified metadata variable.

set_var($var, $value)

    Sets specified metadata variable to given value. Value of 'undef' will prompt removal of the variable, if underlying format permits.

vars_as_hash()

    Returns metadata as hash reference.

as_text()

    Returns complete file information as space-separated key/value pairs in multi-line string.

save()

    Writes metadata to file.

file_to_text($path)

    Class method. Returns text metadata for the specified file.

AUTHOR

Egor Shipovalov, <kogdaugodno at gmail.com>

BUGS

Please report any bugs or feature requests to bug-webservice-blogger at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Audio-Metadata. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Audio::Metadata

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright 2010 Egor Shipovalov.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.