how to extract a single bitmap from .avi file?
-
hy, i didnt found out, how i can do this. none of the classes i know, can load a .avi movie and then get a certain frame as a bitmap, does anybody has an idea, how i could do this? thanx a lot!
-
hy, i didnt found out, how i can do this. none of the classes i know, can load a .avi movie and then get a certain frame as a bitmap, does anybody has an idea, how i could do this? thanx a lot!
Look in the MSDN for "AVIview: Read/Write APIs in AVIfile" for the example prog AviView. I actually use AviView as a tool to look at individaul frames within an AVI file.
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau
-
Look in the MSDN for "AVIview: Read/Write APIs in AVIfile" for the example prog AviView. I actually use AviView as a tool to look at individaul frames within an AVI file.
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau
hy, sorry, but i didnt found anything with this search string(not on the net and also not in the MSDN)! and i also didnt found the sample prog AviView. could you give me more details or an exact link? thanx
-
hy, sorry, but i didnt found anything with this search string(not on the net and also not in the MSDN)! and i also didnt found the sample prog AviView. could you give me more details or an exact link? thanx
Well it is on my MSDN! Honest:-O I found this link http://www.banasoft.net/Links.htm[^] Or I can email to you it is c. 58 KB zipped including the exe file, I would suggest I email as the link could be wrong, let me know.
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau
-
Well it is on my MSDN! Honest:-O I found this link http://www.banasoft.net/Links.htm[^] Or I can email to you it is c. 58 KB zipped including the exe file, I would suggest I email as the link could be wrong, let me know.
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau
hy, thanx a lot, i could download it. the code seems quite complicated, could you maby tell me shortly, how i can grabb a picture from an avi? for instance load an avi, and get the 4th bitmap of the movie and store it in a CBitmap object. thanx a lot!
-
hy, thanx a lot, i could download it. the code seems quite complicated, could you maby tell me shortly, how i can grabb a picture from an avi? for instance load an avi, and get the 4th bitmap of the movie and store it in a CBitmap object. thanx a lot!
in aviview.c have a look at
lpbi = AVIStreamGetFrame(gapgf[giFirstVideo], 0); DrawDibBegin(ghdd[giFirstVideo], NULL,lpbi->biWidth, . . .
All drawing to the screen is done via the DrawDib functions, so add your code here to save the data to disk. I would not say this code is very easy to follow but the concepts are straight forward, it will take a while for you to figure it out though! Of course the new way to do this is to use DirectX but that is a different storey, the concept is the same just read the AVI frame by frame or jump to the frame you want then read/save it.
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau
-
in aviview.c have a look at
lpbi = AVIStreamGetFrame(gapgf[giFirstVideo], 0); DrawDibBegin(ghdd[giFirstVideo], NULL,lpbi->biWidth, . . .
All drawing to the screen is done via the DrawDib functions, so add your code here to save the data to disk. I would not say this code is very easy to follow but the concepts are straight forward, it will take a while for you to figure it out though! Of course the new way to do this is to use DirectX but that is a different storey, the concept is the same just read the AVI frame by frame or jump to the frame you want then read/save it.
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau
hy, the samplecode worked, and it could do what i wanted, but i am sure there is a easier way, isnt it? arent there any MFC classes, or tricks, to do this easyer? thanx andreas
-
hy, the samplecode worked, and it could do what i wanted, but i am sure there is a easier way, isnt it? arent there any MFC classes, or tricks, to do this easyer? thanx andreas
There are a few wrapper classes on CP, but I did not like any of them! But that is my personal opinion! so search CP for AVI, I came up with these. I never said the API was easy to follow! After a few months you will realise it is straight forward, it took me ages to figure it out, and I could not really explain to anyone now how it works it is just so badly documented. http://www.codeproject.com/useritems/aviutil_.asp[^] http://www.codeproject.com/audio/avigenerator.asp[^]
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau