Re: [LAU] Calculating total play time

From: F. Silvain <silvain@email-addr-hidden>
Date: Wed Feb 04 2015 - 00:58:45 EET

Janina Sajka, Feb 3 2015:

> Hi,
>
> I need to calculate the total playing time of the audio files in a
> particular folder. These are variously encoded--flac, ogg, and even some
> mp3.
Hey Janina,
ecalength from the Ecatools[1] can do some, but mostly fails on ogg. I'm not sure how accurate it works on MP3s. Mplayer1 tends to get it wrong, but supports all the rest in MP3 very well. So caution! Length info is easily extracted.
sndfile-info[1] can do anything but MP3.sndinfo[3] also uses libsndfile and comes with csound. It also lacks MP3 support. Also easily parsable with awk.
A simple check on extensions can help in a shell script to process all but MP3 with the sndfile based tools. No idea on output format.
[1] http://www.eca.cx/ecasound
(package name: ecasound, perhaps ecatools in addition)
[2] http://www.mega-nerd.com/libsndfile
(package name(s): sndfile-tools, sndfile-programs and/or libsndfile1)
[3] http://www.csounds.com or http://csound.github.io
(package name: csound)
Package names are based on Debian packages.
...

Ta-ta

----
Ffanci
* Internet: https://freeshell.de/~silvain
Twitter: http://twitter.com/ffanci_silvain
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Wed Feb 4 04:15:03 2015

This archive was generated by hypermail 2.1.8 : Wed Feb 04 2015 - 04:15:03 EET