[MPlayer-users] Playing files that are increasing in size

D Richard Felker III dalias at aerifal.cx
Fri Oct 10 04:09:45 CEST 2003


On Thu, Oct 09, 2003 at 11:12:16PM +0100, Craig Shelley wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hello all,
> 
> This is a kind of feature request.
> I was trying to use mencoder to record my tv to a file called 'in'.
> 
> 
> mencoder tv:// -tv driver=v4l:input=1:width=768:height=576:norm=PAL -vop
> lavcdeint -oac mp3lame -ovc lavc -o in
> 
> 
> when I then try to play the file called in (while mencoder is still
> going), mplayer will play it, but stop at the point where the original
> end of file was.
> This can be a little frustrating if you are trying to watch something
> you are recording.
> 
> I have tried making mencoder write to a fifo, but mplayer seems to get
> stuck when reading the data.
> I traced the problem back to mencoder, since mplayer plays from fifo ok.
> 
> In the end, I made a fifo called 'out', and ran
> 
> mplayer out
> 
> Then I started mencoder (above), and ran the following program to grab
> the data from 'in' and write it into the fifo 'out'
> 
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <fcntl.h> 
> #include <unistd.h>
>  
> main()
> {
>     int fi, fo;
>     ssize_t count;
>     char buf[10241];
>     fi=open("in",O_RDONLY);
>     fo=open("out",O_WRONLY);
>      
>     while(1)
>     {
>         count=read(fi,buf,10240);
>         write(fo,buf, count);
>     }
> }
> 
> It seems to work a treat, but it would be nice if mplayer could natively
> play files that are increasing in size like winamp/xmms
> I would imagine it should also be possible to seek within the growing
> file too.

What version are you using?? 0.90rc? MPlayer has played growing files
just fine for a long time now...

Rich



More information about the MPlayer-users mailing list