--- Kevin Seghetti <[EMAIL PROTECTED]> wrote:
> I am working on an audio jukebox and would like to read the length of
> a
> song (minutes:seconds) from a perl script. Is there a way to do that?
> I
> don't see anything in the docs for flac or metaflac.

you can get the total number of samples with

  metaflac --show-total-samples file.flac

then get the sample rate with 

  metaflac --show-sample-rate file.flac

divide the first by the second and that gets you the number of
seconds.

there is also a perl module Audio::FLAC that does all this:

  http://search.cpan.org/~daniel/Audio-FLAC-0.7/FLAC.pm

Josh



                
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Flac-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/flac-users

Reply via email to