Problem of running mex file that compiled with FFmpeg library
1 view (last 30 days)
Show older comments
Neil Huang
on 6 Mar 2014
Commented: abdeldjalil belkhir
on 1 Jun 2016
I am developing on a 64-bit Windows 7 with Matlab 2012a with compiler of Visual Studio 10+Microsoft SDK 7.1, I am trying to convert the written C++ to mex, where function of the C++ code is using the FFmpeg library to decode a video stream and passing the image frame into Matlab. The mex is successfully compiled, however when run the mex, it gives the following error:
Invalid MEX-file '\FFMPEG\test2.mexw64':The specified procedure could not be found.
Initially, I am thinking it was the problem of the DLL files, but after using the 'dependency walker' to check all the DLL, they seems to be fine and all the search path is included, by now I have no idea of what the problem is, is there anything I have missed out when compiling the C++ file? The following is part of the 'test2' C++ code:
#include "mex.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <math.h>
// OpenCV
#include <opencv2/opencv.hpp>
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv/cxcore.h>
// FFmpeg
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
}
void mexFunction(int nlhs, mxArray *plhs[],int nrhs, const mxArray *prhs[])
{
//IplImage *img;
if (nrhs != 0)
{
mexErrMsgTxt("Do not give input arguments.");
}
if (nlhs != 0)
{
mexErrMsgTxt("Do not give output arguments.");
}
// Register all formats and codecs
av_register_all();
avcodec_register_all();
avformat_network_init();
}
1 Comment
abdeldjalil belkhir
on 1 Jun 2016
hy i mak programme to detecte text on video ,i want your code if possible to compile it withe ffmpeg plz
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!