Hi everyone...
I m working on a project to parse the various metadata in MPEG-2 TS files. I know how to decode PAT, PMT - find out the video, audio and other PIDs and stuff...
But reading the ISO 13818-1 spec, I'm kinda confused in how to decode sections which are split across TS packets. According to the 13818-1 which talks about the various fields in a PSI section header of a PAT section:
Based on this I understand that section_number specifies the number of the current section and the last_section_number, the number of the last section. And the length of the section can be found out based on the section_length field. Everything is clear when there is only one section for the entire table and this is the case with all the test streams (more than 20) I've got unfortunatelysection_length – This is a 12-bit field, the first two bits of which shall be '00'. The remaining 10 bits specify the number
of bytes of the section, starting immediately following the section_length field, and including the CRC. The value in this
field shall not exceed 1021 (0x3FD).
section_number – This 8-bit field gives the number of this section. The section_number of the first section in the
Program Association Table shall be 0x00. It shall be incremented by 1 with each additional section in the Program
Association Table.
last_section_number – This 8-bit field specifies the number of the last section (that is, the section with the highest
section_number) of the complete Program Association Table.
When a section is split up I've got these following doubts:
1. Does the section_length field of the section with section_number=0 give the length of the entire section data (including the parts which are not part of the current section) ? My guess is that the answer is yes since the section_length field can have a max value of 1021 which cannot fit into the payload of a TS.
2. In case if the section gets split up - how do I interpret the section_length field ? I'll take an example. Say section length = 200 when current_section=0. So I've got 200 bytes of data starting from the byte immediately after the section_length field. And say the current section only has 120 bytes of data. So does the remaining 80 count the section header (i.e. the fields) as well or just the data portion of the section with current_section=1 ?
3. How does Section filtering work when the sections are split up - does it just keep the table data alone omitting the section headers ?
I'm asking all this because I'm writing a library which will encapsulate a PSI section - it needs to parse the section data in increments and interpret the fields and be able to decode the section as well.
Thanks.
-Ash
+ Reply to Thread
Results 1 to 1 of 1
Similar Threads
-
Interpreting Logging Messages
By alphamass in forum SVCD2DVD & VOB2MPGReplies: 1Last Post: 30th Jul 2009, 23:48 -
VobBlanker DVD Split- Automatically jump to Split Title
By src2206 in forum DVD RippingReplies: 12Last Post: 11th Dec 2008, 07:58 -
Warning : NAV Packets are not detected in video.mpg. Please demultiples
By anindyanuri in forum Newbie / General discussionsReplies: 1Last Post: 14th Oct 2008, 21:38 -
Procoder split/split by size/media query
By kippard in forum Authoring (DVD)Replies: 7Last Post: 17th Nov 2007, 22:35 -
dvd movies don't screen on monitor properly are split into 3 sections
By beachychick in forum Software PlayingReplies: 3Last Post: 29th Oct 2007, 19:03