Ubuntu can play the most popular non-free media formats, including DVD, MP3, Quicktime, Windows Media, and more by following the instructions below:
For Ubuntu 8.04/7.10, open the terminal, and execute the following command:
#sudo apt-get install ubuntu-restricted-extras
Another way is using Synaptic:
- Go to Applications → Add/Remove…
- Set Show: to All available applications
- Search for ubuntu-restricted-extras and install it. Note that there is also xubuntu-restricted-extras (for Xubuntu) and kubuntu-restricted-extras (for Kubuntu.)
[Source]