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

Zoltan NAGY nagyz
Wed Jul 20 11:51:29 CEST 2005

Martin Boehme wrote:

> Zoltan NAGY wrote:
>> how can I get a frame out of an mpeg4 video file? I mean, I suspected
>> av_read_frame(), but that gives back an AVPacket, and that's only 52 
>> bytes
>> (according to sizeof(AVPacket) )...
>> so, how can I get one frame out of a video using libavcodec?
> 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?

Thanks in advance,

Zoltan NAGY,
Software Engineer

More information about the ffmpeg-devel mailing list