Bug 491223 - OpenCV rpm has no video read/write capability
OpenCV rpm has no video read/write capability
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: opencv (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: Rakesh Pandit
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-19 17:53 EDT by Matt Hirsch
Modified: 2009-07-27 10:58 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-27 10:58:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matt Hirsch 2009-03-19 17:53:07 EDT
Description of problem: I would like to use the OpenCV API to read and write video files. The opencv rpm included in fedora is not compiled with any support for video reading and writing.

I have been able to recompile the opencv source rpm with xine support, but this only supports reading videos. There is no support for writing.

OpenCV 1.0 uses an old ffmpeg API img_convert, which prevents it from linking when compiled against newer ffmpeg libraries available from rpmfusion and atrpms.

OpenCV 1.1 pre-release (available from http://sourceforge.net/projects/opencvlibrary) has been modified to work with current ffmpeg libraries. Can you package this version?

Version-Release number of selected component (if applicable):
1.0.0-10.fc10

How reproducible:
Always

Steps to Reproduce:
1. Write a program that calls cvCaptureFromFile
2. Link to libraires in fedora opencv (opencv-devel) rpm
  
Actual results:

cvCaptureFromFile always returns NULL, because no video reading library was linked with opencv.


Expected results:

A pointer to a CvCapture struct should be returned.

Additional info:

blobtrack.cpp is a good example of a program that requires this.
Comment 1 Nicolas Chauvet (kwizart) 2009-04-22 10:04:06 EDT
I have request acl commit for the F-11/devel branch in order to:
-Fix FTBFS for F-11 (#elif without a condition which is a trivial gcc44 restriction)
- Update opencv to 1.1pre1 (formally 1.1.0-0.1.pre1) for F-12

Given that we are on a freeze period, and opencv 1.1.0 is a pre-release, I don't even think of updating it for now. (there is an ABI bump) But opencv 1.1.0 will have gstreamer support, so it will be easier to have read/write support in fedora that way.
Comment 2 Matt Hirsch 2009-04-22 13:19:09 EDT
Ok, I can wait. Thanks for your response.
Comment 3 Nicolas Chauvet (kwizart) 2009-07-16 07:23:17 EDT
This package is built for F-11 from the current src.rpm package in F-12
http://koji.fedoraproject.org/koji/taskinfo?taskID=1478592
It has gstreamer support enabled by default which should be capable to enable read/write capability. 

Please have it tested ,  I will close the bug then.
Comment 4 Matt Hirsch 2009-07-16 11:00:47 EDT
Please pardon my ignorance of the koji system, but where should I get the package that you built for F11? I don't see anywhere to download it at the link you gave.

And nothing shows up here:
http://koji.fedoraproject.org/koji/packageinfo?packageID=2692

I installed the F12 opencv package opencv-1.1.0-0.1.pre1.fc12.1 yesterday  (in F11), but I can't install opencv-1.1.0-0.3.pre1.fc12.x86_64 in F11, I get: 

error: Failed dependencies:
	libc.so.6(GLIBC_2.11)(64bit) is needed by opencv-1.1.0-0.3.pre1.fc12.x86_64
Comment 5 Nicolas Chauvet (kwizart) 2009-07-16 11:07:14 EDT
Sorry, that was the wrong link.
This is a private scratch build, so it will disappear later.
http://koji.fedoraproject.org/koji/taskinfo?taskID=1478592
Comment 6 Matt Hirsch 2009-07-16 11:16:32 EDT
That's the same link you gave me before :)
Comment 7 Nicolas Chauvet (kwizart) 2009-07-16 11:35:01 EDT
Actually, the link was right; but even if the tag say .fc12, it was meant to be built for F-11 (the dist tag was inherited from the .fc12 src.rpm)

For x86_64
http://koji.fedoraproject.org/koji/taskinfo?taskID=1478595
For i586:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1478598
Comment 8 Matt Hirsch 2009-07-16 16:11:08 EDT
Thanks, I got the package, and I just started checking it out.

I was using the blobtrack demo before, and I noticed that the RPM linked above, opencv-1.1.0-0.3.pre1.fc11.x86_64, provides /usr/lib64/libhighgui.so.2, but the sample applications provided in opencv-devel-1.1.0-0.3.pre1.fc11.x86_64 are linked against libhighgui.so.1 (the old 1.0.0 version).

$ pwd
/usr/share/opencv/samples/c
$./blobtrack 
./blobtrack: error while loading shared libraries: libhighgui.so.1: cannot open shared object file: No such file or directory


I'll rebuild them and report results.
Comment 9 Matt Hirsch 2009-07-16 17:46:29 EDT
Video reading works using the gstreamer library. You can close the bug report, but please update opencv-devel samples to use libhighgui.so.2.

Thanks very much!
Comment 10 Matt Hirsch 2009-07-16 17:50:59 EDT
One further note: 

Whenever I link with libcxcore.so.2 from the opencv package you provided the linker looks for libavcodec.so.51. I had to copy this library from a F10 ffmpeg-libs package. In F11 rpmfusion provides ffmpeg-libs-0.5-2.fc11.x86_64, which provides libavcodec.so.52.
Comment 11 Nicolas Chauvet (kwizart) 2009-07-16 18:21:49 EDT
(In reply to comment #10)
> One further note: 
> 
> Whenever I link with libcxcore.so.2 from the opencv package you provided the
> linker looks for libavcodec.so.51. I had to copy this library from a F10
> ffmpeg-libs package. In F11 rpmfusion provides ffmpeg-libs-0.5-2.fc11.x86_64,
> which provides libavcodec.so.52.  
That's because they are "ABI incompatible", a rebuild usually is enought to have a compatible version.

Now I'm really far from providing a package built with ffmpeg's libavcodec. Fedora doesn't redistribute such library nor as plan to.

The opencv-devel doesn't provide any binary either. Only docs, headers and a symlinks, so you probably have built blobtrack yourself.
Comment 12 Nicolas Chauvet (kwizart) 2009-07-21 10:37:30 EDT
Any other comments providing opencv read/write capability ?!
Comment 13 Matt Hirsch 2009-07-21 10:41:48 EDT
You were right, I must have built the examples earlier and they weren't erased when I removed the old opencv package. As far as I'm concerned updating F11 to 1.1 with gstreamer support would be great. It works for me.
Comment 14 Nicolas Chauvet (kwizart) 2009-07-27 10:58:50 EDT
Okay. So I'm closing the bug to rawhide because updating to 1.1 will introduce an ABI bump.
BTW opencv 1.1 is meant to be updated in few days...

Note You need to log in before you can comment on or make changes to this bug.