openSUSE Forums > Applications > Multimedia » Trouble with sox and MAD

Go Back   openSUSE Forums > Applications > Multimedia
Forums FAQ Members List Search Today's Posts Mark Forums Read


Multimedia Questions about media applications, codecs (DVD, music, video, pdf) configuration (usage, bugs)

Reply
Page 1 of 2 1 2
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 29-Sep-2009, 16:29
Puzzled Penguin
 
Join Date: Jun 2008
Posts: 39
chriscrutch hasn't been rated much yet
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
Reply With Quote
  #2 (permalink)  
Old 29-Sep-2009, 16:34
Wise Penguin
 
Join Date: Mar 2009
Posts: 1,824
Akoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the rough
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
__________________
“Never attribute to malice that which can be adequately explained by stupidity.” (R.J. Hanlon)
Reply With Quote
  #3 (permalink)  
Old 29-Sep-2009, 17:47
Puzzled Penguin
 
Join Date: Jun 2008
Posts: 39
chriscrutch hasn't been rated much yet
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
Reply With Quote
  #4 (permalink)  
Old 29-Sep-2009, 17:55
Wise Penguin
 
Join Date: Mar 2009
Posts: 1,824
Akoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the rough
Default Re: Trouble with sox and MAD

Well, then you know what to remove and replace.
__________________
“Never attribute to malice that which can be adequately explained by stupidity.” (R.J. Hanlon)
Reply With Quote
  #5 (permalink)  
Old 29-Sep-2009, 18:01
Puzzled Penguin
 
Join Date: Jun 2008
Posts: 39
chriscrutch hasn't been rated much yet
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
Reply With Quote
  #6 (permalink)  
Old 29-Sep-2009, 18:06
Wise Penguin
 
Join Date: Mar 2009
Posts: 1,824
Akoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the rough
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"
__________________
“Never attribute to malice that which can be adequately explained by stupidity.” (R.J. Hanlon)
Reply With Quote
  #7 (permalink)  
Old 29-Sep-2009, 18:39
Puzzled Penguin
 
Join Date: Jun 2008
Posts: 39
chriscrutch hasn't been rated much yet
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
Reply With Quote
  #8 (permalink)  
Old 29-Sep-2009, 18:43
Wise Penguin
 
Join Date: Mar 2009
Posts: 1,824
Akoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the rough
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.
__________________
“Never attribute to malice that which can be adequately explained by stupidity.” (R.J. Hanlon)
Reply With Quote
  #9 (permalink)  
Old 29-Sep-2009, 19:20
Puzzled Penguin
 
Join Date: Jun 2008
Posts: 39
chriscrutch hasn't been rated much yet
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
Reply With Quote
  #10 (permalink)  
Old 29-Sep-2009, 19:25
Wise Penguin
 
Join Date: Mar 2009
Posts: 1,824
Akoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the roughAkoellh is a reputation jewel in the rough
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.
__________________
“Never attribute to malice that which can be adequately explained by stupidity.” (R.J. Hanlon)
Reply With Quote
Reply
Page 1 of 2 1 2

Bookmarks

Tags
mad, sox


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2