LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   libmp3lame support for mplayer/mencoder (http://www.linuxquestions.org/questions/linux-software-2/libmp3lame-support-for-mplayer-mencoder-589150/)

shivkiyer 10-03-2007 11:33 AM

libmp3lame support for mplayer/mencoder
 
I installed mplayer through source codes on my Slackware 12. At my first install I didn't notice that libmp3lame wasn't installed and so I could not use mencoder to extract audio from movies to form .mp3 files. I installed lame through source codes.

On configuring mplayer, mplayer didn't detect it. I found this webpage:

http://www.mjmwired.net/resources/mplayer-fedora.html

Here it is written that lame must be configure with --prefix=/usr or else mplayer won't detect it. When I tried this out, mplayer detected lame and now I have mencoder working.

Why is this so? Suppose I install lame in an arbitrary directory (eg: /softwares). I add /softwares/lib to my ld.so.con and run ldconfig -v. libmp3lame.so shows up. Is there any configure option in mplayer to make it detect lame in /softwares?

Got everything working but am curious to know.

indienick 10-03-2007 11:38 AM

By default, lame sets everything up in /usr/local. Whereas, I'm assuming, mplayer looks for libraries to link against in /usr (or any directory defined in ld.so.con). /usr/local may not be listed in ld.so.con.

If you add /software to ld.so.con, it should work.

shivkiyer 10-03-2007 12:13 PM

Thanks for the quick reply. I added /software/lib in ld.so.conf. I ran ldconfig with the -v (verbose) option. It showed libmp3lame.so in /software/lib. But mplayer didn't find it.

Since I deliberately install all softwares in /software, I run ldconfig after every installation.

indienick 10-03-2007 03:06 PM

You're very welcome. :)

Did you install mplayer before or after you installed lame?
I don't know a whole hell of a lot about linking, unfortunately. :(

It makes sense to install everything to a single dir - I used to use /opt - and I don't know why I stopped doing it. Regardless, the only logical thing I can think of, is that if you installed mplayer before lame, it wouldn't find it due to the fact that mplayer was probably built without support for libmp3lame because the library did not exist.

shivkiyer 10-03-2007 11:31 PM

I first installed lame in /softwares. I then installed mplayer which didn't find it. So I installed lame in /usr. On configuring mplayer, this time lame was detected.

The link I provided explicitly says that if lame is configured without --prefix=/usr, mplayer may not detect it. Why so? This would be a problem for people who would want to install all softwares in a different directory (in my case /software and in you case /opt). I tried out mplayer configure options like --toolamelibdir=/compilations etc but none worked.

If it is a deficiency in the ./configure file of mplayer, would it be possible to do some surgery to it and change the path where it looks for lame.h? I am not all that comfortable with scripts, but I'll give it a try soon.


All times are GMT -5. The time now is 07:31 PM.