[MPlayer-users] Problem with playing mpeg2 files smoothly

Gábor Lénárt lgb at lgb.hu
Sat Aug 30 09:52:06 CEST 2003

On Fri, Aug 29, 2003 at 09:29:58PM +0200, Martin Grim  wrote:
> In the end I managed to play my 5 minute MPEG2 video (300 Mbyte) smoothly, but 
> for this to happen I had to dump the entire video first to /dev/null with
>     cat $(HOME)/movies/5-minute-test.mpg > /dev/null
> Playing the movie after this resulted in a smooth display! 
> What does this tell me? I bought delibaratly the fastest hard drive (in rpm) I 
> could find (playing from CDROM didn't improve things at all). Is something 
> wrong with data transport from disk to memory to video card? Did I miss a 

Yes and no. With cat'ing file into /dev/null, OS kernel will probably cached
the file in the memory, so next run of mplayer will not require to read from
disk, because OS fetched file from the cache in memory. However it is NOT
memory->video card related thing, because that always performed by mplayer
during the playback. So if this cat'ing helped the problem is 'only' the low
bandwidth between cdrom and computer. Maybe altering DMA setting or such
helps. Please try after a NEW reboot (so content of the file is not cached
in memory) messure the time to read the file (eg with that cat), and examine
the speed of reading, than compare it to the bitrate of the movie (of course
this is not correct enough since beside of stream bitrate there is bandwidth
needed to read byte of the container itself and such but only a few percent
IMHO). If they're close, you have got problem, but it is NOT mplayer related
but your I/O speed, I/O setting or such ...

- Gábor (larta'H)

More information about the MPlayer-users mailing list