[FFmpeg-devel] udp.c comments/thoughts

Michael Niedermayer michaelni at gmx.at
Tue Mar 25 17:53:35 CET 2014


On Tue, Mar 25, 2014 at 09:31:09AM -0600, Roger Pack wrote:
> On 3/22/14, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Fri, Mar 21, 2014 at 05:55:09PM -0600, Roger Pack wrote:
> >> On 1/15/14, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> > On Wed, Jan 15, 2014 at 12:59:27PM -0700, Roger Pack wrote:
> >> >> On 1/6/14, Andrey Utkin <me at andrey-utkin.pp.ua> wrote:
> >> >> > On 06.01.2014 21:37, Roger Pack wrote:
> >> >> >> On 1/6/14, Roger Pack <rogerdpack2 at gmail.com> wrote:
> >> >> >>> Hello.  I noticed that in udp.c sometimes (with pthread cancel
> >> >> >>> enabled) it says "Part of datagram lost due to insufficient buffer
> >> >> >>> size" (I think what it meant to say is due to insufficient read
> >> >> >>> request size?)
> >> >> >
> >> >> > No principal difference. But we could somewhat improve log message
> >> >> > with
> >> >> > user-friendly advice, if possible. I haven't check deeply this at
> >> >> > the
> >> >> > moment.
> >> >> >
> >> >> >>> Also it's quite confusing that fifo_size is in multiples of 188.
> >> >> >>> Unless you an MPEG engineer, nobody anticipates this.  I might
> >> >> >>> suggest
> >> >> >>> adding another setting of "fifo_size_bytes" or something so that
> >> >> >>> people realize there's a difference.
> >> >> >
> >> >> > Yep, confusing. Historical issue.
> >> >> > "fifo_size_bytes" sounds a sort of humiliating for this proper
> >> >> > option,
> >> >> > comparing to ugly "fifo_size" option taking multiples of 188. Maybe
> >> >> > some
> >> >> > more "respectful" name could be found?
> >> >> >
> >> >> >>> Also I've noticed that the default RECV buffer size is 64K by
> >> >> >>> default
> >> >> >>> for udp packets.  I might suggest increasing this substantially,
> >> >> >>> as
> >> >> >>> this is far too little for many streams, and the OS can typically
> >> >> >>> handle far higher (1M-10MB at least).
> >> >> >
> >> >> > Are there any official documents regulating allowed UDP packet
> >> >> > sizes?
> >> >> > Or
> >> >> > you tell us what happens to work with current Linux? Maximum which i
> >> >> > have seen in nature was 0xffff bytes via IPv4 loopback interface.
> >> >>
> >> >> The default reported by Ubuntu 12.10 is 212992 which I believe you
> >> >> divide by 2 to get the "real" value, 106496.
> >> >> This means that currently, by default, FFmpeg is actually changing the
> >> >> buffer size to *lower* the default (since it sets it to 64KB).  Which
> >> >> may not be desirable.
> >> >>
> >> >> I could see changing the default to 128KB instead, or possibly adding
> >> >> extra/more logic so that the default is MAX(current, 64KB), thought?
> >> >
> >> > if you send a patch that sets it to MAX(current, 1MB) then ill
> >> > apply it
> >>
> >> OK here's a couple followup patchs as well.  One adds a warning if
> >> people don't realize they're not getting what they requested for
> >> buffer_size. FWIW.  The other is docu.
> >
> > applied
> 
> And another small docu patch, FWIW.
> Thanks!
> -roger-

>  protocols.texi |    1 +
>  1 file changed, 1 insertion(+)
> 9d8b2d4dace38f22de06032231b58364570e81ae  0002-udp-mention-default-in-documentation.patch
> From 0218fe007781cc06d5f72c9def95e1933788806e Mon Sep 17 00:00:00 2001
> From: rogerdpack <rogerpack2005 at gmail.com>
> Date: Mon, 24 Mar 2014 13:00:48 -0600
> Subject: [PATCH 2/2] udp: mention default in documentation

applied

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140325/cd060a11/attachment.asc>


More information about the ffmpeg-devel mailing list