Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video missing in release build from visual studio 2015 #5648

Open
david-sullivan opened this issue Jun 2, 2017 · 12 comments
Open

Video missing in release build from visual studio 2015 #5648

david-sullivan opened this issue Jun 2, 2017 · 12 comments

Comments

@david-sullivan
Copy link

i have been having problems with video in the release builds of visual studio 2015 projects and of0.9.8. running windows 10 on intel i7 with geforce gtx 970

the videos run fine in the debug builds, but are completely missing in the release build.
however, videos play in both debug and release builds of the OF example files i've tested.

for instance, the videoPLayerExample does what it should in debug and release.
if i create a new project using the project generator and then copy and paste the code from the videoPlayerExample (and the bin/data directory), the video plays in debug build, but is once again missing in the release build.

@bakercp
Copy link
Member

bakercp commented Jun 2, 2017

Do you get any console messages or errors?

@david-sullivan
Copy link
Author

of course that would be important. Thanks for reminding me. here is the messages from the console on the release build:

[ error ] ofDirectShowPlayer: Cannot load video of this file type. Make sure you have codecs installed on your system. OF recommends the free K-Lite codec pack.
[error] ofPixels: format doesn't support channels (repeated endlessly)

I have the older K-Lite pack (referenced on the OF for VS setup page) installed. As mentioned above, the original videoPlayerExample runs fine in debug and release builds. the project with the errors in release build is a fresh project created by the Project Generator with the untouched code from videoPLayerExample copied over. It runs the video just fine in debug with no errors. this only occurs with the release build of projects created by me. All of the projects that come with OF run fine as far as i have tested them.

@david-sullivan
Copy link
Author

also, if i copy the videoPlayerExample and rename the visual studio project, it runs fine in debug and gives me the same problem and error messages in release.
if i copy the example and don't rename it, everything runs fine, as you might expect (since the original does).

@bakercp
Copy link
Member

bakercp commented Jun 2, 2017

This sounds a lot like a visual studio 2015 project file configuration issue ... but my experience with VS is quite limited. @tgfrerer @openframeworks/windows team do you have any tips?

@tgfrerer
Copy link
Member

tgfrerer commented Jun 2, 2017

@david-sullivan hmmm, difficult to say, but i'd agree with @bakercp that it might be a project file config issue. I've tried to reproduce with current openframeworks/master on windows 10 and it worked fine, in 32 and 64bit release.

Perhaps try rebuilding your project file if you can, using the project generator. Save your old project file (or commit your latest changes) to be safe before, then issue, from a console inside the directory of your app:

../../../apps/projectGenerator/commandLine/bin/commandLine.exe -o"../../.." .

This should re-create the project files for your app using the command line project generator.

@david-sullivan
Copy link
Author

it took me a loooong time to be able to test this out (I couldn't even compile PG until i finally updated VS2015). unfortunately there was no change on my end. any other ideas?
i tried to setup qt creator but could never get it to compile any project.

@danzeeeman
Copy link
Member

danzeeeman commented Jul 13, 2017 via email

@david-sullivan
Copy link
Author

yes. i'm not sure i could tell if they are release dlls, but i deleted everything in /bin, and then rebuilt, and there are 9 dlls now.

@david-sullivan
Copy link
Author

if this is a vs project file config problem, how might one go about fixing it? is this something i can dig around in vs for?

@david-sullivan
Copy link
Author

i just reinstalled vs and of with no change. i guess my windows install is just cursed. .....back to the reliability of xcode....

@david-sullivan
Copy link
Author

i was trying this again on a new windows computer, with a new install of everything (of, vs2015, klite codecs). apparently this problem occurs only if my target name is "main". if i set the target name to "main2", the video plays just fine in release.
this is happening with the videoPlayer example and OF0.9.8

@vooku
Copy link

vooku commented May 29, 2018

Apparently switching the pixel mode to BGRA helps, see the forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants