[MPlayer-dev-eng] Architect: follow mode

D Richard Felker III dalias at aerifal.cx
Sat Jun 29 09:25:18 CEST 2002


On Sat, Jun 29, 2002 at 08:11:28AM +0100, Sam Liddicott wrote:
> D Richard Felker III wrote:
> 
> >On Fri, Jun 28, 2002 at 08:48:48PM +0100, Sam Liddicott wrote:
> > 
> >
> >>I'm slowly modifying mplayer for a follow mode as part of my 
> >>introduction to it's internals, and I think it advisable to consult here 
> >>from time to time so I don't make any major errors.
> >>
> >>I want a mode where if mplayer is playing a file and the file grows 
> >>while playing mplayer doesn't stop early.
> >>   
> >>
> >
> >Afaik that was implemented a few weeks ago already.
> >
> 
> Hmm, doesn't work for me; if I start mplayer with -dumpstream on an asf 
> stream and dump to a file, and then a few(enough) seconds later start 
> mplayer from that file it stops at eof quickly, I restart (from start) 
> and it goes longer and then stops, etc.
> 
> I guess it is stopping at the size of file when it started.

Well there are two issues at hand here.

One, dumpstream is entirely different and it prolly wont work with
that.

Two, dumpstream goes fast so there's probably no chance for this
feature to kick in. If mplayer ever *reaches* the end of the file, it
stops playing; it doesn't just stop there and wait for more data,
because it's already gotten eof. The idea is that if you're playing a
movie (rather than dumping a stream) you can start it before your
download finishes, and as long as the download stays ahead of
playback, you're fine.

However, what you want to do should be very easy too. It's not a
matter of doing anything special in mplayer, just making good use of
unix. Try the following:

tail -c 1000000000 -f incomplete.asf | mplayer -dumpstream -

The number 1000000000 isn't special; it just needs to be larger than
the number of bytes already downloaded.

Rich




More information about the MPlayer-dev-eng mailing list