[FFmpeg-devel] [RFC] unix socket protocol and our proto situation

Martin Storsjö martin
Thu Dec 16 09:44:54 CET 2010


On Thu, 16 Dec 2010, JULIAN GARDNER wrote:

> > > > > That said, let's start with the quickest of
> > the two: who's against
> > > > > changing the default to an higher value (as
> > in my previous patch) ?
> > > > 
> > > > Fine with me.
> > > 
> > > Fine with me, too.
> > 
> > The patch could btw use some small comment saying why this
> > is larger than 
> > the maximum UDP packet size (when the name currently is
> > UDP_MAX_PKT_SIZE), 
> > perhaps just rename the define to UDP_RX_BUF_SIZE.
> 
> This helps, was my first modifications. But i still got lots of errors 
> on high rate channels hence the addition of a 2Mb circular buffer.
> 
> As ive said before when ffmpeg is probing the circular buffer can use 
> upto and over 800k whilst its doing the probing and before it starts 
> encoding, and the frame rate usually starts over 100fps as it eats the 
> circular data, after a while if drops down to the correct frame rate.

Yes, av_find_stream_info is problematic with streams over lossy channels 
such as UDP, since depending on the stream, it can buffer up quite a bit 
of data, and won't read any more until the buffered data is consumed.

For realtime streams, I tend to prefer not to use av_find_stream_info at 
all, but I think modifying ffmpeg/ffplay to work that way might be a bit 
of work.

// Martin



More information about the ffmpeg-devel mailing list