[MPlayer-users] mpeg files playback limitation

Kevin DeKorte kdekorte at yahoo.com
Thu Jul 28 02:45:24 CEST 2005


On Wednesday 27 July 2005 05:47 pm, Reimar Döffinger wrote:
> Hi,
>
> On Wed, Jul 27, 2005 at 04:00:45PM -0600, Kevin DeKorte wrote:
> > I have noticed a problem with the mpeg decoder
>
> Has nothing at all to do with the decoder.
>
> > if I do this...
> >
> > wget http://some.site.com/path/to/file.mpeg &
> >
> > wait a second so that part of the file is downloaded then I do
> >
> > mplayer -cache 2048 file.mpeg
> >
> >
> > mplayer will only play the bytes of the file that it knew about when it
> > started.
> >
> > So if 500K of the file was downloaded and mplayer is started, but the
> > file is 2MB, it will only play 500K even if more than 500K has been
> > downloaded
>
> If you had waited until it had downloaded a bit more than the cache size
> (maybe 2.5 MB) it would have worked. When the cache hits the end of the
> file it will stop. I don't think anything else makes a lot of sense.
>
> > It happens with mp3 and mpeg files, but works fine with avi, quicktime
> > and other formats.
>
> It might have something to do with the demuxer, but I can't really
> imagine that...
> Can you provide some details on how you tested that? Because I am quite
> certain I got it to work with a Shoutcast stream (i.e. MP3) once.
>

I'm the author of mplayerplug-in.. yeah that piece of junk.. :) anyway. I'm 
using mozilla to get the file and store it in a temp file on disk. Once a 
certain threshold of the file is reached... say 25% (user configurable) of 
the total file size. I launch a thread and start playing the mp3 media with 
mplayer.  When I am playing the file from disk I don't provide the cache 
option, just when it is streaming (rtsp/mms/http etc). So for cached media I 
use mplayer without a -cache option. When streaming media I use the -cache 
option default to 512, but is user settable. 

Do I need to explicitly set the -nocache option when I am playing from a file 
on disk that is changing? 

When I start mplayer with the mp3 file, mplayer will only play to the filesize 
that mplayer saw when it loaded.  Streaming media is different. I try and 
cache at least some of the file since some people don't have fast enough 
connections to play the file off the web directly. Also, if I cache it, I can 
"save" the media off if the user wants to.

Thanks

Kevin
-- 
Get my public GnuPG key from
http://keyserver.veridis.com:11371/export?id=7574690260641978351
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20050727/281fafe7/attachment.pgp>


More information about the MPlayer-users mailing list