[Ffmpeg-devel] Decode a RTP stream in H.263

Ryan Martell rdm4
Thu Nov 30 17:07:56 CET 2006


Hi-

On Nov 30, 2006, at 4:42 AM, Michael Niedermayer wrote:
> Hi
>
> On Thu, Nov 30, 2006 at 10:05:22AM +0000, Cool_Zer0 wrote:
>> Hi there!
>>
>> I have a question. I've look on the documentation sectional of  
>> FFMpeg page
>> and check the code but I can't figured it out.
>>
>>
>> My main purpose, for now, is decode H.263, that I receive by RTP,  
>> and then
>> show it on my PDA screen.
>>
>> So... I already have the RTP stack and I can extract the encoded
>> H.263packet.
>>
>> My main question when I look through "libavcodec/h263dec.c" is  
>> that you have
>> a decode_init(), a decode_end() and then a decode_frame(). (I  
>> think I'm
>> right!!!)
>>
>>
>> And now the ultimate question:
>> - Can I call decode_frame() for each packet that I receive?
>> - What will happen if the packet that I received doesn't contain the
>> complete frame?
>
> you will have to use a AVParser
>
>>
>>
>> Another question:
>>
>> On decode_init() you have:
>>
>> /* select sub codec */
>> switch(avctx->codec->id) {
>>   case CODEC_ID_H263: ...
>>   case CODEC_ID_MPEG4: ...
>>   case CODEC_ID_MSMPEG4V1: ...
>>   ...
>>   case CODEC_ID_FLV1: ...
>>
>> I'm wondering if that switch is to say: "The result of the  
>> decoding process
>> will be a [MPEG4, WMV3, ...]".... Can't I say that I want the  
>> result on YUV
>> or RGB?
>
> go and read apiexample.c

Have you just tried it yet?  rtp.c has the H263 codec in it for a non- 
dynamic transport protocol type.  It might just work:

./ffplay rtsp://blahblahblah/file.sdp

FFMPEG already has the rtp stack in it, so if that doesn't work, you  
could check out rtp_h264.c, where I added the h264 decoding to the  
already existing rtp stack.

Good luck,
-Ryan




More information about the ffmpeg-devel mailing list