Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

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.

share|improve this answer
add comment

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|improve this answer
add comment

As far as I know, the mplayer in 11.10 is multithreaded and you don't have to do anything.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.