Community
cancel
Showing results for 
Search instead for 
Did you mean: 
intensifi
Beginner
88 Views

extract images from AVI file

Hello,

Can I use IPP to extract frames (images) from an AVI file?

As part of my explorations I've been trying to run the sample "simple player" under audio-video-codecs with IPP 6.0 and I do not see any video but I hear the sound.

I'm on windows XP using Visual Studio 2005 with the August 2008 DirectX SDK installed.

thanks in advance!

0 Kudos
3 Replies
Vladimir_Dudnik
Employee
88 Views

Hello,
as you probably know the AVI file is just a container which can keep the data compressed in many different formats and even not compressed data at all.
To get the data from AVI file you need to have an appropriate codec. The simple_player appllication do support several media codecs but of course not all possible variants. The idea of simple player is to show how to use IPP optimized codecs (we do have MPEG2, MPEG4, H.264 and some others, see sample documentation for details). Most probably the AVI file you have contains data where video was compressed with some codecs which we do not support, that is why you do not see video output from it.
As far as I remember, simple player show some info on media tracks in AVI file on console, so if you see something like VIDEO UNKNOWN or similar that might be the case.
Regards,
Vladimir

intensifi
Beginner
88 Views

Quoting - vdudnik
Hello,
as you probably know the AVI file is just a container which can keep the data compressed in many different formats and even not compressed data at all.
To get the data from AVI file you need to have an appropriate codec. The simple_player appllication do support several media codecs but of course not all possible variants. The idea of simple player is to show how to use IPP optimized codecs (we do have MPEG2, MPEG4, H.264 and some others, see sample documentation for details). Most probably the AVI file you have contains data where video was compressed with some codecs which we do not support, that is why you do not see video output from it.
As far as I remember, simple player show some info on media tracks in AVI file on console, so if you see something like VIDEO UNKNOWN or similar that might be the case.
Regards,
Vladimir

Thank you for your response.

I traced through the simple_player example in the debugger and what happens is the video codec type is unsupported. It is Microsoft Run Length Encoding (MRLE). The identifier is 116269709.

What simple player does is just output information about the audio stream. There is no output for the video stream at all. This is because the video processing thread is started with an unknown codec type. I think the simple_player should display the unknown codec info before going forward. But that is easy enough to fix in my own code.

My specific question is more about how to intervene in the normal UMC media processing/rendering flow and intercept the frames which would normally go to the rendering components and instead operate on them or display them as individual bitmaps, jpegs, etc.

You kind of answered a question about this a couple of years ago when someone asked about merging UMC processing with UIC processing. However it seems to make a great deal of sense to include an example which does just that in the IPP or UMC documentation as I believe many of your customers will need to perform frame by frame based analysis.

Do you have such an example available? Also can you post some AVI files somewhere that you know UMC can decode properly in the sample player application? Maybe there should be a sample media files download parallel to the programming samples download???

Thanks in advance!

Vladimir_Dudnik
Employee
88 Views

Thanks,
we currently do not have sample code to show frame by frame processing with UMC. You probably may find it useful to take a look at a sample code emdedded into UMC manual for motion JPEG video decoder, where it dump each separate frame into file (you may substitute this with any kind of processing).
Unfortunately we do not provide media streams for IPP samples (you may submit this as a feature request for future versions).
Regards,
Vladimir

Reply