[vlc-devel] Re: Is there a way to force PES alignment to a TS boundary when Streaming UDP?

Christophe Massiot massiot at via.ecp.fr
Thu Mar 16 17:06:40 CET 2006

On Wed, Mar 15, 2006, Robert Scheffler wrote:

> Let's just say there are many good reasons that makes it in my best interest
> to stream to this device. It may be abnormal and strange, but I really can
> not change that. If this can be adjusted inside VLC, then it is a possible
> connection. If it can not be done in VLC, then I am stuck and will have to
> try going a different way. Most professional hardware MPEG-2 encoders
> (Harmonic, GI/Mot, Optibase, and Ligos) can be set to send "aligned", and
> can feed this device fine. But all of my consumer capture cards and VLC will
> not send the format that this server likes.

As Måns said, MPEG specifies that a device should be able to cope with
access units which don't start with at a PES boundary. Sometime between
0.8.1 and 0.8.4, I changed the behaviour of the TS mux to build one PES
per TS for audio streams.

The reason is that MPEG audio streams at low bitrates (64 kbi/s) have a
frame size of approximately 200 bytes. If we "align" the PES, as you
say, a frame takes up 2 TS packets, wasting more than 150 bytes per
frame. I have streams here with 20 audio PIDs at 64 kbi/s, and I can
tell you that it doubles the bandwidth needed by the audio ESes.

So this is why this feature is necessary. If you want to disable it, you
just have to comment out the call to FixPES in modules/mux/mpeg/ts.c.
Christophe Massiot.

This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list