Windows OpenCV VideoCapture Will Not Open Video File - file

My team and I are working on a project with OpenCV (v. 2.4.2) and QT(v. 4.8.4). We are developing in QtCreator. It is a cross-platform project that will be primarily looking for movement in video files.
On the Mac OSX, the video file will open properly using the normal cv::VideoCapture object and interface and we can run our program successfully. However, on Windows, the file would not open, just throwing this error on the QtCreator terminal when the program exits:
warning: Error opening file (../../modules/highgui/src/cap_ffmpeg_impl.hpp:361)
However, when we set QtCreator to 'Release' build mode instead of 'Debug', the program opens the file as it should.
My teammate and I have done extensive research on this error and found no real solutions.
We have tried installing codecs, moving the opencv_ffmpeg.dll file to the working directory of the .exe, and modifying the path with the location of the opencv_ffmpeg.dll (as well as the location of the ffmpeg library.) We have also made sure that our video is valid, as well as the file path (the same video works on a MacOS, and the video file will actually play in Windows through Qt's Phonon module).
Similar questions:
VideoCapture OpenCV 2.4.2 error in windows
Problem with VideoCapture in OpenCV 2.3
Any ideas about what could be causing this issue?

Unfortunately, I can't give the reason but we also often get these problems if we use precompiled OpenCV dll's. The error is caused anywhere by connecting ffmpeg to the videocapture. In our case rebuilding OpenCV on the concerned computer fixed the error.

Related

SDL 'no available video device' error and not detecting x11

I'm having a similar problem to that listed here - SDL2 is not seeing X11/Video Device correctly
I'm trying to follow the Lazy Foo tutorial for SDL and I keep getting the 'no available video device' error. If I update SDL_VIDEODRIVER to x11 I get that x11 is not available. I'm linking against it but it doesn't seem to help.
I'm calling SDL_GetVideoDriver at the beginning of my program and all it's seeing is dummy.
System is Ubuntu 20.04.
If anyone has any tips on how to try and debug this that would be greatly appreciated.
So the problem turned out to be that I had compiled SDL2 myself instead of using a package manager, but I had also then installed it with a package manager. It was using the version from my compilation which didn't include the drivers correctly.
The easiest solution was just to remove the compiled installation and go with the package manager.

I am getting error while opening KDevelop

Recently I have installed KDevelop on my Windows7 32bit OS, and after installing when I try to open it I am getting an error. Actually, when I try to open KDevelop it says that **api-ms-win-crt-runtime-l1-1-0-dll** is missing, after getting that error I have downloaded that (api-ms-win-crt-runtime-l1-1-0-dll) file from www.dll-files.com, then after, I pasted it in D:/Programs Files/KDevelop/bin/ and now after doing that all again I am getting a new error that api-ms-win-crt-runtime-l1-1-0-dll is either not designed to run on Windows or contains an error. Try installing the program again using the original installation media or contact your system administration or the software vendor for support. any suggestion that get me out from this hell ?
It seems that you don't have the appropriate Visual C++ Redistributable.
Also I would strongly advise against downloading DLL files even from seemingly legit web sites. Missing libraries are a symptom of something larger missing or corrupted.

Open an OpenCv Project in XCode - Run destination My Mac 64-bit is not valid

I downloaded openCV and extracted the project. I navigated into the Samples/FaceTracker folder. Double clicked on the project (FaceTracker.xcodeproj), and clicked on the run button when the project was loaded in XCOde. I get the following error, which doesn't allow me to run the application;
The run destination My Mac 64-bit is not valid for Running the scheme
'FaceTracker'.
The scheme 'FaceTracker' contains no buildables that can be built for
the SDKs supported by > the run destination My Mac 64-bit. Make sure
your targets all specify SDKs that are supported by this version of
Xcode.
The file OpenCv.framework is missing, but i looked for it and i am unable to find a file with that name. How can i resolve this issue ?
1- Your XCode project is not able to find the required library, or it finds one but its not compatible with your current operating system/processor/build settings. The missing framework and the error message suggests this.
2- May be you need to build OpenCV SDK to make sure that it's compatible with your machine, instead of trying to build the example first.
3- Instead of downloading and building openCV, I suggest you use a package management for OS X, like MacPorts. If you do not need cutting edge trunk version, this is a better option, which takes care of all the initial framework setup for you.

Running C program with opemcv in cygwin environment

I am newbie in cygwin. However, I have used mingw so far, but it is not supporting fork(), so I need to switch to cygwin.
Does cygwin support opencv and how (reference)?
I'm the maintainer of http://hvrl.ics.keio.ac.jp/kimura/opencv/. I fixed the bug in loading jpeg files. Please check my new patch.
I just installed opencv with cygwin, all recent distributions. I found ** THIS LINK ** very helpful. You're suppose to install first ffmpeg, then to patch opencv 2.4.2 distribution (!!) and, eventually, to install opencv.
To make it work with pkg-config I had to modify ${OPENCV_ROOTDIR}\lib\pkgconfig and to filter windows path syntax to unix path syntax. pkg-config is not mandatory but it simplifies application development (when correctly installed).
After some effort all this works; but if I can open pgn image files I can't open jpeg image files... Still investigating...
Claude

Can not use gtk3 FileChooser on Mac OSX?

I migrated my program built with gtk+3.0 from linux to Mac OS X(10.6.8).
And I compiled the program without errors.
However, after I started the program and I chose to open a file, the terminal shows following message.
GLib-GIO-CRITICAL **: Settings schema 'org.gtk.Settings.FileChooser' is not installed
Then, the program ends with Segmentation fault.
How to solve it?
Thanks for any helps.
Seems you're not the one having this problem, and it also happens on Windows on MinGW. Luckily, that person gave a solution:
The thing, as it seems as I was running the test-widget example (that I
built with gtksourceview-3.0.0 using MSVC), was that I need to compile the
org.gtk.Settings.FileChooser.gschema.xml file (from GTK+-3.x, under
$(srcroot)/gtk) with the glib-compile-schemas utility that is from GLib,
which will generate gschemas.compiled in the same folder.
After that, place that gschemas.compiled file in the this folder:
$(parent_folder_of_the_gtk3_dll)\share\glib-2.0\schemas
and one will be set to use the gtkfilechooser without the puzzling
[GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser'
is not installed] error.
I will add to my GLib project files to compile the glib-compile-schemas
utility and add to my GTK+-3.x project files to compile the
the org.gtk.Settings.FileChooser.gschema.xml shortly.
I ran in to this problem with a program that I crosscompiled with mingw for windows, the solutions is to run glib-compile-schemas [path to org.gtk.Settings.FileChooser.gschema] in my case was that file in ./share/glib-2.0/schemas.It will generate gschemas.compiled, that is the file FileChooser is looking for.

Resources