User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Game Development section within the Software Development category of DaniWeb, a massive community of 391,661 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,820 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Game Development advertiser:
Views: 5877 | Replies: 14
Reply
Join Date: Jan 2005
Posts: 55
Reputation: kharri5 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
kharri5's Avatar
kharri5 kharri5 is offline Offline
Junior Poster in Training

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

  #1  
Jan 21st, 2007
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,774
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 330
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

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

  #2  
Jan 22nd, 2007
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...
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Jan 2005
Posts: 55
Reputation: kharri5 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
kharri5's Avatar
kharri5 kharri5 is offline Offline
Junior Poster in Training

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

  #3  
Jan 22nd, 2007
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
Reply With Quote  
Join Date: Apr 2006
Location: Canada
Posts: 4,445
Reputation: John A is a glorious beacon of light John A is a glorious beacon of light John A is a glorious beacon of light John A is a glorious beacon of light John A is a glorious beacon of light 
Rep Power: 15
Solved Threads: 265
Moderator
Staff Writer
Featured Blogger
John A's Avatar
John A John A is offline Offline
Vampirical Moderator

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

  #4  
Jan 22nd, 2007
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 9:42 pm.
tuxation.com - Linux articles, tutorials, and discussions
Reply With Quote  
Join Date: Jan 2005
Posts: 55
Reputation: kharri5 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
kharri5's Avatar
kharri5 kharri5 is offline Offline
Junior Poster in Training

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

  #5  
Jan 23rd, 2007
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?
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,774
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 330
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

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

  #6  
Jan 23rd, 2007
Does the executable run well on your computer.. ?
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,774
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 330
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

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

  #7  
Jan 23rd, 2007
From an extract on NeHe's site:
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... ?
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Apr 2006
Location: Canada
Posts: 4,445
Reputation: John A is a glorious beacon of light John A is a glorious beacon of light John A is a glorious beacon of light John A is a glorious beacon of light John A is a glorious beacon of light 
Rep Power: 15
Solved Threads: 265
Moderator
Staff Writer
Featured Blogger
John A's Avatar
John A John A is offline Offline
Vampirical Moderator

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

  #8  
Jan 23rd, 2007
Originally Posted by ~s.o.s~ View Post
Does the executable run well on your computer.. ?
Yes, I believe he said that the executable downloaded from NeHe's site failed also:
Originally Posted by kharri5 View Post
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?

Originally Posted by ~s.o.s~ View Post
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.
tuxation.com - Linux articles, tutorials, and discussions
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,774
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 330
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

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

  #9  
Jan 23rd, 2007
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 don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Jan 2005
Posts: 55
Reputation: kharri5 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
kharri5's Avatar
kharri5 kharri5 is offline Offline
Junior Poster in Training

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

  #10  
Jan 23rd, 2007
Originally Posted by ~s.o.s~ View Post
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Game Development Marketplace
Thread Tools Display Modes

Other Threads in the Game Development Forum

All times are GMT -4. The time now is 1:40 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC