By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,478 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

Read a video frame by frame through a c program

P: 4
I m trying to read a video frame by frame through a c program for which i need to know the format of .wmv (native video file for windows) file,can i get it??
May 1 '12 #1
Share this Question
Share on Google+
7 Replies


weaknessforcats
Expert Mod 5K+
P: 9,197
Most likely you will need the Windows Media Format SDK to read the file. It's more complicated than a simple sequential read.
May 1 '12 #2

P: 4
yes i knwo its complicated,i just need to knw the structure of .wmv file or asf container (by microsoft),so that i can judge where a frame starts or ends in a sequentially stored video in memory(file).
i already know the basic structure of bitmap file ,ie native img frmat fr windows.
I also need to knwo what is the exact format(native one) of a frame of a video??
May 2 '12 #3

weaknessforcats
Expert Mod 5K+
P: 9,197
http://www.digitalpreservation.gov/f...dd000091.shtml

There you go. Ultimately, you need the ASF spec.

I stll think you have a better shot by using the SDK. No telling what MS has actually done.
May 2 '12 #4

P: 4
i guess u r getting me wrong
consider
typedef struct
{
char signature[2];
unsigned int fileSize;
unsigned int reserved;
unsigned int offset;
}BmpHeader;

typedef struct
{
unsigned int headerSize;
unsigned int width;
unsigned int height;
unsigned short planeCount;
unsigned short bitDepth;
unsigned int compression;
unsigned int compressedImageSize;
unsigned int horizontalResolution;
unsigned int verticalResolution;
unsigned int numColors;
unsigned int importantColors;

}BmpImageInfo;
the above are structures of a header n image info of a bitmap file,
can i have something similar for .wmv file??
May 2 '12 #5

weaknessforcats
Expert Mod 5K+
P: 9,197
.wmv files are .asf files so you should get the file format from the asf file specification.

I don't think the wmv file format conveniently coded in C for Windows is available other than in the MS Media Format SDK.

http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
May 2 '12 #6

P: 4
ok thanks a ton!mya problem is solved..:)
May 2 '12 #7

P: 1
how did it get solved?
I have the same problem as you did, and didn't get the true solution among your conversations yet.
Please let me know too
1 Week Ago #8

Post your reply

Sign in to post your reply or Sign up for a free account.