[Flac-dev] command-line flac tool to report song length?

Matt Zimmerman mdz at debian.org
Wed Oct 29 11:39:13 PST 2003


On Tue, Oct 28, 2003 at 10:38:54PM -0800, Derek at CD Baby wrote:

> I've got a bunch of flac files and need to report their length.
> 
> With MP3s, you use `mp3info -x $filename`
> 
> But is there a way to find out the length (minutes:seconds or just
> seconds) of a flac audio file, without converting it to WAV first?

You can get this indirectly from metaflac by calculating it from the sample
rate, channels and total samples.  It could presumably be enhanced to
calculate it into a nicely-formatted time display.

-- 
 - mdz




More information about the Flac-dev mailing list