Thursday, January 31, 2008

How to parse MPEG4 data over the RTP stream and identify the header with SDP file ?

analysing the RTP received packets from middle of the sending and test the SDP with QuickTime and VLC player.
Qt and VLC plays the RTP stream thru SDP file .So There might be two chance for it.

1.without SDP file players can't receive RTP stream data.
Reason :
If I opened the RTP stream in a VLC player, it doesnt receive RTP stream data and gives unable to open error.

2. So based on this SDP file and we have to search for the VOL_start_code. For Each frame VOP is available. Successive VOPs can have I Frame or P Frame. for computer video, VOL_Header must have an information about Width and height

So combine the VOP information and SDP file information, it creates the header for MPEG4 Encoded data. But VOP start Code is not like that... 0000 01 B6 (vop_start_code ) it is available in more than one RTP packet consecutively.These packets are having less frame size.

VOL header is having more video Info . So it is having the header info. So we have to search for the Next VOL header.
if we started from middle of the RTP stream.

1 comment:

Vinay said...

Hi, Sundarrajan.
I am stuck with a problem which probably u can address better.
I am dumping RTP payload data to a file which I need for decoding. I dont want to play the file through any player as I have a decoder to play it in my App. Payload data is MPEG4 encoded data and starting from 00 00 01 B6. To validate the data and what should be modified so that VLC player can play the file.
I am using JRTPLIB library to receive RTP packets.