building with unicap option

I wonder if anybody can help, I’m trying to compile openframeworks library with the unicap option to use a firewire capture interface (imagingsource dfg/1394-1)

I’m using of_preRelease_v0061_linux_FAT as this is the last one with the unicap options. I have ubuntu 11.04 (Is this combination even possible? I suspect unicap was removed for a reason!?)

I have uncommented #define OF_SWITCH_TO_UNICAP_FOR_LINUX_VIDCAP in ofConstants.h and commented out the 2 spare includes of avformat.h and swscale.h in ofUCUtils.h, openframeworks compiles successfully.

However when I try to build movieGrabberExample, I get the following linker error:

ofUCUtils.cpp 297 undefined reference to 'avpicture_alloc(AVPicture*, int, int, int)'  

avpicture_alloc(AVPicture *picture, int pix_fmt, int width, int height) is defined in avcodec.h. I’ve tried linking libavcodec and the other ffmpeg libraries to moviePlayerExample and also to openframeworks.a with no joy. Has anyone had any success building the unicap version of linux openframeworks?


unicap was removed cause it’s license is GPL, which makes any program that uses it also GPL. It also had some problems with some v4l2 cameras that work without problem with gstreamer. To use firewire cameras the best is to use ofxVideoGrabber:—libdc1394-grabber-with-plugin-sdks/2487/0 or ofxLibdc:

Thanks, its good to know why unicap was removed.

I have had a quick look at ofxVideoGrabber and ofxLibdc - I believe ofxLibdc is just for greyscale firewire cameras- and ofxVideoGrabber doesn’t seem to follow the normal structure of an addon? In any case- I believe the capture board I am trying to use is only supported by unicap on linux (its not working for me on windows 7 either).

I think I will try to persevere with unicap using v007 - itr may be easier to resolve the compilation issues with the makefile version.

yes, now that we have swappable video apis it should be easy to create an ofxUCVideoGrabber, it needs to inherit from ofBaseVideoGrabber and then you can pass it to a normal videograbber so internally it uses unicap instead of gstreamer

Well, I made ofxUCVideoGrabber but I couldn’t get it to work with the interface- don’t know if it’s the a faulty interface, unicap not working with ubuntu or my coding :wink: I bought a USB2 easycap interface though on ebay for €5 and it works great! Latency not bad at all. I’d recommend this for anyone wanting to capture analogue video in linux. I think you need kernel 2.6.35 or higher.