[mythtvnz] Multi-threaded Mplayer

feadog feadog at orcon.net.nz
Sun Jan 25 20:49:58 GMT 2009


Hi all,

Finally got mplayer to compile with the experimental multi-threaded version of 
ffmpeg over the weekend. Now can watch the troublesome NZ. h264/aac stream of 
TV1 and TV2 on my eeepc901netbook, using my Asus My Cinema DVB-T stick. 

Hopefully one day this multi-threading will  be merged int the Mythtv trunk, 
and thus the reason for posting here. 

Here's how -

grabbed mplayer svn
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

now get ffmpeg-mt
git clone git://gitorious.org/ffmpeg/ffmpeg-mt.git

replace the libav* folders in mplayer-svn with the libav* folders in ffmpeg-mt

cd mplayer
./configure
make

after some time you will create the binary mplayer in the mplayer folder. 
Rename this to mplayer-mt and copy it to /usr/bin.

then you can use it muli-threaded like this 

mplayer-mt  -vfm lavf -lavdopts\    
fast:skiploopfilter=all:skipframe=nonref:threads=4\
  -cache 5000  dvb://"TV ONE"

this binary requires a suitable channels.conf for your town 
in /usr/local/etc/mplayer.

If you are using debian or its derivatives you could try install dependencies 
for mplayer with 
apt-get build-dep mplayer

Of course you will also neet subversion and git-core installed along with 
build-essential and probably other packages as well.

I've add the binary  (mplayer-mt) compiled on the eeepc to my ftp server if 
anyone wants to try it out without the need to compile. Download from

 ftp://60.234.131.184/mplayer
 (Not always available, try later)
also there, is my channels conf for Dunedin. Mt. Cargill


I'm sure that with a bit of fiddling with the mplayer parameters, improvements 
will be seen. Audio sync works much better with "threads=4" than "threads=2" 
for example. On thee eeepc901 watching TV1 sees both cores running 90%, quite 
a few lost frames, but at least the audio remains in sync.

I'm really not certain of the quality of the Asus My Cinema U3100 DVB-T USB 
stick, so I'd appreciate any feedback of your experience with other 
sticks/cards here.

Noel Sheridan



More information about the mythtvnz mailing list