[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sox "unknown file type" problem.



On Nov 10, 2007 9:58 AM, R. Clayton <rvclayton@acm.org> wrote:

>   ku file gargantula.mp3
>   gargantula.mp3: Audio file with ID3 version 22.0 tag, MP3 encoding
>
>   ku sox gargantula.mp3 gargantula.ogg
>   sox soxio: Failed reading `gargantula.mp3': unknown file type `mp3'
>

I am using Lenny as well. Same thing happens on a random mp3 file here.

I further do:

dfox@m206-157:/tmp$ ldd `which sox`
        linux-gate.so.1 =>  (0xffffe000)
        libsox.so.0 => /usr/lib/libsox.so.0 (0xb7f6a000)
        libsfx.so.0 => /usr/lib/libsfx.so.0 (0xb7f40000)
        libsamplerate.so.0 => /usr/lib/libsamplerate.so.0 (0xb7f24000)
        libltdl.so.3 => /usr/lib/libltdl.so.3 (0xb7f1d000)
        libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7f19000)
        libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7ef4000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7dab000)
        /lib/ld-linux.so.2 (0xb7fa5000)

Notice there is no library for mp3 or ogg vorbis.

However, the tags on 'apt-cache show sox' tell that it's supposed to
support mp3 and ogg vorbis.

But it also fails on reading an ogg file, randomly sampled from my
small collection of ogg files.

If you're trying to convert from mp3 files to ogg ones you may lose
some fidelity. But I would use another process to do the conversions.

Having played around with using mpg123 to send the audio data to a
file - or to a pipe, then reading it raw with sox to getnerate a wav I
run into trouble. It's been a while since I did these types of
conversions with sox directly.

One would think that something along the lines of

$ mpg123 -s Coast\ to\ Coast\ -\ Oct\ 03\ 2007\ -\ Hour\ 1.mp3 >data

then
$ sox -t raw -ul -c1 -r 44100 < data -t wav foo.wav

would work, but I get 'unknown file type 'au'. Suspect that not
remembering the file format mpg123 sends to stdout is possible.  (Is
it unsigned longs, floats, or something else?)

There's a -w switch to output as wav, but playing with that produced
no or undesirable results. I couldn't get it to work, no matter what,
it's trying to interpret the -w as a song title.

So, in my opinion, it's either pilot error (very possible) or
something is seriously broken in either or both of mpg123 or, likely,
sox, as I distinctly remember being able to convert and/or play ogg
files on the fly with this tool.

Since 'play' no longer plays mp3's or ogg files directly (and play is
a link to 'sox'), and the tags for the sox package indicate it should
be able to do this, it seems a bug report should be filed.



Reply to: