Presentation is loading. Please wait.

Presentation is loading. Please wait.

NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) MPEG + RTP.

Similar presentations


Presentation on theme: "NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) MPEG + RTP."— Presentation transcript:

1 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) MPEG + RTP

2 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) Previously, on CS5248 MPEG Compression Sequence, GOP, Picture, Slice, Macroblock, Block, DC/AC Coefficient I-Frame, P-Frame, B-Frame

3 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) Previously, on CS5248 RTP headers SSRC, Media Timestamp, Marker Bit, Payload Type.. Application-Level Framing

4 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) You are Here Network Encoder Sender Middlebox Receiver Decoder

5 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) Application-Level Framing

6 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) How to send/recv? Let the application decide, not protocol stacks. Tennenhouse + Clark

7 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) Application Knows Best How to reorder packets Whether to ignore loss Which packet to retransmit

8 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) Application Data Unit (ADU) Can be processed individually, even out-of- order Unit of error-recovery If part of an ADU is lost, the whole ADU is considered lost 8-Bit PCM audio: 1 ADU = 1 Byte MPEG1 Video: 1 ADU =

9 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) How to chop data into packets? Every received packet should be useful (even in very lossy environments) Ideally, 1 ADU in 1 packet

10 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) RTP Payload Header RTP Header RTP Payload Header RTP Payload MPEG-1? 2? Temporal Reference I? P? B? Begin of Slice? End of Slice?

11 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) RTP Header Media Timestamp: 32 bits the instant the first byte in this packet is captured 90 kHz timestamp (90000 = 1 second)

12 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) RTP Header Marker Bit: 1 if contains the last byte of a frame

13 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) RTP Header Payload Type: 7 bits 32 for MPEG-1

14 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) RTP Payload Header MBZ (5 bits) Unused. Must be 0

15 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) RTP Payload Header T (1 bit) 1 if there is a MPEG-2 Extension Header after this header.

16 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) RTP Payload Header Temporal Reference (10 bits) The ‘frame number’ of the current frame within the GOP

17 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) RTP Payload Header AN bit and N bit Set to 0 for MPEG-1

18 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) RTP Payload Header S (1 bit) Is there a sequence header in this packet? Repetition of sequence header is useful for resynchronization

19 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) RTP Payload Header BS (1 bit) and ES (1bit) BS is 1 iff the ‘first’ byte of this payload is a slice header ES is 1 iff the last byte of this payload is the end of a slice

20 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) RTP Payload Header Picture Type (3 bits) I (1), P (2), B (3), D (4)

21 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) RTP Payload Header Motion Vectors Information Get from most recent picture header

22 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) Fragmentation Rules Sequence header: at the start of payload GOP header: at the start of a payload (or follows Sequence header) Picture header: at the start of a payload (or follows Sequence/GOP header)

23 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) Fragmentation Rules A slice must be either First data in the packet, or Follows integral number of slices A slice may be fragmented if exceeds the size of a packet

24 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) Packet Size 1 MTU is 1500 bytes IP Header UDP Header RTP Header RTP Payload Header Payload Size =

25 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) Project Packetize MP3 or Speex audio into RTP Packets

26 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) Goal Use the Yima Personal Edition streaming media server code Modify the yimasplit utility, which creates data blocks containing pre-computed RTP packets Server reads data blocks and sends out RTP packets Modify client to decompress and play audio

27 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) Project Homepage Descriptions Yima Personal Edition Code on CD-ROM Documentation IVLE Forums

28 NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) Advice The Yima PE source code is not very well documented Select your own project, or do the suggested one Either way: Start early


Download ppt "NUS.SOC.CS5248-2007 Roger Zimmermann (based on slides by Ooi Wei Tsang) MPEG + RTP."

Similar presentations


Ads by Google