I am currently developing a program using the Windows SDK.
I'm trying to feed a ".webm" file into the SDK, but I'm getting the following error:
Encountered an AffdexException Error opening video file: C:\1.webm
Source: __thiscall FileVideoCapture::FileVideoCapture(const class boost::filesystem::path &,const float)(C:\Jenkins\workspace\affdexface-win32\src\modules\utils\FileVideoCapture.cpp LINE 12)
This occurs when I use the .process(path_to_file) method of the VideoDetector class.
I'm guessing it has something to do with OpenCV because the VideoCapture class is apart of OpenCV.
Any help would be greatly appreciated!
Another possibility is that your video use a good container but not a good codec. You can check the list of supported formats.
In my case I use a .avi with FMP4 codec. It should be supported but I got the same error as you. I reencoded the video with another codec and now it works.
The VideoDetector class uses FFmpeg in order to access video codecs.
Please make sure that the opencv_ffmpeg.dll is loadable by your application either by copying it to your application binary folder or by adding it’s location to your PATH environment variable.
The dll is included in the sdk archive under the bin directory.
Related
I'm using ffmpeg lib.
I try #include "libavutil/internal.h" but received error 'libavutil/internal.h' file not found.
What should I have to do?
FFmpeg is a C application (mainly). But still support some object orientation features like information hiding (Encapsulation).
You should stick with the exposed interface (API - libav). There is a good reason for this. The header and its functions as the name suggest is "internal". Not safe to use (may change, etc..).
Have you installed ffmpeg?
First, ffmpeg is a software, not a library. It contains several libraries such as libavutil.
Then, once ffmpeg is installed, look if it's in your library path.
I suppose you're trying to compile with gcc/g++, so, you can also try to add -I[dir_where_libavutil_is]
Of course, you need libavutil-dev installed in your system.
We have a C++-based application that runs on Windows, Mac, and Linux. I now need to add h.264 and h.265 decoding within this application. It seems ffmpeg will do the trick.
As ours is a commercial application, we cannot disclose the source code to public. However, as I understand, FFMpeg is based on LGPL licensing requirements. Going through various articles on LGPL requirements, it seems I can use ffmpeg without disclosing our source code as long as:
I build ffmpeg as a shared libraries and make sure that I don't use "--enable-gpl" flag during configuration.
I acknowledge in our About dialog box that we are using ffmpeg shared libraries.
Can someone please verify if this more or less meets the requirements? Regards.
Note that I need ffmpeg only to decode and not to encode. Therefore, I don't have to use "--enable-libx264" and "--enable-libx265" flags.
As a FFmpeg developer, I would expect you to follow the considerations mentioned on our website:
Compile FFmpeg without "--enable-gpl" and without
"--enable-nonfree".
Use dynamic linking (on windows, this means
linking to dlls) for linking with FFmpeg libraries.
Distribute the
source code of FFmpeg, no matter if you modified it or not.
Make
sure the source code corresponds exactly to the library binaries you
are distributing.
Run the command "git diff > changes.diff" in the
root directory of the FFmpeg source code to create a file with only
the changes.
Explain how you compiled FFmpeg, for example the
configure line, in a text file added to the root directory of the
source code.
Use tarball or a zip file for distributing the source
code.
Host the FFmpeg source code on the same webserver as the
binary you are distributing.
Add "This software uses code of FFmpeg licensed under the LGPLv2.1 and its source can be downloaded here [where here is a link to the source code]" to every page in your website
where there is a download link to your application.
Mention "This
software uses libraries from the FFmpeg project under the LGPLv2.1"
in your program "about box".
Mention in your EULA that your program
uses FFmpeg under the LGPLv2.1.
If your EULA claims ownership over
the code, you have to explicitly mention that you do not own FFmpeg,
and where the relevant owners can be found.
Remove any prohibition
of reverse engineering from your EULA.
Apply the same changes to all
translations of your EULA.
Do not misspell FFmpeg (two capitals F
and lowercase "mpeg").
Do not rename FFmpeg dlls to some obfuscated
name, but adding a suffix or prefix is fine (renaming "avcodec.dll"
to "MyProgDec.dll" is not fine, but to "avcodec-MyProg.dll" is).
Go
through all the items again for any LGPL external library you
compiled into FFmpeg (for example LAME).
Make sure your program is
not using any GPL libraries (notably libx264).
From what you've said so far, I think you're doing only point 1-2, 9-11, 15-18. You need to make the source code (of FFmpeg) including modifications (3-5, 7-8) available along with your application, mention build instructions (6), remove ownership claims on FFmpeg, remove reverse engineering prohibitions (if any), and check your EULA (12-14).
Yes, with lgpl you can use it as a dll/shared lib and you won't need to make your source code available.
But you should be aware that it's not the licensing of the code is the issue for commercial use, but the patents around h.264/h.265 and you need license for that. AFAIK, even if you simply want to decode you'll still need to have license.
MPEGLA is the licensing body for h264 codec patent pool.
I've created Qt project using Visual studio 2012 32 bit and Qt5 SDK with the help of Visual studio Qt addon. I'm using Windows 7 ultimate OS.
I have created QApplication GUI Project which basically uses the following libraries:
qtmain.lib
Qt5Core.lib
Qt5Gui.lib
Qt5Network.lib
Ws2_32.lib
Winhttp.lib
Winmm.lib
Qt5Widgets.lib
Qt5PlatformSupport.lib
imm32.lib
And I have succeed in building the application binary without any errors.
I’m trying to run this application on test machine windows 7 desktop having following dlls copied there:
icudt51.dll
icuin51.dll
icuuc51.dll
libEGL.dll
libGLESv2.dll
Qt5Core.dll
Qt5Network.dll
Qt5GUI.dll
Qt5Widgets.dll
qwindows.dll [copied from msvc2012\plugins\platform folder ]
I’m getting the error:
Failed to load platform plugin “windows”. Available Platform are : while trying to run the application.
What would i have missed? How to make it run on windows platform? Please Help me to troubleshoot this.
I've followed the links posted about this problem previously. but none of them are solved my problem. What configuration I am missing?
The platform plugin dlls would need to be put into the platforms subfolder and then it will work.
Yet another solution: Early in your main function or whatever, call QCoreApplication::addLibraryPath(). A simple example:
std::ifstream configurationStream("whateverNameYouWant.conf");
std::stringstream configurationText;
configurationText << configurationStream.rdbuf();
auto ct = configurationText.str();
if (!ct.empty())
QCoreApplication::addLibraryPath(QString::fromStdString(ct));
Here I load the path from a .conf file of my own invention, so that the path won't be hardcoded into my program. Since I invented this file, I control its format; in this case it contains nothing but the path. The actual path I'm using is C:/qt5/qtbase/plugins; that directory contains platforms/qwindows.dll and other such files. One may adjust the paths for one's own case according to where one's Qt files are installed.
I guess it is also supposed to be possible to use a standard qt.conf file, using a format specified by Qt, to automatically load some special paths (including this plugins path) without having to add special code to your own program for the purpose: http://doc.qt.io/qt-5/qt-conf.html ...But I haven't ever managed to get that to work, for whatever reason. Maybe I'm making some simple mistake, I dunno.
An other solution is to add arguments to the QApplication object (or to the starting application).
For instance, you want to load qwindow.dll from C:\test\platforms.dll, you can instanciate QApplication object with the following code :
int ac = 4;
static char * av[] = {"myappli.exe","C:\\\\path\\to\\myappli.exe","-platformpluginpath","C:\\\\test"};
m_qApp = new QApplication(ac, av);
Be careful, the QTCore dll can't be into the directory C:\test (loading dll conflict)
If you specify a working directory different than the one where your executable is located, no matter the plugins are there, it will fail.
So, in that case, copy your file with a post build event.
And in:
Configuration properties->Debugging->Command
specify the full path of the executable.
This was tested on VStudio 2008.
So I'm running software I downloaded for analyzing the position of fluorescent proteins in microscopy images. The software is called plusTipTracker, and it runs off MATLAB.
So the first function (detecting 'spots' in the images) works fine, but the second function ("track spots") fails. In particular, it seems to be an error with a MEX file:
??? Invalid MEX-file
'/Users/ethanbuchman/Documents/MATLAB/plusTipTracker_1pt1pt3_2012-07-07/software/createDistanceMatrix.mexmaci64':
dlopen(/Users/ethanbuchman/Documents/MATLAB/plusTipTracker_1pt1pt3_2012-07-07/software/createDistanceMatrix.mexmaci64,
1): no suitable image found. Did find:
/Users/ethanbuchman/Documents/MATLAB/plusTipTracker_1pt1pt3_2012-07-07/software/createDistanceMatrix.mexmaci64:
unknown required load command 0x80000022.
I can locate this file in the software folder i downloaded. There are actually multiple versions, each with a different extension (eg. .mexa64, .mexmaci, .mexmaci64, etc.). There's also a .dll file. While there are other mex files in the folder, each with multiple extensions, none of the others have an associated dll file. Not sure if that's relevant.
But I have no idea what to do about this.
Im on MacOSX 10.5.8 using Matlab R2010b.
Any insight would be greatly appreciated. Thanks.
From what I'm reading here, it seems like the MEX file was compiled for a different version of Mac OS. Can you recompile the MEX files and DLL on your own system?
Tasked with converting wav to mp3 in my mac program, I've downloaded and compiled the LAME encoder. I was wondering how I then use it in my xcode project? Previous 3rd party libraries have been in the form of a framework, but LAME just produces a dylib.
Thank you.
The use of a dynamic library is similar to a Framework Apple doc on dynamic libraries
The library will need to be in a known place
In the target build options set the header and library search paths. To use the library drag it into Xcode (These set the -I -L and -l options to the compiler)