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.
- Grab the mplayer source:
svn co svn://svn.mplayerhq.hu/mplayer/trunk mplayer
- 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.
- Now build mplayer:
nice make -j 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.