Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6704 Discussions

H.264 stream receiving, but decode problem Help!!!!

vikas_krv85
Beginner
313 Views
Dear Sir/Madam,

Please help, we require urgently

We get mpeg4 and h264 stream from ip cam, remove RTP headers, and pass to UMC

Only Mpeg4 strream is getting decoded and displayed properly, but when h264 stream is given for decoding ,italways returns -996 UMC_ERR_NOT_ENOUGH_DATA
please find the attached stream file

My Code is given below

Ipp32s width=320,height=240;
UMC::ColorFormat color_format=UMC::YV12;
UMC::MPEG4VideoDecoder *mpeg4Decoder ;
UMC::H264VideoDecoder *h264Decoder;
UMC::VideoDecoderParams *params ;
UMC::MediaData *pIn;
UMC::VideoData *pOut ;

mpeg4Decoder = new UMC::MPEG4VideoDecoder();
h264Decoder = new UMC::H264VideoDecoder();
params = new UMC::VideoDecoderParams();
pIn = new UMC::MediaData;
pOut = new UMC::VideoData;

//this function gets called for each frame(I/P/B) received
void Buffer(char *szData, int nLen)
{
if(!g_bInit)//first frame initialize
{
g_bInit = true;
pIn->SetBufferPointer((Ipp8u *)szData,nLen);
pIn->SetDataSize(nLen);
params->m_pData = pIn;
//if (UMC::UMC_OK != (mpeg4Decoder->Init(params))) MPEG Decoder stream is working
//{
////Process errors
//}

if (UMC::UMC_OK != (h264Decoder->Init(params)))
{
//Process errors
}

pOut->Init(width, height, color_format);
pOut->Alloc();
}

pIn->SetBufferPointer((Ipp8u *)szData,nLen);
pIn->SetDataSize(nLen);
// Decoding stream using GetFrame(pIn, pOut) method
//UMC::Status stRes = mpeg4Decoder->GetFrame(pIn,pOut);
UMC::Status stRes = h264Decoder->GetFrame(pIn,pOut);//always returns -996 ie UMC_ERR_NOT_ENOUGH_DATA
if(UMC::UMC_OK == stRes)
{
((CRTSPappDlg*)g_hWnd)->staticDisplay.DisplayImage((BYTE*)pOut->GetDataPointer(),width,height,24,"");// this code displays the frame
SaveImage((BYTE*)pOut->GetDataPointer(),width,height,24);//this save to bmp file
}

//delete mpeg4Decoder; //destructor automatically calls Close() method.
//delete h264Decoder; //destructor automatically calls Close() method.

}


Please help!!!!!!
thanks in advance
0 Kudos
6 Replies
vikas_krv85
Beginner
313 Views
When i use simple_player and play the attached file, it just prints

Stream Type : H264PV

and exits the application, notdecoding the video

Please help!!!!!
0 Kudos
Vladimir_Dudnik
Employee
313 Views

Hello,

thanks for reporting the issue (and attaching test file). Could you please also specify what version of IPP and audio-video-codecs sample do you use?

Regards,
Vladimir
0 Kudos
vikas_krv85
Beginner
313 Views
IPP Version - 5.3.3.082
Samples : w_ipp-samples_p_5.3.095

Please help !!!!! urgent

0 Kudos
Vladimir_Dudnik
Employee
313 Views
Well, you are using the previous version of IPP. Could you please check this issue on the latest, IPP 6.0 release?

Regards,
Vladimir

0 Kudos
vikas_krv85
Beginner
313 Views
Sorry for the trouble guys

Got h264 stream up and running

Problem was SPS and PPS was missing, so later found it from SDP , parsed and added to stream data and was able to get live display

thanks

0 Kudos
Vladimir_Dudnik
Employee
313 Views

Thanks for updating us on this. In any case I would recommend you to evaluate the latest IPP version.

Regards,
Vladimir
0 Kudos
Reply