[linux-audio-dev] Length of a soundfile in a script

Eric Dantan Rzewnicki rzewnickie at rfa.org
Thu Jul 8 14:40:52 UTC 2004


On Thu, Jul 08, 2004 at 05:14:30PM +1000, Erik de Castro Lopo wrote:
> On Wed, 7 Jul 2004 22:34:58 -0600
> Hans Fugal <hans at fugal.net> wrote:
> 
> > I thought sox might be able to do it but I don't see it if it's there. I
> > want to know how long (in time) an audio file is. 
> 
> On my machine:
> 
>     erikd at coltrane > sndfile-info Sound/HelpDesk.wav | grep ^Duration
>     Duration    : 00:00:41.616
> 
> The sndfile-info program is part of libsndfile. In Debian it gets
> installed when you install the sndfile-programs package.
> 
> Erik

ecasound includes ecalength which does what you want as well. (probably
via libsndfile, so it's likely just another interface to the same code.)

-Eric Rz.



More information about the Linux-audio-dev mailing list