Calculate PES_packet_data_byte count when PES_packet_length == 0

474 Views Asked by At

In MPEG-TS stream, in PES bitstream PES_packet_length can be 0 then PES packet size is determined by payload_unit_start_indicator==1 of TS packet (First TS packet of next PES packet), is this right ?

Now when total size of PES packet is known PES_packet_length is unknown (0) how to calculate stuffing_byte count and PES_packet_data_byte count ?

1

There are 1 best solutions below

0
On BEST ANSWER

PES_packet_length can be 0 is only true for video frames. Audio frames can not be of length 0. In this case, stuffing bytes are not allowed, and adaption field padding should be used instead. (AF size can be 0, if only one padding byte is needed)