Header(3pm) User Contributed Perl Documentation Header(3pm)

Audio::FLAC::Header - interface to FLAC header metadata.

        use Audio::FLAC::Header;
        my $flac = Audio::FLAC::Header->new("song.flac");
        my $info = $flac->info();
        foreach (keys %$info) {
                print "$_: $info->{$_}\n";
        }
        my $tags = $flac->tags();
        foreach (keys %$tags) {
                print "$_: $tags->{$_}\n";
        }

This module returns a hash containing basic information about a FLAC file, a representation of the embedded cue sheet if one exists, as well as tag information contained in the FLAC file's Vorbis tags. There is no complete list of tag keys for Vorbis tags, as they can be defined by the user; the basic set of tags used for FLAC files include:

        ALBUM
        ARTIST
        TITLE
        DATE
        GENRE
        TRACKNUMBER
        COMMENT

The information returned by Audio::FLAC::info is keyed by:

        MINIMUMBLOCKSIZE
        MAXIMUMBLOCKSIZE
        MINIMUMFRAMESIZE
        MAXIMUMFRAMESIZE
        TOTALSAMPLES
        SAMPLERATE
        NUMCHANNELS
        BITSPERSAMPLE
        MD5CHECKSUM

Information stored in the main hash that relates to the file itself or is calculated from some of the information fields is keyed by:

        trackLengthMinutes      : minutes field of track length
        trackLengthSeconds      : seconds field of track length
        trackLengthFrames       : frames field of track length (base 75)
        trackTotalLengthSeconds : total length of track in fractional seconds
        bitRate                 : average bits per second of file
        fileSize                : file size, in bytes

Opens a FLAC file, ensuring that it exists and is actually an FLAC stream, then loads the information and comment fields.

<http://flac.sourceforge.net/format.html>

Dan Sully, <daniel@cpan.org>

Pure perl code Copyright (c) 2003-2004, Erik Reckase.

Pure perl code Copyright (c) 2003-2007, Dan Sully & Slim Devices. Pure perl code Copyright (c) 2008-2009, Dan Sully

XS code Copyright (c) 2004-2007, Dan Sully & Slim Devices. XS code Copyright (c) 2008-2009, Dan Sully

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.

2024-10-14 perl v5.40.0