[IMPORTANT] Major incompatibility with VLC/VLS

Christophe Massiot massiot at via.ecp.fr
Sat Aug 31 00:20:20 CEST 2002

Dear friends,

One of our users (I forgot his nickname, sorry...) has reported on 
IRC a major compatibility issue with current stable versions of VLC 
and VLS.

Background : DVDs extend the MPEG specification to allow new ES 
types, such as A/52, LPCM, DTS, SDDS, and DVD SPU. In order to 
identify the streams (which all have a stream ID of 0xBD), the DVD 
consortium has had to add a stream private ID as the first byte of 
the PES payload. Consequently, VLC has to skip the first byte of the 
payload of those elementary streams.

VLS only encapsulates the PES, and doesn't drop the first byte of the 
payload. This stream private ID information is redundant with the 
stream type available in the PMT, but it doesn't disturb the VLC, 
because it always skips the first byte.

The problem is, we're not the only ones to encapsulate A/52 in MPEG-2 
TS. Some American standards have specified this, and the resulting 
A/52 ES has a stream type of 0x81 (the same we chose), but WITHOUT 
the stream private ID. That is, for those streams, we mustn't drop 
the first byte of the payload.

Thus, VLC and VLS are de facto incompatible with the standard way of 
encapsulating A/52 (and possibly LPCM, DTS, and DVD SPU). I think we 
can't keep the statu quo on this, and we must change our behavior. 
However, our options are very limited, and it _will_ break things.

I have just checked in patches so that VLC can handle both the PES 
with stream private ID, and the PES without. The first have 
distinctive FOURCCs such as 'a52b', 'dtsb', 'lpcb' (b for "buggy"), 
and TS stream types in the range 0x91-0x93. The latter keep the 
current FOURCCs and stream types (0x81-0x83), because they are the 
normal way to do (DVD's method is a kludge).

I have changed VLS so that it sets stream types to 0x91-0x93. We will 
also need to change its behavior so that it edits the PES payload, 
and sets stream types to the standard 0x81-0x83, otherwise it won't 
be compatible with third-party solutions (it wasn't compatible 

However, this means that from this day on, *new VLS is incompatible 
with old VLC, and old VLS is incompatible with new VLS* !! This is 
very bad news, and we will have to document the change thoroughly. I 
don't think we can solve the problem without breaking the 
compatibility with old versions, since we can't automagically detect 
whether the PES contains the stream private ID or not.


Christophe Massiot.
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>

More information about the vlc-devel mailing list