Mpeg rtp
Download
1 / 29

MPEG + RTP - PowerPoint PPT Presentation


  • 128 Views
  • Uploaded on

MPEG + RTP. Previously, on CS5248. MPEG Compression Sequence, GOP, Picture, Slice, Macroblock, Block, DC/AC Coefficient I-Frame, P-Frame, B-Frame. MPEG Frame Sizes. Constant Bitrate (CBR) vs. Variable Bitrate (VBR). Previously, on CS5248. RTP headers

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' MPEG + RTP' - finola


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Previously on cs5248
Previously, on CS5248

  • MPEG Compression

    • Sequence, GOP, Picture, Slice, Macroblock, Block, DC/AC Coefficient

    • I-Frame, P-Frame, B-Frame


Mpeg frame sizes
MPEG Frame Sizes

  • Constant Bitrate (CBR) vs. Variable Bitrate (VBR)


Previously on cs52481
Previously, on CS5248

  • RTP headers

    • SSRC, Media Timestamp, Marker Bit, Payload Type ..

    • Application-Level Framing


You are here
You are Here

Encoder

Decoder

Middlebox

Receiver

Sender

Network



How to send recv
How to send/recv?

Let the application decide, not protocol stacks.

Tennenhouse + Clark


Application knows best
Application Knows Best

  • How to reorder packets

  • Whether to ignore loss

  • Which packet to retransmit


Application data unit adu
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 =


How to chop data into packets
How to chop data into packets?

  • Every received packet should be useful (even in very lossy environments)

  • Ideally, 1 ADU in 1 packet


Rtp payload header
RTP Payload Header

RTP Header

RTP Payload

Header

RTP Payload

  • MPEG-1? 2?

  • Temporal Reference

  • I? P? B?

  • Begin of Slice? End of Slice?


Rtp header
RTP Header

  • Media Timestamp: 32 bits

    • the instant the first byte in this packet is captured

    • 90 kHz timestamp (90000 = 1 second)


Rtp header1
RTP Header

  • Marker Bit:

    • 1 if contains the last byte of a frame


Rtp header2
RTP Header

  • Payload Type: 7 bits

    • 32 for MPEG-1


Rtp payload header1
RTP Payload Header

  • MBZ (5 bits)

    • Unused. Must be 0


Rtp payload header2
RTP Payload Header

  • T (1 bit)

    • 1 if there is a MPEG-2 Extension Header after this header.


Rtp payload header3
RTP Payload Header

  • Temporal Reference (10 bits)

    • The ‘frame number’ of the current frame within the GOP


Rtp payload header4
RTP Payload Header

  • AN bit and N bit

    • Set to 0 for MPEG-1


Rtp payload header5
RTP Payload Header

  • S (1 bit)

    • Is there a sequence header in this packet?

    • Repetition of sequence header is useful for resynchronization


Rtp payload header6
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


Rtp payload header7
RTP Payload Header

  • Picture Type (3 bits)

    • I (1), P (2), B (3), D (4)


Rtp payload header8
RTP Payload Header

  • Motion Vectors Information

    • Get from most recent picture header


Fragmentation rules
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)


Fragmentation rules1
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


Packet size
Packet Size

  • 1 MTU is 1500 bytes

  • IP Header

  • UDP Header

  • RTP Header

  • RTP Payload Header

  • Payload Size =


Project

Project

Packetize MP3 or Speex audio into RTP Packets


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


Project homepage
Project Homepage

  • Descriptions

  • Yima Personal Edition Code on CD-ROM

  • Documentation

  • IVLE Forums


Advice
Advice

  • The Yima PE source code is not very well documented

  • Select your own project, or do the suggested one

  • Either way: Start early


ad