[linux-audio-dev] Sound file format detection?

Frank Neumann beachnase at web.de
Mon Oct 3 08:51:57 UTC 2005


Hi list,
On Sun, 2 Oct 2005 19:55:17 +0200
Frank Barknecht <fbar at footils.org> wrote:

[..]

> > Additionally, libsndfile support wouldnt be that bad either, so, I am
> > wondering, is there a reliable way to detect a audio streams file
> > format just given some bits of the header?  
> 
> The "file" command can specify a lot of file formats just from some
> magic bits, see /etc/magic, /usr/share/misc/file/magic and magic(5)
> for this. 

Additionally, the "magic" command and its detection abilities are
separated nowadays - at least on my Debian system with "file" version 4.03
you also get the packages "libmagic1" and "libmagic-dev" which allow to
use "file" functionality in any C/C++ program. Try "man 3 libmagic".

Greetings,
Frank



More information about the Linux-audio-dev mailing list