O'Reilly logo

Linux Multimedia Hacks by Kyle Rankin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #48. Use MPlayer

MPlayer is a great video player that can play just about any format. This introduction shows the basics you need to get up and running.

Every once in a while a tool comes along in Linux that impresses you in almost every respect with its flexibility. MPlayer is one of those tools. When it comes to video and audio playback, think of MPlayer as your universal translator. It can play basically any audio or video format you throw at it (provided it has the libraries available) in just about any container you throw at it. For instance, it can play DVDs from the disc, an image of the disc, or even just the VOBs from the DVD). Of course, depending on your taste, there is one downside—by default MPlayer is a command-line program. There is a graphical frontend for MPlayer for those interested, called gmplayer, or you might want to check out some of the other video players mentioned in this book such as xine [Hack #55] or VLC [Hack #56] . This hack discusses the basics of how to play multimedia files with MPlayer from the command line.

The first step to using MPlayer is to install it. Because of all of the different libraries mplayer supports and potential dependencies they cause, I recommend using a precompiled MPlayer package whenever possible. Most major distributions either ship with MPlayer packages available, or have third-party packagers that provide MPlayer (for instance, Debian users can add the following line to their /etc/apt/sources.list file to create ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required