944,067 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Jan 21st, 2007
0

Nehe Gamedev.net Tutorial Problem: AVI Video in openGL

Expand Post »
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.
Reputation Points: 13
Solved Threads: 0
Junior Poster in Training
kharri5 is offline Offline
56 posts
since Jan 2005
Jan 22nd, 2007
0

Re: Nehe Gamedev.net Tutorial Problem: AVI Video in openGL

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...
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,873 posts
since Jun 2006
Jan 22nd, 2007
0

Re: Nehe Gamedev.net Tutorial Problem: AVI Video in openGL

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
Reputation Points: 13
Solved Threads: 0
Junior Poster in Training
kharri5 is offline Offline
56 posts
since Jan 2005
Jan 22nd, 2007
0

Re: Nehe Gamedev.net Tutorial Problem: AVI Video in openGL

Quote ...
I began to think no one cared at all about my trouble
Don't think that way; after all, this is DaniWeb!

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.
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Jan 23rd, 2007
0

Re: Nehe Gamedev.net Tutorial Problem: AVI Video in openGL

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?
Reputation Points: 13
Solved Threads: 0
Junior Poster in Training
kharri5 is offline Offline
56 posts
since Jan 2005
Jan 23rd, 2007
0

Re: Nehe Gamedev.net Tutorial Problem: AVI Video in openGL

Does the executable run well on your computer.. ?
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,873 posts
since Jun 2006
Jan 23rd, 2007
0

Re: Nehe Gamedev.net Tutorial Problem: AVI Video in openGL

From an extract on NeHe's site:
Quote ...
All you need to know is that you MUST include the vfw.h header file and you must link to the vfw32.lib library file
Do you have the header as well as the library file on your computer... ?
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,873 posts
since Jun 2006
Jan 23rd, 2007
0

Re: Nehe Gamedev.net Tutorial Problem: AVI Video in openGL

Click to Expand / Collapse  Quote originally posted by ~s.o.s~ ...
Does the executable run well on your computer.. ?
Yes, I believe he said that the executable downloaded from NeHe's site failed also:
Click to Expand / Collapse  Quote originally posted by kharri5 ...
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?
Click to Expand / Collapse  Quote originally posted by ~s.o.s~ ...
From an extract on NeHe's site:

Do you have the header as well as the library file on your computer... ?
Yes, I read that too. However, several things:
  • 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.
I doubt that you would need the old vfw.dll file to run it though, because as far as I know, vfw.lib is still current.
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Jan 23rd, 2007
0

Re: Nehe Gamedev.net Tutorial Problem: AVI Video in openGL

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....
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,873 posts
since Jun 2006
Jan 24th, 2007
0

Re: Nehe Gamedev.net Tutorial Problem: AVI Video in openGL

Click to Expand / Collapse  Quote originally posted by ~s.o.s~ ...
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....
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.
Reputation Points: 13
Solved Threads: 0
Junior Poster in Training
kharri5 is offline Offline
56 posts
since Jan 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Game Development Forum Timeline: Snake in C
Next Thread in Game Development Forum Timeline: Capturing CD audio





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC