Jump to content
  • Advertisement
Sign in to follow this  
ShinkaFudan

ffMPEG VS C++ example

This topic is 2387 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The last few days, I've been searching for a simple method to display video files in my program. I am coding an engine of sorts using Visual Studio / C++, utilizing OpenGL through the SFML group of libraries. I am well-versed in OpenGL itself and I understand how to use it in addition to the basic SFML functionality. So now I am looking for a way to display video through these methods and I've looked at Theora, SFML's ogv playback, and then finally ffMPEG. I decided on ffMPEG based on what it is capable of playing and I started looking for all development code and examples I could find, but I'm reaching a problem.

Any example code I find is laid out for building in linux or has make options I don't fully understand. I could probably figure them out, but my engine is being made specifically for visual studio to be used by a small group of people that I don't want to have to learn special build commands and procedures. I was hoping there was a simpler way to implement the ffMPEG functionality to play videos. I found an example.c file online and attempted to use it, but then I get unresolved external symbols even when I know my library includes are correct and I have the proper headers...

I was hoping someone had a working Visual Studio project example for ffMPEG or could quickly create one using the example code they provide. I am currently using Visual Studio 2008 (AKA VC9).

Share this post


Link to post
Share on other sites
Advertisement
Alright, after a few hours of scrounging, I managed to get one of the examples running for Theora. I then altered it to not utilize the GLUT setting it was in, but that brings up a whole new problem. In the GLUT example, there seems to be no problem at all. (GLUT example attached [GLUTExample.zip]) but in my basic OpenGL example any video with sound will fail to replay (OpenGL example attached [Example.zip]). Could someone look over this code and tell me what I'm doing wrong?

Both attached examples should have all of the files within them that are needed so nobody will have to install libraries or include file folders... if anything is missing please tell me.

Share this post


Link to post
Share on other sites
I decided to go through and try to make these two examples as similar as possible, and I found the issue. I had a discrepancy in the Update function, and when I made them equal they both worked. Although I didn't receive any reply to this topic, thank you to anyone who looked into it. (to anyone looking for this solution, take the update() function from the GLUT Example and copy it over to the normal openGL example...)

Share this post


Link to post
Share on other sites

This topic is 2387 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!