Packetization |
Bytes in Header |
IP |
20 |
UDP |
8 |
RTP |
12 |
TS |
4 |
PES |
8, 131 |
For 7 TS packets carried over UDP, there are 7*4 (TS) + 8 (UDP) + 20 (IP) = 56 bytes ofheader. For 7 TS packets carried over RTP/UDP there are 7*4 (TS) + 12 (RTP) + 8 (UDP) +20 (IP) = 68 bytes. For TS, the overhead consists of not just the transport packet headers,but also the PES headers and the bytes used to pad TS packets that carry the end of thePES packet. However, these are hard to enumerate, since they depend on the size of thePES packet.
For native RTP, the header size is 12 (RTP) + 8 (UDP) + 20 (IP) = 40 bytes.
Thus, video using TS/UDP/IP requires 56 bytes, which is 40% more header, while videousing TS/RTP/UDP/IP requires 68 bytes, which is 70% more header than native RTP, at 40bytes. This calculation ignores the PES and adaptation field sizes, because these are notregularly distributed amongst the TS packets.
While the savings in header size for video are significant, they are still relatively smallcompared to the overall packet size. Seven TS packets form a payload of 7 x 184 = 1288bytes, so the header represents just 56/1288 = 4.3% for TS/UDP/IP or 68/1288 = 5.2% ofthe payload for TS/RTP/UDP/IP. Overall, the 28 byte difference in header size betweenTS/RTP/UDP/IP and native RTP is just 2% of the payload. Nevertheless, the extra headerbytes are a waste of bandwidth.
For audio carried over native RTP, where multiple frames are carried in the payload, there isan additional (approximately) 2 byte header per frame, as well as a fixed 2 byte header-length per packet. In this case the header length is (approximately) 2 (audio frame header-length) + 7*2 (audio frame header) + 12 (RTP) + 8 (UDP) + 20 (IP) = 56 bytes. For audiocarried over TS, a 7 byte “ADTS” header needs to be prepended to each audio frame, givingapproximately 7*7 = 49 extra bytes of header for a total of 105 or 117 bytes (for TS/UDP/IPand TS/RTP/UDP/IP respectively).
Thus, header size in the case of transmission of audio over native RTP is half the size of theheader in the case of TS/UDP/IP or TS/RTP/UDP/IP. It represents 4.3% of the payload inRTP/UDP/IP, 9% in TS/RTP/UDP/IP and 8.1% in TS/UDP/IP.
Overhead |
RTP/UDP/IP |
TS/RTP/UDP/IP |
TS/UDP/IP |
Video |
2% |
5.2% |
4.3% |
Audio |
4.3% |
9% |
8.1% |