RE : How to convert MPEG-TS to MPEG-PS on the fly?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 21, 2008 at 09:17:58PM +0200, Josef Wolf wrote:

>The more I look at this PES stream the more confused I get:  The
>stream_id 0xe0 seems to transport PTS and DTS _only_.  Everything
>else seems to be contained in PES packets with those unknown
>stream_id's.  Here is what I see:

As mentioned in my previous post, the "stream ids" below B9
are ISO 13818-2 "start codes".

Let me try to clarify. A PES header starts with 00 00 01 xx
where xx is in the range B9-FF. A PES payload is a list of
elements. Each element starts with 00 00 01 xx where xx is
in the range 00-B8. The pattern 00 00 01 is never found
anywhere else in an MPEG-2 video stream.

When you analyze a TS, PES headers are "naturally" located
since they start at the beginning of a TS payload with TS
header containing a "payload start unit indicator".

After demuxing PES packets, you get a suite of elements.
Each element starts with 00 00 01 xx. When xx is in the range
B9-FF, this is the start of a PES packet, following the PES
header syntax as specified in ISO 13818-1 and potentially 
containing PTS and DTS. When xx is in the range 00-B8, this
is NOT the start of a PES header, but the start of a video
element inside the payload of the current PES packet. The
syntax of the following bytes depends on the start code xx
and is defined by ISO 13818-2, not -1.

Does this help?
-Thierry


_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux