Wednesday, February 20, 2008

How can we extract the MPEG4 Frame Type from the RTP packet ?

How can we extract the MPEG4 Frame Type from the RTP packet (I,P or B):
------------------------------------------------------------------------
We are creating a software to parse MPEG4 data. Can anyone tell me how to extract the Frame Type (I,P,B) frame type from the whole RTP packet?
I mean I have RTP packet with MPEG4 payload in it, then how to extract the Frame type information from it?
Solution :
---------------
vop_coding_type is encoded in the first 2 bits after vop_start_code.
vop_start_code is 00 00 01 b6 (hex)
vop_coding_type means:
0 0 -I VOP
0 1 -P VOP
1 0 -B VOP
1 1 -S VOP

we are sending mpeg4 video thru rtp using ffmpeg.
Every I Frame( KeyFrame) is having VOS start code. 00 00 01 B0

No comments: