[MPlayer-users] Handling "bursty" data sources

alex at foogod.com alex at foogod.com
Sat Aug 10 01:52:02 CEST 2002


Greetings,

I am having a problem which I'm hoping somebody here can suggest an adequate
solution for..

I'm trying to play a video (XviD-encoded AVI) off of a CDROM on a laptop
machine, and am getting very jerky output.  Before anybody suggests it, this is
not a problem with an underpowered machine, as the same movie plays just fine
if I copy it to the hard drive first.  The overall data transfer rate of the
CDROM drive seems copiously adequate for this task, as well, so I'm fairly
certain that isn't the problem.

What does appear to be the problem is the following:

Mplayer starts up and reads the beginning of the movie off the disc and
proceeds to play it.  While mplayer is happily playing this first portion of
the movie, the CDROM drive (being a laptop-variety drive and thus very eager to
conserve power) decides it's going to spin down.  This means that shortly
afterward, when mplayer decides it needs the next bit of movie to play, the
CDROM drive has to spin up again.  While mplayer is waiting for this, it runs
out of data to play, and has to pause briefly until the CDROM comes fully up to
speed and can give it more data.

The result, of course, is a lot of play-pause-play-pause, which ultimately
isn't the most satisfying viewing experience..

It seems to me that this problem could be avoided with the adequate use of
pre-buffering the movie as it's read off the disc, but I can't figure out any
way to do this.  I have tried increasing the cache size given with mplayer's
-cache option (to quite a wide range of values, with no discernable change in
behavior), but this seems to do little good because as far as I can tell
mplayer doesn't actually _use_ the cache.  (From what I can see from the
outside, it looks like it decides during the initial read that it's getting
data "nice and fast, thank you" so it doesn't bother to buffer any of it
because it figures it won't need to, and then later finds out it really should
have (but apparently still doesn't learn its lesson, because it does the same
thing all over again a few seconds later).)

So, my question is this:  Is there any way to make mplayer better cope with
"bursty" data sources?  Can I somehow tell it that yes, trust me on this, it
would actually be a good idea to use the cache to prebuffer stuff instead of
just letting it sit there (mostly) empty?

Alternately, if somebody has some other explanation for what's going on, and
preferably a way to fix it, I'm all ears..

Thank you for your consideration..

-alex




More information about the MPlayer-users mailing list