Mailing List archive

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

[linux-dvb] PES question



Felix Domke writes:
 > I have a small question i cannot solve by reading the mpeg-specs..
 > 
 > it must be a stupid error or something, but i can't see it.
 > 
 > On Video-PIDs we got a PES-stream.
 > 
 > this PES-stream consists, as the name says, of packets which all got a
 > PES-header.
 > a PES-packet is distributed over multiple TS-packets, since it's normally
 > longer than 184 bytes.
 > every ts-packet which contains the first part of the PES-packet has the
 > payload_unit_start_indicator set, and has often an adaption field inside the
 > TS-header (althought it's not required, and can be anywere else).
 > 
 > Now here's such a TS-packet as a hexdump: (please note that this packet is
 > not created by the dvb-s, so it isn't regenerated or stuff.. it SHOULD be as
 > plain as it comes out of the frontend)
 > 
 > 47             Sync byte
 > 41 FF          pusi_flag set, PID 0x1FF
 > 30             adaption_field_control=3, cc=0
 > 07             ok, we got an adaption field: adaption_field_length=7
 > 10 0F 59 A5 9F 7E B1  ... the adaption field ...
 > 00 00 01 E0    a PES stream startcode (0x1E0), 1110 xxxx means video, so
 > it's video stream 0
 > 00 00          the packet_length
 > 85 80 13 21 7A CF 86 FD FF FF FF FF FF FF FF FF FF FF FF FF FF FF
 > 00 00 01 00 00 1F FF FB B8   ... and the ES ....
 > 00 00 01 B5 87 57 5B DD 80
 > 00 00 01 B2 44 54 47 31 41 F8 00 00 00 00 00 00 00 00
 > 00 00 01 01 4A 58 08 0B 2C
 > 00 00 01 02 4A 58 08 0B 2C
 > 00 00 01 03 4A 58 08 0B 2C
 > 00 00 01 04 4A 58 08 0B 2C
 > 00 00 01 05 4A 58 08 0B ...
 > 
 > 
 > so, my problem is, WHY is the packet_length ZERO?

Unfortunately, this allowed by the Specs, but only for video PES that
are in a TS stream. The PES can also be longer than 0xFFFF, which
would normally the maximum.

 > 
 > i tested it on several transponders, channel et al, it's always zero, which
 > makes the parsing of the next header very hard (if you have a PES which has
 > no pusi-flag anymore...)
 > 

Tell me about it. :(

 > the only  possible explanation i found was that 00 00 in fact means 1 00 00,
 > but i cannot really believe this (would mean PES-packets > 64k)
 > 

No, it doesn't
 

 > otherwise it would mean that some part of the receiver hardware modifies
 > this, but i can't believe this anyway..
 > 

No, that's just the way it comes from the transponder.

Marcus

---------------------------------------------------------------------
Dr. Marcus Metzler                             
mocm@netcologne.de                     http://www.metzlerbros.de
mocm@convergence.de                    http://www.convergence.de

Convergence Integrated Media GmbH          
Rosenthaler Str. 51                   
D-10178 Berlin                             
---------------------------------------------------------------------


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index