Log in

View Full Version : what are the required PIDs in a TS?


funduguy
26th September 2009, 21:31
Hi,
I am trying to understand the TS format and I would like to know what are the absolutely necessary PIDs in a TS file for it to be compliant?
For eg., I know it should have a Video PID, Audio PID, PMT and PAT. what about the TVCT tables etc.

I hope the question is clear. Please let me know.

Regards,

Guest
26th September 2009, 21:48
I would like to know what are the absolutely necessary PIDs in a TS file for it to be compliant?Compliant with what?

funduguy
26th September 2009, 21:51
compliant with the MPEG-2 standard, 13818, Part-1.

funduguy
26th September 2009, 22:11
To be more specific, the following is from the standard:
--------------------------------------------------------
Table 2-3 – PID table
transport_scrambling_control – This 2-bit field indicates the scrambling mode of the Transport Stream packet payload.
The Transport Stream packet header, and the adaptation field when present, shall not be scrambled. In the case of a null
packet the value of the transport_scrambling_control field shall be set to '00' (see Table 2-4).
Value Description
0x0000 Program Association Table
0x0001 Conditional Access Table
0x0002 Transport Stream Description Table
0x0003-0x000F Reserved
0x00010

0x1FFE
May be assigned as network_PID, Program_map_PID, elementary_PID, or for other purposes
0x1FFF Null packet
NOTE – The transport packets with PID values 0x0000, 0x0001, and 0x0010-0x1FFE are allowed to carry a PCR.

------------------------------------
What are the mandatory PIDs required for a TS for it to be decodable by a compliant TS analyzer.

Guest
27th September 2009, 01:06
There are NO mandatory PIDs defined in 13818-1. For example, a stream does not have to have PAT/PMT tables. It doesn't even have to have audio and video!

When you say "compliant" you have to say with what. E.g., European DVB-S, US ATSC, etc.

And "a compliant TS analyzer" is equally vague.

What is it you are trying to achieve exactly?

drmpeg
27th September 2009, 07:01
TS analyzers need a PAT and PMT. If the analyzer is performing T-STD buffer analysis, a PCR is also needed (although it can "piggy-back" on a video or audio PID). T-STD buffer analysis can only be done on fixed rate streams, so there has to be at least a little stuffing on PID 0x1fff.

Any Transport Stream that doesn't have a PAT and PMT and some stuffing is usually a "partial TS". That is, it's a portion of some higher bitrate stream that does have PAT, PMT and stuffing.

Here's a dump from the Manzanita MP2TSA TS analyzer.

http://www.w6rz.net/sbp.txt

Ron

Guest
27th September 2009, 13:19
I have a personally made "TS analyzer" that doesn't need PAT/PMT. It uses raw PID detection.

My point is that the OP's question about "compliancy" is hopelessly vague.

drmpeg
27th September 2009, 13:59
There are NO mandatory PIDs defined in 13818-1. For example, a stream does not have to have PAT/PMT tables.
You need to read section 2.4.4 again. It says stuff like "Each Transport Stream shall contain one or more Transport Stream packets with PID value 0x0000" and "Each Transport Stream shall contain one or more Transport Stream packets with PID values which are labelled under the program association table as Transport Stream packets containing TS program map sections".

Ron