| | |
Nehe Gamedev.net Tutorial Problem: AVI Video in openGL
![]() |
I was trying to do AVI from openGL on my computer and decided to try out lesson 35 of the NeHe tutorial: http://nehe.gamedev.net/data/lessons....asp?lesson=35
Well I tried using my own video, and I tried using the video (Face2.avi) he supplied, but both of them crap out on this line:
pgf=AVIStreamGetFrameOpen(pavi, NULL); // Create The PGETFRAME Using Our Request Mode
if (pgf==NULL)
{
// An Error Occurred Opening The Frame
MessageBox (HWND_DESKTOP, "Failed To Open The AVI Frame", "Error", MB_OK | MB_ICONEXCLAMATION);
}
Always throws the error on me:
"Failed To Open The AVI Frame"
But the problem is...I have no idea what to do now. It won't run, and there is no explanation of why it won't get the frame. Is it a codec thing? Is it a format problem? I'm confused. If anyone could help on this I would appreciate it greatly.
I tried to post this on the Gamedev.net forums, but I can see that those forums are for readers...not posters. No one responded to me. I have always gotten some good response from this community so I am asking you all now if you've done this tutorial and have suggestions. Also if anyone has done video as a texture on an object in openGL that is what I'm really looking for as an end goal. If there are good tutorials out there regarding this topic I have not found them. Thank you for your time.
Well I tried using my own video, and I tried using the video (Face2.avi) he supplied, but both of them crap out on this line:
pgf=AVIStreamGetFrameOpen(pavi, NULL); // Create The PGETFRAME Using Our Request Mode
if (pgf==NULL)
{
// An Error Occurred Opening The Frame
MessageBox (HWND_DESKTOP, "Failed To Open The AVI Frame", "Error", MB_OK | MB_ICONEXCLAMATION);
}
Always throws the error on me:
"Failed To Open The AVI Frame"
But the problem is...I have no idea what to do now. It won't run, and there is no explanation of why it won't get the frame. Is it a codec thing? Is it a format problem? I'm confused. If anyone could help on this I would appreciate it greatly.
I tried to post this on the Gamedev.net forums, but I can see that those forums are for readers...not posters. No one responded to me. I have always gotten some good response from this community so I am asking you all now if you've done this tutorial and have suggestions. Also if anyone has done video as a texture on an object in openGL that is what I'm really looking for as an end goal. If there are good tutorials out there regarding this topic I have not found them. Thank you for your time.
Download the executable plus the packed source code of the tutorial from here and see if the executable runs. If yes then the problem is not with codecs but with your code.
Try compiling and running the code which comes in the zip file and see if it works. If it does compare the source code with the code you have written -- there has got to be a minor discrepancy in both the codes....
Repost if what I suggested doesn't work...
Try compiling and running the code which comes in the zip file and see if it works. If it does compare the source code with the code you have written -- there has got to be a minor discrepancy in both the codes....
Repost if what I suggested doesn't work...
I don't accept change; I don't deserve to live.
First of all Thank you a million times over for responding to me. I began to think no one cared at all about my trouble
I downloaded and ran the zip that Jeff Molofee(NeHe) gives on that lesson35.zip. I both ran the exe and I ran it from within VC++ It still gave me the same error each time, so I know its not discrepency in code at least...Did it work for you? There must be some other problem there
Thank you again for helping me
I downloaded and ran the zip that Jeff Molofee(NeHe) gives on that lesson35.zip. I both ran the exe and I ran it from within VC++ It still gave me the same error each time, so I know its not discrepency in code at least...Did it work for you? There must be some other problem there
Thank you again for helping me
•
•
•
•
I began to think no one cared at all about my trouble

Well, you've obviously narrowed it down to the codecs (definitely not your code), thanks to ~s.o.s~. My guess is that you're missing some sort of DLL file. Could you possibly be missing msvfw32.dll? If you are, you may want to download it, as this file is crucial for playing videos in your application.
oh and btw ~s.o.s~, maybe you want to move this thread to the game development forum? That would be an excellent place for this thread.
Last edited by John A; Jan 22nd, 2007 at 10:42 pm.
"Technological progress is like an axe in the hands of a pathological criminal."
You are right. Daniweb is one of the best online communities of which I've been a part.
So I do have msvfw32.dll it is in my windows/system32 folder. Did a search for it to make sure. It cannot be that then. Any other suggestions perhaps? I have to try to test this code again on another computer so that I know whether or not it is my computer that's the problem, but barring my ability to do that any time soon (Due to the fact that I am sick right now) any other ideas that might help would be greatly appreciated. I feel like it's my computer. Did you all get it to work fine on yours?
So I do have msvfw32.dll it is in my windows/system32 folder. Did a search for it to make sure. It cannot be that then. Any other suggestions perhaps? I have to try to test this code again on another computer so that I know whether or not it is my computer that's the problem, but barring my ability to do that any time soon (Due to the fact that I am sick right now) any other ideas that might help would be greatly appreciated. I feel like it's my computer. Did you all get it to work fine on yours?
Yes, I believe he said that the executable downloaded from NeHe's site failed also:
Yes, I read that too. However, several things:
•
•
•
•
I both ran the exe and I ran it from within VC++ It still gave me the same error each time, so I know its not discrepency in code at least...Did it work for you?
•
•
•
•
From an extract on NeHe's site:
Do you have the header as well as the library file on your computer... ?
- Without the header file, you'd have syntax errors in the code. Without the library file, you'd have linker errors.
- Since .lib is statically linked, it shouldn't be a problem in the executable downloaded.
- Which is why I suspected a missing dll file that contains function code that vfw.lib depends on. I looked it up, and the modern dll file msvfw.dll has replaced the old vfw.dll.
"Technological progress is like an axe in the hands of a pathological criminal."
Well the reason I asked was that I can't seem to find the lib file on my computer so I thought that it might be the problem. But yes you are right, without the library file the code might not have got compiled and I guess he did mention that his code compiled...
I didn't know that his executable is not working -- if that is the case then it surely is something related to the DLL's since the executable seems to be working in my case and I have neither the header not the library file.
Kharri, the only problem I can think of, as Joey has already mentioned is that of the missing DLL. Check your Windows folder to see if the file msvfw32.dll is present or not, since its present in my case....
I didn't know that his executable is not working -- if that is the case then it surely is something related to the DLL's since the executable seems to be working in my case and I have neither the header not the library file.
Kharri, the only problem I can think of, as Joey has already mentioned is that of the missing DLL. Check your Windows folder to see if the file msvfw32.dll is present or not, since its present in my case....
I don't accept change; I don't deserve to live.
Well as I did say before I do have the msvfw32.dll in my Windows/system32 folder. I havea geforce ti4200....I'm wondering if my antiquated vid card could be a reason for it. I am updating the drivers to see if that fixes the trouble. I tested his exe on a computer at school today. It worked....sigh. It's definitely mine. The thing is. I have vfw.lib, I have msvfw32.dll....I must be missing something yet.
![]() |
Other Threads in the Game Development Forum
- Previous Thread: Snake in C
- Next Thread: Capturing CD audio
| Thread Tools | Search this Thread |
3d advertising ai algorithm ban c++ cambridge camera censorship china competition console development engine fov fpx game gamer games gaming gauntanamo government idaho in-gameadvertisement intellectualproperty laracroft live manhunt math mathematics matrix mercenaries microsoft mmorpg modded msn naked news nintendo obama palin physics pirate playstation politics projection ps3 rpg search software sony stephenhawking stocks studio technology terrorism tombraider uk videogame web wii world-of-warcraft xbox xbox-live xbox360






