How to get mplayer working on Ubuntu 5.10
- Add "multiverse" into your repository of packages.
- Edit "/etc/apt/sources.list"
- At the line that starts with "deb http://au.archive.ubuntu.com/ubuntu breezy", make sure this is followed by the following: "universe main restricted multiverse". So the line should read as: "deb http://au.archive.ubuntu.com/ubuntu breezy universe main restricted multiverse".
- Note: if you didn't have "universe" in your original line, congrats! You now have access to a much wider range of applications!
- Run the following to update your repository: "sudo apt-get update".
- Next, determine which mplayer you need.
- Run "apt-cache search mplayer" to give you a list of mplayer packages.
- The packages of interest I got were:
- mplayer-386 - The Ultimate Movie Player For Linux
- mplayer-586 - The Ultimate Movie Player For Linux
- mplayer-custom - The Ultimate Movie Player For Linux
- mplayer-k6 - The Ultimate Movie Player For Linux
- mplayer-nogui - The Ultimate Movie Player For Linux
- For each you can use "apt-cache show" to read its description. The description ends with a note saying which CPUs the particular package is for. For my case, I chose "mplayer-k6" as I am running a Duron.
- If you cannot find a package that is specifically built for your CPU, use "mplayer-386".
- Install your selected mplayer package. Assuming my case: mplayer-k6. We will also install "mplayer-fonts" for fun.
- Run the command "apt-get install mplayer-k6 mplayer-fonts"
- Test on a mpg/avi file. Assuming we have the file "~/pom.avi". Note: "pom" not "porn".
- Run the command "mplayer ~/pom.avi"
- While it's running, press "f" for fullscreen.
- Gah! No full screen?
- Edit the file "~/.mplayer/config". I'm not sure if the "~/.mplayer" directory is created on install or on the first time you run mplayer. That's the reason for the "testing" step. :) Put the following in:
# Specify default video driver (see -vo help for a list).
vo=xv,sdl,x11
# Specify default audio driver (see -ao help for a list).
ao=alsa,oss,sdl,esd,arts
# Drop frames to preserve audio/video sync.
framedrop = yes
# get a default OSD font from fontconfig
fontconfig = yes
font = "Sans"
subfont-text-scale = 3
- Now rerun the earlier test and see if "f" for fullscreen works.
- Now try a WMV file.
- Get one from http://www.wimp.com. Just stop the browser from trying to load the video and use the "download" link to get the file.
- Assuming you downloaded "whatever.wmv" on to your Desktop, run "mplayer ~/Desktop/whatever.wmv".
- You'll probably have mplayer crash like mine did.
- Kill it by opening another terminal and running "pkill mplayer".
- Get CODECs for mplayer.
- Goto "http://www.mplayerhq.hu/design7/dload.html"
- Download "essential codecs package"
- Untar its contents. Assuming the file you downloaded is "essential-20050412.tar.bz2.tar" and your command promt is in the directory containing that file, run the command "tar jxvf essential-20050412.tar.bz2.tar"
- Enter the directory: "cd essential-20050412"
- Read the README file: "cat README" to determine where to copy the codecs. The file says that for prebuilt codecs, this is "/usr/lib/codecs". If that doesn't work, try "/usr/lib/win32", and maybe "/usr/local/lib/win32".
- You need to use "sudo" when making /renaming those directories.
- You also need to run mplayer from outside of the directory containing all the codecs. As I found out, my first test worked only because mplayer found the codec it needed in its working directory.
Short version for a Duron CPU, and codec directory "/usr/lib/win32"
sudo emacs /etc/apt/sources.list
# add "multiverse"
sudo apt-get update
sudo apt-get install mplayer-k6 mplayer-font
if [ ! -f ~/.mplayer/config ]; then mplayer; fi
emacs ~/.mplayer/config
# add the text below
# START TEXT ############################
# Specify default video driver (see -vo help for a list).
vo=xv,sdl,x11
# Specify default audio driver (see -ao help for a list).
ao=alsa,oss,sdl,esd,arts
# Drop frames to preserve audio/video sync.
framedrop = yes
# get a default OSD font from fontconfig
fontconfig = yes
font = "Sans"
subfont-text-scale = 3
# END TEXT ##############################
wget http://www1.mplayerhq.hu/MPlayer/releases/codecs/essential-20050412.tar.bz2
tar jxvf essential-20050412.tar.bz2
sudo mkdir /usr/lib/win32
sudo cp essential-20050412/* /usr/lib/win32/.
0 Comments:
Post a Comment
<< Home