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

Modified MP4 splitter sample

Tamer_Assad
Innovator
490 Views

Hi,

This thread discusses Chaos sample splitter, and presents a modified version using also Chaos sample decoder.

The modified version doesnt use fwRender, yet, it still outputs a YUV file.

Many thanks to Chao for providing such helpful examples.

Code file attached: modifiedSplitter.cpp

This is an extension to thread:

http://software.intel.com/en-us/forums/showthread.php?t=79645&o=a&s=lr

Regards,

Tamer Assad
0 Kudos
7 Replies
Ying_H_Intel
Employee
490 Views
HiTamer,

Thank you a lot for the sharing. Right, I agree you that

If this is the case, you do not need any rendering process, all you need is to decode your frames and use your existing calls to out.GetPlanePointer or call out.GetBufferPointer() once per frame;

The decoder outputs YUV frames already!

I guessUlisses87 may worry about thecYUVData buffer is overflowing
when keeprun thedecoder wherecYUVData willkeep increase.

status = videoDecoder->GetFrame(&in,&out);

/////////////////////
//// imported code
if(status == UMC::UMC_OK)
{
cYUVData += frameSize;
out.SetBufferPointer(cYUVData,frameSize);
frameNumber++;
}

Actually, the buffer can be overwrited. (you don't need move the pointer)

for example,
umcSts = out.Init((Ipp32s) videoInfo->clip_info.width, (Ipp32s) videoInfo->clip_info.height, UMC::ColorFormat::YUV420, 8);//, Ipp32s iBitDepth = 0);
umcSts = out.Alloc();

ret =videoDecoder-> GetFrame((NoFramesForDecoder) ? (NULL) : &in, &out);

if (ret != UMC::UMC_ERR_NOT_ENOUGH_DATA && ret != UMC::UMC_OK)
return false; // error

if (ret == UMC::UMC_OK)
{
numDecFrames++;
printf(" decoder frame %d \n", numDecFrames);

// if you'd like to see the frame,you can store frame
WriteFrame(outDecoderfp, out, imgWidth, imgHeight);
}

Here is one stream (or pipeline)encoder/splitter/decoder sample code
No sureif i had attachedit somewhere,attached it again.it is for VC1codec, but the loop and processing is same for H.264 or MP4.
Seems wemay add the streaming sample to the get start sample.

Regards,
Ying

0 Kudos
ulisses87
Beginner
490 Views

Hi, again,

Many thanks Ying Hfor such useful example of code. Now, my code is working (almost) perfectly, what's mean that it does not save output yuv file :). I simply throw away fwRender object and added out.Init() and out.Alloc() referneces. Off course I have to change other parts of code. I'm really happy :).

0 Kudos
Chao_Y_Intel
Moderator
490 Views

Hi,

Thanks all of you, for sharing the code. It is very useful for users to learn the comprehensive UMC sample code here..

Thanks,
Chao
0 Kudos
ulisses87
Beginner
490 Views
Welcome you warmly!

I am just after my Engineer diploma defence.
I would like to express my thanks to all people from Intel Team, which helped me via this forum when I was doing my Engineer Degree final project. Your valuable advices and tips often were an important "signpost", which enabled me to get the proper way to solve my problems.

I have a small problem. Recently Intel has awarded me with Brown Belt of Intel Software Network, so I received an e-mail with info, that I can choose an one free book from Intel Press. Despite, that I have provided every necessary information, from one month I haven't had any reply. Could you advise me, what I should to do at this matter?
0 Kudos
Chao_Y_Intel
Moderator
490 Views

Hello,

This is a FAQ I can find on the brown belt:

http://software.intel.com/en-us/articles/intel-brown-belt-software-developer-and-intel-green-belt-software-developer-faqs/?wapkw=ALL(brown+belt)


This may provide some help on your problem.

Thanks,
Chao

0 Kudos
ulisses87
Beginner
490 Views

Hello Chao,

Thank you again for your help. The book was delivered at me today.

Regards,

Ulisses87

0 Kudos
99sanni
Beginner
490 Views
VirtualDub,Wax, Avidemux,Avid FreeDV, Wax all are free video editor, and
I just split mp4 files into one with the MP4 splitter for mac
0 Kudos
Reply