0

This question is related to a previous question I asked here.

I read on the Willow Garage website dedicated to OpenCV that we do not have to take care of ffmpeg while installing OpenCV since version 1.2.x. Here it is.

However, some questions asked here on Stackoverflow suggest the contrary.

So, what should I do ? Do I have to recompile OpenCV and do some special operation related to ffmpeg to get it to, finally, open avi file on my Linux system ?

Community
  • 1
  • 1
CTZStef
  • 1,675
  • 2
  • 18
  • 47
  • 32 bits Linux Ubuntu 11.04, I work with Qt Creator, OpenCV 2.4. – CTZStef Jun 27 '12 at 19:37
  • Did you compile OpenCV with option `WITH_QT=ON`? – ArtemStorozhuk Jun 27 '12 at 19:48
  • I'm not sure, but how is this related to OpenCV and the it opens avi files ? Except for this avi thing, my OpenCV+Qt application work just fine. – CTZStef Jun 27 '12 at 19:51
  • [You can use Qt as HighGUI backend on any platforms (Windows, Linux, Mac) by passing WITH_QT=ON to CMake when configuring OpenCV.](http://opencv.willowgarage.com/wiki/InstallGuide) – ArtemStorozhuk Jun 27 '12 at 19:55
  • OK this is very interesting, really, however my problem is about codec, ffmpeg, and the way it should be handled to read avi files with OpenCV... that's all. I don't see how my problem is related to Qt. I only use Qt to design my GUIs. I want only one thing actually, figuring out how to open avi files with my OpenCV application, and I thought ffmpeg was part of the problem. – CTZStef Jun 27 '12 at 20:03
  • OpenCV HighGUI respones for UI, simple video input/output. If you want to use QT as HighGUI than you obviously have to build OpenCV with QT HighGUI support. That's it. – ArtemStorozhuk Jun 27 '12 at 20:40
  • 1
    OK, but like I said my application is working just fine, I can display web cam, point grey camera and even kinect with it. avi files are the only thing that give me trouble. btw, I catch my frames using OpenCV, and then translate cv::Mat to QImage to display them in the GUI. So Qt is used at the very end. So you see, I don't really use Qt as HighGUI to open avi... I'm so upset with this. – CTZStef Jun 27 '12 at 20:45
  • BTW, I just read CMakeLists.txt, Qt is OFF and FFMPEG is ON by default. – CTZStef Jun 27 '12 at 23:17

1 Answers1

1

Problem solved. FFMPEG is indeed ON by default, since OpenCV 1.2.x according to Willow Garage. Which means that you do not have to take care of it. Then, what I tried to explain to Astor, and then confirmed without a doubt by recompiling OpenCV with WITH_QT=ON, is that Qt had nothing to do with this issue. The video "just" had to be encoded in a particular format, which is MPEG-4 XVID. I used mencoder to convert my file.

CTZStef
  • 1,675
  • 2
  • 18
  • 47