LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Mplayer success story: where to install new codecs (https://www.linuxquestions.org/questions/linux-software-2/mplayer-success-story-where-to-install-new-codecs-339310/)

KWTm 07-02-2005 07:16 AM

Mplayer success story: where to install new codecs
 
I finally figured out how to install new codecs on Mplayer. Once you figure it out, it seems easy, but the documentation out on the Web is confusing and sometimes applies to other circumstances. I finally asked for help on the #mplayer channel on IRC and was given some clear answers. Hope this can help the newbies. I wonder if this post belongs in "success stories"? But then people seeking help with Mplayer wouldn't look for it there.

This post applies to you if you use the Mplayer program to play video (or audio) files, and Mplayer does not properly recognize or play a file that you have. You might have an old version of Mplayer, but you don't necessarily have to install a new version; just install the newest set of codecs. A codec is a set of instructions that tell how to play a video/audio file.

You can get the newest codecs from http://www.mplayerhq.hu/homepage/design7/dload.html (under the Codecs section). That gets you a .tar.bz2 file that contains a bunch of codec files. Use the "tar" command to extract those files to a directory. (Explaining the tar command is left to others, although I think the command is "tar -jvxf <the_filename>".) There are other ways to do this, too, like through Konqueror if you are using KDE.

Anyway, now you have a bunch of files. Where do you put them? The key to the whole thing is: you put them in the directory "/usr/local/lib/codecs". To do this, you need to be root, so sign in as root or use the "su" command. If that directory does not exist, create it with

mkdir --parents /usr/local/lib/codecs

and then move your files into that directory.
You have to make sure that the bunch of files (for example, "divx.dll" and "qtmlClient.dll" etc.) are actually in that directory itself, not in a subdirectory, and not in other places.

That's it! But I'll point out some things that did confuse me:

You might read other web pages that suggest putting the files somewhere else. Be careful: some of the instructions are for how to *compile* Mplayer, but you probably don't need to do that: Mplayer should be able to load codecs when it is run ("run-time loading"), even if they weren't already built-in when compiled. To check this, you can try:

mplayer -vfm help

which should list all of the available codecs. Look for any "(win32 codec)". These are guaranteed not to be compiled in, so if you see any, then your version of Mplayer is able to do run-time loading. You might want to use "mplayer -vfm help | grep win32" if the list scrolls by too quickly.

Another helpful hint: when you run Mplayer with the -v option, such as

mplayer -v MyVideoFile

it tells you where it looks for codecs. (It also tells you a whole bunch of other stuff, so you have to sift through for the info you need.) Here's part of what Mplayer replied:

Win32 LoadLibrary failed to load: wmv9dmod.dll, /usr/lib/win32/wmv9dmod.dll, /usr/local/lib/win32/wmv9dmod.dll

So, for that particular file, it was looking for the codec "wmv9dmod.dll" under "/usr/lib/win32/" and "/usr/local/lib/win32". Hmm, that's a different directory from what I had just said. Anyway, now you know where to put the codecs and what codec you need to play that particular file.

Hope that helps!

XavierP 07-02-2005 10:03 AM

All this is on the documentation on their site, but good one for showing the potential error message for anyone who doesn't read it.

KWTm 07-06-2005 07:38 AM

Quote:

All this is on the documentation on their site
See, that's where I beg to differ. I combed through the documentation in their site, but I wasn't able to find something that unequivocally answered my questions: Can Mplayer load run-time codecs? How do I know if my version can load run-time codecs? Where do I put my run-time codecs? Can it go in a subdirectory? Do I need to do anything more after I've put my codecs in that directory? How do I know what codecs are running? Is there something different about the version of Mplayer in my particular distrio? In fact, their documentation assumes quite a bit, and while you'll see that everything I mention is also in their documentation, what they say is missing a few subtle things here and there. In particular, I could never find the "and that's all you need to do, and it should work!" leaving me to always wonder whether there was something else buried somewhere else in the documentation that I hadn't yet found.

I guess that's the role of LinuxQuestions.org, but I really wish that the documentation writers could see it from the point of view of the newbie. It's not enough to just document 99% of what you need to do. Newbies need to know: what if something goes wrong? Where have I goofed? I always marvel at those instructions that say something to the effect of "Just type 'configure && make && make install' and everything will work!" NOT newbie friendly.

mkoljack 07-06-2005 09:58 AM

Codecs
 
Also there are Distribution notes/starter guides available which cover the installation of codecs. Here are just a few:

http://stanton-finley.net/fedora_cor...otes.html#Xine

http://ubuntuguide.org/#codecs

hairysocks 01-31-2007 01:49 PM

The download link is out of date, but if you go to http://www.mplayerhq.hu you should be able to find downloads.

XavierP 01-31-2007 05:15 PM

The whole thing is out of date, it was written in 2005.


All times are GMT -5. The time now is 10:09 AM.