Is mplayer multi-threaded?

7,794

Solution 1

In 11.10 you probably will need to add an option, either per cli or to ~/.mplayer/config, "-lavdopts threads=X" where X = the number of threads, (1-8, default is 1

Ex. for 2, in cli

-lavdopts threads=2

or in ~/.mplayer/config

lavdopts=threads=2

mplayer2, which is also available in 11.10, should do mt by default

You can check in either htop or thru the use of mpstat, part of the sysstat package (man mpstat) as to whether mt is happeneing

if you use the above parameter it may show up in terminal, (does with mplayer2, may not with mplayer) as in -

==========================================================================

Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family

Asking decoder to use 2 threads if supported.

Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)

==========================================================================

I prefer mplayer2 though either should treat you ok.

Solution 2

The man page for mplayer reveals this little snippet:

enter image description here

Looking at the launchpad build logs - it is compiled with pthread - this is needed to make a multithreaded application.

Taken together - I would deduce that the version of mplayer in oneiric is multithreaded.... but you need to specify the number of threads to decode mpeg/h.264 because the default is one thread.

Share:
7,794

Related videos on Youtube

sashoalm
Author by

sashoalm

174zen6JGRNCbNFUoGJeNvrPX1oQ4cAbkZ

Updated on September 18, 2022

Comments

  • sashoalm
    sashoalm almost 2 years

    There's a post in mplayer's site from 2011-03-26, i.e. March 26, saying that mplayer is multi-threaded. So this is several months before Oneiric was released. Does this mean that the stock mplayer I get from "sudo apt-get install mplayer" in Ubuntu Oneiric is multithreaded, and I don't need to compile from SVN, or compile mplayer-mt, or do anything special?