How to build mplayer with libdvdnav on Linux?

I find the mplayer from rpmfusion does not contain libdvdnav. How to build mplayer with libdvdnav on Linux?

I did this on Fedora 21 to build mplayer with libdvdnav:

Download mplayer src from http://www.mplayerhq.hu/design7/dload.html and extract the tarball.

Install needed packages (you will need more if you need more features):

# yum install gcc make pulse-audio-libs-devel libdvdnav-devel yasm

Here, pulse-audio makes sure mplayer can play sound with a system using pulse audio and libdvdnav is the feature we need here.

In the mplayer src directory:

$ ./configure

If it reports other packages missing, you will need to install the required one.

Then build mplayer by

$ make -j4

Here, the -j number specifies how many files will make invoke to compile source files in parallel.

After it builds successfully, the mplayer in the directory is the build mplayer. You can directly invoke it by

$ ./mplayer

or install it to you system by # make install.

Answered by Eric Z Ma.

Eric Z Ma

Eric is a father and systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *