Search the web
Sign In
New User? Sign Up
OpenCV · Open Source Computer Vision Library Comm
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
cvCreateVideoWriter problem - Windows Vista   Message List  
Reply | Forward Message #58043 of 68480 |
Re: cvCreateVideoWriter problem - Windows Vista

Hi Tayrone

You can download the missing header files from de opencv source code
repository. It is in the path otherlibs/_graphics/include/ffmpeg
(this folder is missing in the current opencv 1.1 distribution).

You can access the source code from http in:

http://opencvlibrary.cvs.sourceforge.net/viewvc/opencvlibrary/opencv/o
therlibs/_graphics/include/ffmpeg/

With this code, the library will compile without problems with the
libraries that come in the distribution of opencv.

I wanted to use the last version of ffmpeg (20/10/2008). I had
problems to do this, but I solved them. I followed this steps:
- I downloaded the source code from the site of ffmpeg
http://ffmpeg.mplayerhq.hu/ using a SVN client.
- I compiled it with mingw and msys following the steps in the
documentation of that site.
- I added the NEW libraries libavcodec.a, libavdevice.a,
libavformat.a, libavutil.a, libgcc.a, libmingwex.a, libwsock32.a
under the path otherlibs\ffopencv (because I didn't want to delete
the old libraries in the path otherlibs\_graphics\lib).
- I added this code in ffmpeg because de img_convert function header
was missing:
extern "C" {
int img_convert(AVPicture *dst, int dst_pix_fmt,
const AVPicture *src, int src_pix_fmt,
int src_width, int src_height);
}
- The directory structure in the new files is different.
So I put the directories libavformat, libavcodec, and the others in a
ffmpeg directory under the path "otherlibs/_graphics/include/ffmpeg"
and added the path ..\_graphics\include\FFMPEG to the additional
include directories.
In this way, I changed
#include <ffmpeg/avformat.h>
#include <ffmpeg/avcodec.h>
To
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
- Also, I had some link errors, so I had to include this in
ffopencv.cpp:
extern "C" {
int strcasecmp(const char *a,const char *b) {
return _strcmpi(a,b);
}
- To solve the other link errors, I compiled the library to the
static version of the CRT (multithreaded runtime library, /MT), and
removed the libraries in the option "Ignore Specific Libraries".
- To make the library I used VC2008.

In the previous post, I forgot to include this line in the list of
lines that must be added to ffopencv.h:

CVAPI(CvCapture*) cvCreateFileCapture_FFMPEG( const char* filename );

The complete list of function headers is this:
CVAPI(CvCapture*) cvCreateFileCapture_FFMPEG( const char* filename );
CVAPI(void) cvReleaseCapture_FFMPEG(CvCapture** capture);
CVAPI(CvVideoWriter*) cvCreateVideoWriter_FFMPEG( const char *
filename, int fourcc,double fps, CvSize frameSize, int is_color );
CVAPI(int) cvWriteFrame_FFMPEG( CvVideoWriter * writer, const
IplImage * image );
CVAPI(void) cvReleaseVideoWriter_FFMPEG( CvVideoWriter ** writer );

I hope this can help you.

Dario

--- In OpenCV@yahoogroups.com, "tayronects" <tayronects@...> wrote:
>
> Hi Dario,
> Thanks for your help.
>
> I´ve tried to follow your steps, but I am getting a lot of errors
while
> trying to compile the ffmpeg library.
>
> I am using the ffmpeg-0.4.9-pre1 version. There is no
> <ffmpeg/avformat.h> neither - <ffmpeg/avcodec.h> there as defined
on
> cvcap_ffmpeg.cpp file (I am on VC2005).
>
> Could you confirm what is the ffmpeg library you are using?
>
> regards,
> Tayrone
>





Sat Nov 1, 2008 8:19 pm

jdarioromero
Offline Offline
Send Email Send Email

Forward
Message #58043 of 68480 |
Expand Messages Author Sort by Date

Hello There, 1) I am trying to capture a video and save it, but the result is always a invalid video. Please take a look as the sample code below: void...
tayronects
Offline Send Email
Oct 28, 2008
7:39 pm

Hi The problem is that the function void cvReleaseVideoWriter_FFMPEG(CvVideoWriter** writer) is not defined in ffopencv110.dll. (I didn't find it) Because this...
jdarioromero
Offline Send Email
Oct 29, 2008
7:19 am

Hello Dario, Thank you so much for your help. I tried to follow your steps, but when I compile the cvcap_ffmpeg.cpp file, the references to <ffmpeg/avformat.h>...
tayronects
Offline Send Email
Oct 30, 2008
12:25 am

Hi Dario, Thanks for your help. I´ve tried to follow your steps, but I am getting a lot of errors while trying to compile the ffmpeg library. I am using the...
tayronects
Offline Send Email
Oct 30, 2008
12:25 am

Hi Tayrone You can download the missing header files from de opencv source code repository. It is in the path otherlibs/_graphics/include/ffmpeg (this folder...
jdarioromero
Offline Send Email
Nov 1, 2008
8:40 pm

Hello Dario, I was travelling and arrived only this week. Many Thanks for your answer! I will try to follow your instructions, Tayrone ... code ... ...
tayronects
Offline Send Email
Jan 26, 2009
12:32 pm

Hi, there is a bug: http://sourceforge.net/tracker/index.php?func=detail&aid=2217700&group_id=22870&atid=376677 I've the same problem, think it is due to the...
nero.alessandro
Offline Send Email
Jan 29, 2009
11:35 pm

Hi Dario, just a simple question: ...if you have already recompiled the library, why don't you give us the library recompiled? Hope I didn't annoying, sorry...
nero.alessandro
Offline Send Email
Feb 2, 2009
7:32 am

Hi I posted the library ffopencv110.dll recompiled. It is in the file ffopencv110.rar (yahoo group files). The library is recompiled with network support (for...
jdarioromero
Offline Send Email
Feb 3, 2009
7:08 am

So I just need to substitute the file to the existing one installed by OpenCV_1.1pre1a.exe? Regards...
nero.alessandro
Offline Send Email
Feb 13, 2009
9:49 am

Hi Yes, you have to substitute the file(you can check the function exports to see which ones are in the original and in the new version with the dependency...
jdarioromero
Offline Send Email
Feb 15, 2009
6:49 am

Hi Dario, is your ffopencv110.dll also the solution for the "Compiler did not align stack variables. Libavcodec has been miscompiled and may be very slow or...
felixlange@...
felixlange...
Offline Send Email
Feb 25, 2009
8:46 pm

Hi Yes it is. First, I used the ffmpeg static libraries in opencv, and I had to use the macros ALIGNSTACK and UNALIGNSTACK for rebuilding the ffopencv110.dll...
jdarioromero
Offline Send Email
Feb 26, 2009
12:43 pm

Hi Dario ! The 1st is Big Thanks that you put your compiled ffopencv110.dll into "Files" for public use ! I tried it in XP, the message is removed but avi...
vladimir12345
Offline Send Email
Mar 19, 2009
11:32 pm

In my project i'm converting source image to a binarised image(stored as IplImage) and now i want to obtain a particular portion out of the image....say...
conglong86_2006 congl...
conglong86_2006
Offline Send Email
Feb 26, 2009
12:43 pm

Hi You can do that with this: Setting the Region of Interest (ROI) cvSetImageROI( IplImage* image, CvRect rect ); cvResetImageROI( IplImage* image ); ...
Entrada
davidmarcelo...
Offline Send Email
Feb 26, 2009
1:00 pm

It Works! Thanks!!! Just substitute the ffopencv110.dll in <OpenCV>/bin. Nice job. Just copy...
felixlange@...
felixlange...
Offline Send Email
Feb 26, 2009
12:43 pm

I tried the ffopencv.dll in my visual studio but was not working. I was trying to get network IP camera input for openCV. can you kindly tell me how should I...
Edmund
liu_xe
Offline Send Email
Mar 13, 2009
6:57 pm

Is this problem fixed in the actual svn-version of OpenCV?...
hyblade
Offline Send Email
Jul 29, 2009
6:39 am

Hi, Thanks for your patch and suggestions. I made the changes below to the file, cvcap_ffmpeg, you mentioned. I also added the complete list of declarations to...
V. Srikrishnan
skrishnan_v
Offline Send Email
Feb 21, 2009
11:45 am

Hi The difference is that in the windows version there is the file cvcap_w32.cpp that loads the ffopencv110.dll library (it isn't in the linux version). There...
jdarioromero
Offline Send Email
Feb 24, 2009
1:17 pm

hello there im still having problems when i try t write a video if i use a image that comes from a capture (ie IplImage=cvQueryFrame(Capture)) it works fine,...
nessebarr
Offline Send Email
Jun 13, 2009
1:54 am

you should use cvCopy() on the image you get from cvQueryFrame as that image is not guaranteed to hang around. That said, I had some issues when using...
Chris Colbert
sccolbert
Offline Send Email
Jun 15, 2009
1:15 pm

hello there im still having problems when i try t write a video if i use a image that comes from a capture (ie IplImage=cvQueryFrame(Capture)) it works fine,...
nessebarr
Offline Send Email
Jun 13, 2009
1:55 am

hello there im still having problem when i try to write a video. ive tried everything on this thead and it worked, but jus a part ive tried so many other...
nessebarr
Offline Send Email
Jun 13, 2009
1:55 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help