开发者

RTP Stream... MPEG-2 or MPEG-4?

I'm using R开发者_运维问答TP TS (Payload 33) to stream some video files in MPEG-2 and MPEG-4, and then perform some tasks over them.

How could I know what type of video (MPEG-2 o MPEG-4) is inside the RTP stream I receive?

Is there any header or field which indicates the one it is?

Thanks for your help.


If you use the rtsp protocol recive streaming you can check the video format of SDP(Session Description Protocol). ex: a=rtpmap:96 MP4 (96 means the payload type)

96 in decade is 1100000 in binary so if the last 7 bits of the second byte of RTP header is 1100000 , that is point!

I just recive MPEG4 streaming so the MPEG2 you can try it use the same way.


Alternatively if you don't have SDP, you can parse the packets.

If you process the PAT and PMT, you can retrieve the stream id for your PID from the PES header.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜