[Ffmpeg-devel] Everyone ever tried to decode H.263 *without* coming from RTSP?

Cool_Zer0 c00jz3r0
Tue Feb 6 18:57:46 CET 2007


Hi there,

I'm fighting with ffmpeg at least from 3 months ago...
Everyone in this community ever tried to decompress video in H.263 format
coming in RTP packets but not comingo through RTSP?

I've a VoIP application that sends me video in H.263 format...
I can decompress correctly the RTP and extract the payload correcty because
I'm sending back the payload to the VoIP application and it receives and
decompresses that payload...

On the other side, when I pass the payload to the ffmpeg for decompression
the image gets all wrong... Seems that ffmpeg is only decompressing the
changes and never cares with the last keyframe...


void video_decode(unsigned char* payload, int payloadsize)
{

   int r = av_parser_parse(parser_context, c, &poutbuf, &poutsize, payload,
payloadsize, 0, 0);

   inbuf_ptr = poutbuf;
   size = poutsize;

   while (size > 0) {
       len = avcodec_decode_video(c, picture, &got_picture, inbuf_ptr,
size);

       if (len < 0) {
           return;
       }
       if (got_picture) {
           img_convert((AVPicture *)pFrameRGB, PIX_FMT_BGR24,
(AVPicture*)picture, c->pix_fmt, 176, 144);
           //rgb_save(pFrameRGB->data[0], "frame");
           showFrame(pFrameRGB->data[0]);
           frame++;
       }
       size -= len;
       inbuf_ptr += len;
   }

   len = avcodec_decode_video(c, picture, &got_picture, NULL, 0);
   if (got_picture) {
       img_convert((AVPicture *)pFrameRGB, PIX_FMT_BGR24,
(AVPicture*)picture, c->pix_fmt, 176, 144);
       //rgb_save(pFrameRGB->data[0], "frame");
       showFrame(pFrameRGB->data[0]);
       frame++;
   }

}

I really like someone to tell me, since nobody until know could, what's
wrong on the code...
The BGR24 is on purpose because I'm showing the frames on bitmap format with
Visual C++...

Is it possible that a super library like ffmpeg isn't unable to decompress
H.263 correctly without using the bundled rtsp support. I'll repeat: I don't
have RTSP... The RTP packets on the VoIP application are generated with
Microsoft RTC...


Please help




More information about the ffmpeg-devel mailing list