UDP Payloader
Michael Rubinstein
mrubinstein at rai-dev.com
Sun Oct 21 10:35:51 PDT 2012
> On Sun, Oct 21, 2012 at 11:16 AM, Michael Rubinstein <mrubinstein at rai-
> dev.com> wrote:
> > Hi,
> >
> > We need to send MPEG Transport Stream packets using UDP with seven TS
> packets per UDP packet. Each UDP packet needs to be 7 * 188 = 1316 bytes.
> >
> > Also the UDP packets need to be transmitted at a constant rate, not in a
> burst.
> >
> > The buffers that are produced by mpegtsmux are large.
> >
> > Is there a way to do this that I missed?
> >
> > Would it be better to change mpegtsmux , write a Payloader or something
> else?
> >
>
> That's interesting, as I just had to write an element to buffer up the
> 188 byte packets from mpegtsmux in order to feed a v4l2 driver that feeds a
> hardware decoder. My observation was that the mpegtsmux was always
> pushing a single packet at a time. I had intended to use v4l2sink but it wasn't
> buffering the data at all and there were too many QBUF exchanges for the
> driver to keep up working 1 packet at a time.
>
> How are you getting mpegtsmux to buffer the packets before pushing? I
> wonder if it's how mpegtsmux is being fed data...
>
> -Mike
>
I'm creating the transport stream with the mpeg2 video encoder. Here's an
example pipeline:
videotestsrc pattern=smpte is-live=true \
! video/x-raw,format=I420, \
width=720,height=480,framerate=30000/1001 \
! avenc_mpeg2video bitrate=4000000 \
! queue \
! mpegtsmux \
! queue name=udpq \
! udpsink port=1234 host=127.0.0.1 sync=true buffer-size=300000
This sends UDP packets of various lengths from around 15 to 32 K Bytes.
I'm using a Windows (MinGW) build of 1.0.1.
Michael
More information about the gstreamer-devel
mailing list