Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Trouble with sox and MAD

  1. #1

    Default Trouble with sox and MAD

    I think I may be missing something simple here. I wrote a script to take multiple mp3 files and convert them to wav using sox. This script worked perfectly the last time I used it a couple months ago. Today, I found myself needing it again, but now sox will not run. Sox tells me that it cannot find the MAD decoder. I have both libmad and libmad0 installed. I used Yast to remove sox and tried to install sox from the source code. After ./configure, sox's build options summary says there will be no support for mad, despite the fact that I know it's installed.

    I tried to downgrade to an older version of mad, but that didn't make any difference. What the heck am I missing?

    --chriscrutch

  2. #2

    Default Re: Trouble with sox and MAD

    Code:
    $ file test.mp3 
    test.mp3: MPEG ADTS, layer III, v1, 128 kbps, 44.1 kHz, JntStereo
    $ sox -t mp3 test.mp3 test.wav
    $ file test.wav 
    test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz
    Works for me™ with

    Code:
    rpm -qa sox "libmad*"
    
    libmad0-0.15.1b-1.pm.3.1
    sox-14.3.0-99.pm.99.4

  3. #3

    Default Re: Trouble with sox and MAD

    My results:

    Code:
    $ file test.mp3
    test.mp3: Audio file with ID3 version 2.3, MP3 encoding
    $ sox -t mp3 test.mp3 test.wav
    sox FAIL mp3: could not find MAD decoder library (libmad)
    sox FAIL formats: can't open input file `test.mp3':
    And:
    Code:
    rpm -qa sox "libmad*"
    
    libmad0-0.15.1b-10.1
    sox-14.3.0-99.pm.99.4
    libmad0-32bit-0.15.1b-1.pm.3.1
    libmad-0.15.1b-16.1
    --chriscrutch

  4. #4

    Default Re: Trouble with sox and MAD

    Well, then you know what to remove and replace.

  5. #5

    Default Re: Trouble with sox and MAD

    Changes made, still results in failure:

    Code:
    $ sox -t mp3 test.mp3 test.wav
    sox FAIL mp3: could not find MAD decoder library (libmad)
    sox FAIL formats: can't open input file `test.mp3':
    And:
    Code:
    $ rpm -qa sox "libmad*"
    sox-14.3.0-99.pm.99.4
    libmad0-0.15.1b-1.pm.3.1

  6. #6

    Default Re: Trouble with sox and MAD

    Code:
    cat /etc/SuSE-release
    
    file $(which sox)
    
    rpm -qa --queryformat '%{name}-%{version}-%{arch}\n' "*sox*" "libmad*"
    
    su - -c "zypper se -si |grep -v pattern |grep i586"

  7. #7

    Default Re: Trouble with sox and MAD

    Suse version: x86_64.

    Sox version: sox-14.3.0-x86_64

    Libmad version: libmad0-0.15.1b-x86_64

    586 packages installed: flash-player, libflashsupport, master-boot-code, w32codec-all, wine. None of those packages have x86-64 versions available to install according to Yast and my subscribed repos.

    --chriscrutch

  8. #8

    Default Re: Trouble with sox and MAD

    Did you build _anything_ else from source?

    Code:
    whereis libmad.so.0 libmad.so
    You also missed out the output of the file-command.

  9. #9

    Default Re: Trouble with sox and MAD

    Sorry about the other output.
    Code:
    $ file $(which sox)
    /usr/bin/sox: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), not stripped
    I have installed lots of things from source over the course of the last three years (when I first started running Suse), I don't recall whether any of them were audio-related. I also know that the only thing I've installed from source since the last time I knew that sox worked was not audio-related and has since been removed.

    Code:
    $ whereis libmad.so.0 libmad.so
    libmad.so: /usr/lib64/libmad.so.0
    libmad:
    --chriscrutch

  10. #10

    Default Re: Trouble with sox and MAD

    Now that's interesting:

    Code:
    whereis libmad.so.0 libmad.so
    libmad.so: /usr/lib64/libmad.so /usr/lib64/libmad.so.0
    libmad: /usr/lib64/libmad.so
    See the difference?

    I presume sox searches for libmad.so (instead of libmad.so.0) and does not find it.

    But here comes the real fun:

    Code:
    ls -l /usr/lib64/libmad.so
    lrwxrwxrwx 1 root root 11 12. Jan 01:54 /usr/lib64/libmad.so -> libmad.so.0
    
    rpm -qf /usr/lib64/libmad.so
    file /usr/lib64/libmad.so is not owned by any package
    So this symlink must have been set by myself some time ago (and I forgot about it) or it might be some "leftover" from an older version.

    However, some more research shows, that this file has been moved to the package "libmad-devel", so try installing that one and see what that does to your problem.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •