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

Steven Richman junk+flac at shift9.com
Wed Oct 29 07:06:04 PST 2003


Hi Derek,

If you are on a system that has "tr", "awk", and pipelines, the following 
should give you the duration in seconds:

metaflac --show-total-samples --show-sample-rate foo.flac | tr '\n' ' ' | awk '{print $1/$2}' -

,steven.

On Tue, 28 Oct 2003, 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?





More information about the Flac-dev mailing list