[libav-bugs] [Bug 611] New: Inconsistent UDP output packet size

bugzilla at libav.org bugzilla at libav.org
Thu Dec 19 20:45:18 CET 2013


           Summary: Inconsistent UDP output packet size
           Product: Libav
           Version: git HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: Normal
         Component: libavformat
        AssignedTo: bugzilla at libav.org
        ReportedBy: rycius at ryci.us

When outputting MPEG-TS to UDP and using the pkt_size option, avconv does not
produce output with constant packet size - instead, the option is used as a
limit of maximum packet size. When looking at the sources, it's indeed a max
packet size, but the docs just say "Set the size in bytes of UDP packets" -
which is also the expected behavior according to me. Other software producing
MPEG-TS over UDP/TCP (e.g. vlc, multicat, etc.) also behaves like that - output
is constant packet-sized.
Happens not only when transcoding, but when copying a stream as well.
How to reproduce:

avconv -i input.ts -c:v copy -c:a copy -f mpegts

The problem is that when adding the pkt_size=xxxx option, provided xxxx is a
multiple of 188, I expect FFMPEG to produce output with packets which are all
sized of xxxx bytes. But that is not the case, even if we are merely copying an
input TS without any processing::

16:02:35.598098 IP > UDP, length 1316
16:02:35.598118 IP > UDP, length 1316
16:02:35.598129 IP > UDP, length 752   <<<
16:02:35.598155 IP > UDP, length 1316
16:02:35.598163 IP > UDP, length 1316
16:02:35.598169 IP > UDP, length 1316
16:02:35.598175 IP > UDP, length 1316
16:02:35.598181 IP > UDP, length 752   <<<
16:02:35.598188 IP > UDP, length 1316
16:02:35.598195 IP > UDP, length 1316
16:02:35.598200 IP > UDP, length 188   <<<
16:02:35.598215 IP > UDP, length 1316
16:02:35.598221 IP > UDP, length 1316
16:02:35.598227 IP > UDP, length 1316
16:02:35.598232 IP > UDP, length 1316

This causes inconsistent playout issues with some hardware and software
decoders and MPEG-TS analyzers.

Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the libav-bugs mailing list