Community
cancel
Showing results for 
Search instead for 
Did you mean: 
ulisses87
Beginner
39 Views

Video decoding and frame displaying conception problems

Hi,

I need to design a console application, which open video file, decode it and then gets frame from a defined place (e.g 15 sec from film starting). Then I want to display this frame as a picture in new window (such as in Open CV library).

Could you show me a sketch of a way to achieve these goals?

What I know:

1.) I need to use something as splitter sample from this page:http://software.intel.com/en-us/articles/getting-started-with-intel-ipp-unified-media-classes-sample/ to decode video file, encapsulated in multimedia container

2.) Next I need a way to force GetFrame method to retrieve one concrete frame from X sec. Unfortunately I do not how...

3.) Finally I need to display retrieved image in new window, but unfortunately I can't find any proper function in Intel IPP...

Thanks for any advices or clues. Obviously I analyzed sampled for audio-video-codecs and for image processing, but there are many complex functionality and nothing as easy(?) as I need.

0 Kudos
3 Replies
Chao_Y_Intel
Employee
39 Views

Hello,

Maybe you can suggest which format of the video you are decoding.

For your questions:

1.) I need to use something as splitter sample from this page: http://software.intel.com/en-us/articles/getting-started-with-intel-ipp-unified-media-classes-sample... to decode video file, encapsulated in multimedia container

That article includes some good get started code to learn the UMC sample code. If you want to more sophisticated sample, you can check the simpleplayer code at UMC.

2.) Next I need a way to force GetFrame method to retrieve one concrete frame from X sec. Unfortunately I do not how...

Some splitters in UMC support to reposition the video by call the following functions. It better to call the function (this is faster), than call GetFrame method directly.

SetTimePosition( );

3.) Finally I need to display retrieved image in new window, but unfortunately I can't find any proper function in Intel IPP...

IPP does not include the functions for display. IPP provide the optimized functions for computational complex code. The UMC sample include some render sample. This may provide some help to the video display.

Thanks,
Chao

ulisses87
Beginner
39 Views

Hi,

Currently I'm trying to decode .mp4 video file as in samples. My problem is, that I need to get one concrete frame e.g as bitmap in RGB and I can't do it. What's the format of image retrieved by GetFrame? I suppose that it's an unknown image with YUV color format...

I need something like (abstraction of course):

Bitmap GetFrame(video)

I can't explain it more clearly.

Thanks

Naveen_G_Intel
Employee
39 Views

Hi,
I am not sure, how you are calling Getframe. Refer to GetFrame Calling Scheme.


[bash]UMC::MediaData in;
UMC::MediaData out;
UMC::Status res;
UMC::BaseCodec* pCodec;
// getting the source
GetNextInputBuffer(&in);
do {
// obtaining the destination buffer
res = GetOutputBuffer(&out);
if (UMC::UMC_OK != res)
{
// error occurred with output stream
break;
}
// process the data
res = pCodec->GetFrame(&in, &out);
if (UMC::UMC_OK == res)
{
// deliver processed data
DeliverOutputData(&out);
}
} while (res == UMC::UMC_OK);[/bash]



Thanks,
Naveen Gv
Reply