Between Linux and Anime

Kind of like Schrodinger's Cat

Building mplayer-mt for Multi-Core HD Video Decoding

Unable to play that 1080p video without lagging? Wanna watch that 720p video file on dated hardware? Well here’s something you can try. Basically the default behavior of most video players is such that they only hog a single core while doing video decoding. If we also commit all the other available cores to the task, well, we’ll of course expect to get better performance. You won’t get double or triple the performance of course – things don’t work out that simply. The difference is noticeable though.

This isn’t a new method. However, the old instructions don’t seem to work anymore – the ffmpeg-mt branch no longer seems to build with mplayer without non-trivial modifications. Fortunately, all the improvements in the ffmpeg-mt branch have recently been merged into the main release. So we can now use the main release instead.

  1. Grab the mplayer source:

    svn co svn:// mplayer

  2. Grab the source for the latest ffmpeg release here. The version I tried is the latest one as of the writing of this post: 0.9.1. Simply download and extract the ffmpeg folder into the mplayer folder from the previous command.
  3. Now build mplayer:

    cd mplayer
    nice make -j 4

  4. And install it as ‘mplayer-mt’:

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

Now you can use mplayer-mt to play more performance-intensive videos and should perceive a noticeable improvement, assuming you have a multi-core processor. If you use a GUI frontend like smplayer, look for an option that lets you specify the mplayer executable, and replace it with mplayer-mt.

Unfortunately I have no idea if anything similar is possible with VLC. If you do, kindly let me know at the comments.

Rate this post
An error occurred!

  • Facebook
  • Twitter
  • Delicious
  • Digg
  • StumbleUpon
  • Add to favorites
  • RSS
  • Reddit


Because there aren’t yet enough Nisemonogatari 01 posts out there


Anisong of the Season: Oath Sign


  1. kurosu

    Why not use mplayer2 and libav? Multi-threading is enabled there by default.

  2. idyllic

    ditto… you can even grab the binary from the mplayer2 website without compiling.

  3. Jason "moofang"

    hmmm wasnt aware of that. Thanks for the heads up.

  4. Yea, I was going to say… mplayer2 does that by default. XD

  5. Jason "moofang"

    hmmm, mplayer2 works pretty well, but I’m seeing visual artifacts and distortions that I’m not seeing on regular mplayer or mplayer-mt for some videos. Any ideas on what gives?

    • idyllic

      10bit decoding on the mplayer2 binary (the one provided at the website) isn’t spectacular. You might need to compile from source or grab the precompiled from ur factory repo. ZOMG, the dial-up here is killing me… took 3 tries to post this >.<

Leave a Reply

Powered by WordPress & Theme by Anders Norén