Linux

Categorized | Applications, Multimedia, cli

Make MPlayer play h264 video files faster on multicore machines

You can make MPlayer play h264-encoded video files a lot faster on multicore machines if you graft some libraries from the ffmpeg-mt project into the resulting mplayer binary. We need to recompile for this. First, use Subversion to download the code for MPlayer:

svn co svn://svn.mplayerhq.hu/mplayer/trunk mplayer

Then the code for ff-mpeg

svn co svn://svn.mplayerhq.hu/mplayer/trunk ffmpeg-mt

Remove the old libavcodec, libavformat and libavutil code from MPlayer

rm -rf mplayer/libavcodec mplayer/libavformat mplayer/libavutil

…and merge in the new ones from ff-mpeg:

cp -a ffmpeg-mt/libavcodec ffmpeg-mt/libavformat ffmpeg-mt/libavutil mplayer/

compile everything

cd mplayer
./configure --disable-vdpau --disable-libdirac-lavc
nice make -j 4

Install the new mplayer-mt binary in your /usr/bin foder:

sudo install -m 755 mplayer /usr/bin/mplayer-mt

Now play your h264 files with the new binary mplayer-mt. Original idea here.

Author Profile

T4L ;

Other posts by T4L

Author's web site



Are you satisfied with this blog?
Why not subscribe our RSS Feed? you will always get the latest post.


9 Comments


  1. The ff-mpeg SVN URL is wrong.

    1
  2. T4L

    The ff-mpeg SVN URL is the right one. I re-tested it and it works.

    2
  3. bob

    I like the idea of upgrading mplayers’ library, but I don’t really want my h264-encoded files to play any faster than they do. It would make the voices very chipmonky and it would be really hard to follow what was going on.

    3
  4. T4L

    @bob: the idea of the tip was to make them run faster as in “smoother”. As in “without glitches” and not faster as in “with double the video/audio speed”.

    4
  5. 5
  6. LOL x2

    I would very much like to second the lol @ bob…

    6
  7. Michael

    What is the difference between this and just enabling vdpau (if you have an nVidia video card)?

    Can you do this and enable vdpau? What effect?

    7
  8. lionheart

    Ubuntu-users can add a PPA repository, see:

    https://launchpad.net/~rvm/+archive/testing

    …to get mplayer-mt (by the guy who makes smplayer, a graphical frontend to mplayer)

    Works really well even on the hyper-threaded Atom processor (netbooks).

    8
  9. Flink

    Yeah the ffmpeg-mt url is not the good one. This is the good one: http://gitorious.org/ffmpeg/ffmpeg-mt
    Just look at your svn commands, these are the same source urls, and only the directory to create locally is changed.

    9

Leave A Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>