[Ffmpeg-devel] [Ffmpeg-devel-old] rtp mpeg4 packetize problem

Luca Abeni lucabe72
Wed Jul 20 15:03:02 CEST 2005


On Wed, 2005-07-20 at 11:51 +0200, Zoltan NAGY wrote:
> > The AVPacket doesn't contain the actual data -- that's in a buffer 
> > pointed to by the "data" element of AVPacket. The length of the buffer 
> > is given in "size".
> oh, thanks!
> now, another problem rises:
> video packet size: 5978
> video packet size: 5924
> video packet size: 6849
> video packet size: 5995
> video packet size: 6067
> video packet size: 6167
> how should I put it into RTP packets of 1300 bytes? well, for example, 
> if the size is
> 6067 bytes, then it fits into 5 packets, the first 4 consits of 1300 
> bytes data, but the last's
> payload is only 867 bytes. can I indicate it in the header?
Just send a packet of 867 + rtp_header_size (usually 12) bytes. Have a
look at RFC 1889 and RFC 3016 for more details.

BTW: I just had a look at the current RTP code in libavformat, and it
evolved quite a lot since the last time I looked at it... I suspect
sending MPEG4 video orver RTP with libavformat can "almost work": if I
do not misread the code, the M bit is not properly set, but everything
else should be ok. If I have some time, I'll test it and I'll send a
patch if it does not work.


 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 Novit? per telefonare risparmiando: Email.it Phone Card, clicca e scopri i vantaggi
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2689&d=20-7

More information about the ffmpeg-devel mailing list