Hi,

amol mahamuni wrote:
>   Hello All,
>    
>   I have a query regarding RTP payload format for H.263.
>   I am following RFC 2190.
>    
>   I get RTP H.263 packets from RTSP server. I want to parse these packets and 
> fed the stream to decoder to get RGB frames. 
>    
>   Following is the procedure that I used.
>    
>   1. Paser RTP header part. This is 12 bytes header which contains payload 
> value 34 (so H.263 data)

Note that AFAIK PT 34 has been deprecated, and a dynamic payload type should now
be used for H.263 video.


>   2. Next comes Payload header. This is H.263 header. I looked @ F and P bits 
> mentioned in rfc 2190. Depending upon valus for F and P, I come to know 
> packet type (A/B/C) - so payload header will be (4/8/12 bytes respectively).
>    
>   3. I have concatenated H.263 bitstream data until I get RTP header with 
> Marker bit set.

Did you remember to discard the extra bytes introduced by the payload header?


>   4. Now this concatenated data is given to "FFMpeg" decoder (libavcodec.dll)
>    
>   I am unable to get video frames.

If you correctly removed the payload headers from the bitstream, I guess
the bug is in this last pass. What do you mean by "is given to ffmpeg
decoder"? Are you calling avcodec_decode_video() on the received bitstream?
Did you correctly split it into video frames? Did you add
FF_INPUT_BUFFER_PADDING_SIZE bytes to your input buffer? Did you correctly
initialise the decoder? What do you mean by "I am unable to get video frames"?
Is avcodec_decode_video() failing? Or is it simply returning distorted images?
Is the codec printing any error?


>   Questions:- 
>   1. Is there anything wrong in above procedure?

This is difficult to say without more details (see above).

>   2. While parsing RTP packets, I found that H.263 packet types are varying 
> between A/B/C - meaning - I get 1 packet of A-type, next is B type or 
> sometimes some C type packets.
>   Is this ok?

This depends on the program which is creating the stream.


>   can anyone please help me resolving issue for decoding this?

I guess the simplest way to decode h.263 over RTP is to implement support
for RFC2190 in the RTSP/SDP demuxer in libavformat (then, libavformat will
take care of correctly splitting the stream in frames, etc...).
BTW, RFC2190 looks very old and probably deprecated... Are you sure that
your stream is encapsulated according to RFC2190 and not to RFC2429
or RFC4629?



                                Luca
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to