You are not logged in.

#1 2013-01-01 21:54:22

halfgaar
Member
Registered: 2010-05-22
Posts: 50

Xine vs Mplayer: mplayer jerky when disk is active, Xine isn't

Hi,

For a long time (years) I thought I had disk scheduling issues because my video's always played back very jerky when I had my torrent client on (for example). But now I discovered that when I play the same file with Xine, it's fine.

When my µTorrent is active, my two CPU cores go to 50% each and the disk is pretty active. With MPlayer, it's pretty much impossible to play a video (or to enjoy it anyway). Xine works perfectly, 100%. I tried setting these Mplayer settings:

  • cache (from none, to several MB's to hundreds)

  • cache-min from not configured to 99%.

  • Playing with -ni (non-interleaved)

  • nice, ionice.

Does anybody know what I can do about that? Is this a known MPlayer problem?

MPlayer SVN-r35421-4.7.2
Athon X2 3800+ (dual core 2 GHz)
RAM: 2 GB DDR400
uname -a: Linux 3.6.10-1-ARCH #1 SMP PREEMPT Tue Dec 11 09:40:17 CET 2012 x86_64 GNU/Linux

Offline

#2 2013-01-03 20:29:34

adam777
Member
Registered: 2012-05-28
Posts: 161

Re: Xine vs Mplayer: mplayer jerky when disk is active, Xine isn't

I've just realized I have the same issue.
Ever since moving to Arch I was unable to play smoothly in mplayer2 while Ktorrent is active.
However, it was just after your post I realized I never had problems watching DVB-T in Kaffeine (which uses xine) while Ktorrent is active.

Offline

#3 2013-01-03 21:03:03

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Xine vs Mplayer: mplayer jerky when disk is active, Xine isn't

Maybe try these in ~/.mplayer/config

quiet=1
lavdopts=threads=2
vo=vdpau
vsync=yes
framedrop=yes
double=yes

Offline

#4 2013-01-04 17:26:38

halfgaar
Member
Registered: 2010-05-22
Posts: 50

Re: Xine vs Mplayer: mplayer jerky when disk is active, Xine isn't

@brebs,
Annoyingly, I can't seem to reproduce it right now and therefore can't test it well, but about the config options: I have vdpau on, and the amount of threads only helps on mpeg1/2 and x264, but xvid can also be jerky, so I don't think that's it.

And, it's a disk thing, because things like updatedb can make mplayer hang for a minute (!), so I have my doubts any of these option will influence it.

@adam777
Does DVB-T utilize the disk, or does it stream live?

And, since archlinux? What did you use before?

Because I can't easily reproduce it, I can't really test well. I'll try playing something with MPlayer with bonnie++ on or something.

Offline

#5 2013-01-05 09:55:44

adam777
Member
Registered: 2012-05-28
Posts: 161

Re: Xine vs Mplayer: mplayer jerky when disk is active, Xine isn't

@brebs
lavdopts=threads is set to 3 on my dual core, I'm pretty sure I read somewhere that #coresx1.5 gives better performance than #cores, as weird as it may sound, but I set it to 2 to make sure.
vo=vdpau isn't relevant unfortunately, running AMD.
as for vsync=yes, man page states "Enables VBI for the vesa, dfbmga and svga video output drivers.", so I'm not sure it's relevant.
framedrop and double were already set.

Anyway, as halfgaar said, I think it's more of a disk issue as well.
I doubt my CPU/GPU sweats so much running SD videos (Core 2 Duo P8600, Mobility Radeon 4570HD, respectively).

@halfgaar
Live streaming, perhaps this is it, haven't thought of that.
Before Arch, Windows 7, irrelevant...

Offline

#6 2013-01-05 10:04:21

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Xine vs Mplayer: mplayer jerky when disk is active, Xine isn't

So, what's weird about your systems? You're the only ones with this problem wink

Are you running hdparm, or got drive-related entries in /etc/sysctl.conf? Running CFQ disk scheduler?

Doesn't this help:
ionice -c2 mplayer blah.avi

Here's my setup, which is smooth.

Offline

#7 2013-01-05 11:40:57

adam777
Member
Registered: 2012-05-28
Posts: 161

Re: Xine vs Mplayer: mplayer jerky when disk is active, Xine isn't

Interesting development, I just watched a 45 minute video in mplayer2 with Ktorrent running in the background and had no problems.
The difference - I enabled "really-quiet=yes" and set "lavdopts=threads=2".
I'm not entirely convinced the issue is solved, would have to test more, but seems to be on the right path.
Adam.

Offline

Board footer

Powered by FluxBB