RTP
From Vague Hope Wiki
RTP Headers
- http://en.wikipedia.org/wiki/Real-time_Transport_Protocol
- http://tools.ietf.org/html/rfc3550 RTP: A Transport Protocol for Real-Time Applications
- http://tools.ietf.org/html/rfc2326 Real Time Streaming Protocol (RTSP)
- http://tools.ietf.org/html/rfc3551 RTP Profile for Audio and Video Conferences with Minimal Control
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |V=2|P|X| CC |M| PT | sequence number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |<- timestamp ->| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |<- SSRC identifier ->| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 80 21 d2 dd 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 1 0 1 1 0 1 1 1 0 1 80 21 d2 de 80 af fa f1 80 21 d2 df 80 21 d2 e0 80 21 d2 e1 80 d4 ae 72 80 21 d2 e2 80 21 d2 e3 80 21 d2 e4
(p_rtp[0] & 0xc0) == 0x80; xxxx 10?? ???? & 0xc0 1100 0000 == 0x80 1000 0000 ? 0 0 1 0 0 0 0 1 & 0 1 1 1 1 1 1 1 1 == 0 0 0 1 0 0 0 0 1
MPEG2 Headers
The total number of bits below is 32 and is called the transport stream 4-byte prefix or Transport Stream Header:
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |<- sync byte ->|T|P|T|<- PID ->|SC |AFE|ContCnt| | Transport Error Indicator (TEI) | | Payload Unit Start Indicator | | Transport Priority | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 47 01 00 3d 0 1 0 0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |<- AF length ->|D|R|E|P|O|S|T|A| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 01 20 1f fb 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MBZ |T| TR | |N|S|B|E| P | | BFC | | FFC | | AN FBV FFV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 01 00 3d 01 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 1