[vlc] Re: MP3 Streaming - Repacketization during Packet Loss

Ross Finlayson finlayson at live.com
Wed Oct 6 06:32:48 CEST 2004


>Say for example, the server sends out a 128Kbps CBR 44.1 KHz MP3 file. If 
>RTP packet 1 contains 100 bytes of MP3 frame 1, RTP Pkt 2 containing 217 
>bytes of MP3 frame 1 and RTP Pkt 3 containing the remaining 100 bytes of 
>MP3 frame 1.
>
>Upon sending the frames, the server is putting out
>          RTP pkt 1 with Frame 1 Hdr + 100 bytes of Frame 1
>          RTP pkt 2 with Frame 2 Hdr + 217 bytes of Frame 1
>          RTP pkt 3 with Frame 3 Hdr + 100 bytes of Frame 1 + 200 bytes of 
> Frame 2

As an aside, note that the third packet is not legal.  RTP packets must 
contain either an integral number of MPEG audio frames, or a single 
fragment of a MPEG audio frame.  (Admittedly, RFC 2250 is not particularly 
clear on this point.)

>How to repacketize the MP3 frames if the RTP Pkt 2  is lost in the 
>transmission?

VLC's RTSP/RTP client support is implemented using the "LIVE.COM Streaming 
Media" libraries <http://www.live.com/liveMedia/>.  The way that this code 
currently handles incoming MPEG audio RTP packets, if packet 2 in your 
example were lost, then the data from both packet 1 and packet 3 would be 
delivered to the decoder.  (See "liveMedia/MPEG1or2AudioRTPSource.cpp" in 
the LIVE.COM code, if you care...)

         Ross.


-- 
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html



More information about the vlc mailing list