Kurento / bugtracker

[ARCHIVED] Contents migrated to monorepo: https://github.com/Kurento/kurento
46 stars 10 forks source link

Cannot build opencv module #280

Closed neilyoung closed 6 years ago

neilyoung commented 6 years ago

I'm trying to create my first KMS plugin (at least I'm hoping to do so). Following http://doc-kurento.readthedocs.io/en/stable/user/writing_modules.html#opencv-module IMHO there is a missing step in doc between kurento-module-scaffold.sh <module_name> <output_directory> opencv_filter

and

cd build cmake ..

since the build directory is not existent after scaffolding.

However, I can scaffold and compile, but I can't link. Here is the final linker error, which I can't get over currently:

decades@ubuntu:~/Documents/MyFilter/my-filter/build$ cmake ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Running CMake for project: my-filter
If KurentoHelpers is not found, you need to install 'kms-cmake-utils' from the Kurento repository
-- Found KurentoHelpers: 6.7.1~1.gd04e4ce (found version "6.7.1~1.gd04e4ce")
If CodeGenerator is not found, you need to install 'kms-core' from the Kurento repository
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Found /usr/bin/kurento-module-creator
-- Found /usr/bin/kurento-module-creator
-- Found KurentoModuleCreator: 6.7.1-SNAPSHOT (found version "6.7.1-SNAPSHOT")
-- Resolving KurentoModuleCreator version ^6.7.0 with 6.7.1-SNAPSHOT
-- Found Git: /usr/bin/git (found version "2.7.4")
-- Version info from git: 0.0.1~0.g9cd4271
-- Checking for module 'gstreamer-1.5>=1.5.0'
--   Found gstreamer-1.5, version 1.8.1.1
-- Checking for module 'gstreamer-base-1.5>=1.5.0'
--   Found gstreamer-base-1.5, version 1.8.1.1
-- Checking for module 'gstreamer-video-1.5>=1.5.0'
--   Found gstreamer-video-1.5, version 1.8.1.1
-- Checking for module 'gstreamer-check-1.5>=1.5.0'
--   Found gstreamer-check-1.5, version 1.8.1.1
-- Checking for module 'kmscore'
--   Found kmscore, version 6.7.1
-- Checking for module 'opencv>=2.0.0'
--   Found opencv, version 3.4.1
-- Compiling : my-filter-0.0.1~0.g9cd4271
-- KurentoModuleCreator Already found
-- Including generated cmake myfilterDependencies.cmake
-- KMSCORE Already found
-- Looking for KMSELEMENTS: 6.7.1
-- KMSCORE Already found
-- Looking for KMSELEMENTS: 6.7.1
-- KMSCORE Already found
-- Found KMSELEMENTS: 6.7.1 (found version "6.7.1")
-- Resolving KMSELEMENTS version ^6.0.0 with 6.7.1
-- Looking for KMSFILTERS: 6.7.1
-- KMSCORE Already found
-- KMSELEMENTS Already found
-- Checking for module 'opencv'
--   Found opencv, version 3.4.1
-- Found opencv
-- Looking for KMSFILTERS: 6.7.1
-- KMSCORE Already found
-- KMSELEMENTS Already found
-- opencv Already found
-- Found KMSFILTERS: 6.7.1 (found version "6.7.1")
-- Resolving KMSFILTERS version ^6.0.0 with 6.7.1
-- Generated: kmsmyfilter.pc.in
-- Generated: MyFilterOpenCVImpl.cpp
-- Generated: MyFilterImpl.cpp
-- Generated: MyFilterOpenCVImpl.hpp
-- Generated: MyFilterImpl.hpp
-- Generated: FindKMSMYFILTER.cmake.in
-- Getting config files from /home/decades/Documents/MyFilter/my-filter/src/server/config
-- No config files found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/decades/Documents/MyFilter/my-filter/build
decades@ubuntu:~/Documents/MyFilter/my-filter/build$ make
[  5%] Generating cpp_interface.generated, interface/generated-cpp/MyFilter.cpp, interface/generated-cpp/MyFilter.hpp
Generation success
[ 10%] Generating cpp_interface_internal.generated, interface/generated-cpp/MyFilterInternal.cpp, interface/generated-cpp/MyFilterInternal.hpp
Generation success
Scanning dependencies of target kmsmyfilterinterface
[ 15%] Building CXX object src/server/CMakeFiles/kmsmyfilterinterface.dir/interface/generated-cpp/MyFilterInternal.cpp.o
[ 21%] Building CXX object src/server/CMakeFiles/kmsmyfilterinterface.dir/interface/generated-cpp/MyFilter.cpp.o
[ 26%] Linking CXX static library libkmsmyfilterinterface.a
[ 26%] Built target kmsmyfilterinterface
[ 31%] Generating cpp_server_internal.generated, implementation/generated-cpp/SerializerExpanderMyfilter.cpp, implementation/generated-cpp/MyFilterImplInternal.cpp, implementation/generated-cpp/MyFilterImplFactory.hpp
Generation success
Scanning dependencies of target kmsmyfilterimpl
[ 36%] Building CXX object src/server/CMakeFiles/kmsmyfilterimpl.dir/implementation/objects/MyFilterOpenCVImpl.cpp.o
[ 42%] Building CXX object src/server/CMakeFiles/kmsmyfilterimpl.dir/implementation/objects/MyFilterImpl.cpp.o
[ 47%] Building CXX object src/server/CMakeFiles/kmsmyfilterimpl.dir/implementation/generated-cpp/SerializerExpanderMyfilter.cpp.o
[ 52%] Building CXX object src/server/CMakeFiles/kmsmyfilterimpl.dir/implementation/generated-cpp/MyFilterImplInternal.cpp.o
[ 57%] Linking CXX shared library libkmsmyfilterimpl.so
/usr/bin/ld: libkmsmyfilterinterface.a(MyFilterInternal.cpp.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
libkmsmyfilterinterface.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
src/server/CMakeFiles/kmsmyfilterimpl.dir/build.make:195: recipe for target 'src/server/libkmsmyfilterimpl.so.0.0.1~0.g9cd4271' failed
make[2]: *** [src/server/libkmsmyfilterimpl.so.0.0.1~0.g9cd4271] Error 1
CMakeFiles/Makefile2:144: recipe for target 'src/server/CMakeFiles/kmsmyfilterimpl.dir/all' failed
make[1]: *** [src/server/CMakeFiles/kmsmyfilterimpl.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
decades@ubuntu:~/Documents/MyFilter/my-filter/build$

OS is Ubuntu 16.04, 64 bit. Any pointer welcome.

neilyoung commented 6 years ago

Situation has changed a bit. Following some advices in the web I decorated all "CFLAGS" found in CMakeList.txt with -fPIC

That at least let me compile and linke and even a deb could be produced.

However, now the server spits into the soup and refuses to load because of a missing external:

2018-07-17 00:36:01,048486 8772 [0x00007f4fd50d3880] warning KurentoModuleManager ModuleManager.cpp:63 loadModule() Module /home/decades/Documents/MyFilter/my-filter/build/src/server/libkmsmyfilterimpl.so cannot be loaded: /home/decades/Documents/MyFilter/my-filter/build/src/server/libkmsmyfilterimpl.so: undefined symbol: _ZN2cv6String10deallocateEv

Whatsoever...Wondering how other's made it...

neilyoung commented 6 years ago

I think this is an opencv version mismatch, so I downloaded KMS server sources following http://doc-kurento.readthedocs.io/en/stable/dev/dev_guide.html#developing-kms

While running CMake I got an interesting error message:

-- Checking for module 'opencv'
--   Found opencv, version 3.4.1
-- Resolving opencv version ^2.0.0 with 3.4.1
CMake Error at kms-cmake-utils/CMake/VersionHelpers.cmake:301 (message):
  Version does not match <3.0.0 with 3.4.1

Q: Is KMS not compatible with OpenCV 3? This would explain my load problems.

Yep: Seems so https://stackoverflow.com/questions/43688544/how-can-kurento-use-opencv-3-0

neilyoung commented 6 years ago

Interesting plot twist: I was able to compile the KMS server code by changing the opencv requirement in

./kms-filters/CMakeLists.txt to

set(OPENCV_REQUIRED >= 2.0.0)

Because none of the inbuilt filters did compile now I excluded them from build by commenting the appropriate entries in

./kms-filters/src/gst-plugins/CMakeList.txt At least the server starts and reacts to external requests. Let's see, if it launches my module now.

neilyoung commented 6 years ago

Oh that sucks... No it didn't work. Since the "opencvfilter" module was the only one, which compiled with this setup, I did compile it, but on load here the good old known issue:

(gst-plugin-scanner:20338): GStreamer-WARNING **: Failed to load plugin './kms-filters/src/gst-plugins/opencvfilter/libopencvfilter.so': ./kms-filters/src/gst-plugins/opencvfilter/libopencvfilter.so: undefined symbol: _ZN2cv6String10deallocateEv

I suppose, KMS and opencv > 2 = nogo

neilyoung commented 6 years ago

OK, to end this self-talk: I have stopped messing with OpenCV 3 and installed KMS from source as described in the docs on a brand new Ubuntu 16.04 VM. Works like a charm.

micaelgallego commented 6 years ago

We know that can be a bit frustrating to ask for help and receive nothing from our side. But KMS is huge for our small team and we have to focus on core features.

We really appreciate contributions and Pull Requests.

When se have resources, we will take a look to this issue.

El mar., 17 jul. 2018 18:51, neilyoung notifications@github.com escribió:

OK, to end this self-talk: I have stopped messing with OpenCV 3 and installed KMS from source as described in the docs on a brand new Ubuntu 16.04 VM. Works like a charm.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Kurento/bugtracker/issues/280#issuecomment-405651401, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBdKDs6l_VjUQU5cgP6t9cNa0tVE9jnks5uHhYogaJpZM4VQwnh .

neilyoung commented 6 years ago

@micaelgallego No issue, I know that. In the end there is an answer :) Supporting OpenCV 3 would be a burner.

j1elo commented 6 years ago

Just do a quick Google search for cv::string::deallocate. This is not a problem with Kurento, is a problem with system configuration.

There is nothing intrinsic in Kurento that makes it depend on any specific version of OpenCV; of course, the demonstration filters may use some functions that were present on v2 but changed in v3, so those will stop building. But, a filter is kind of a self-contained "application", Kurento just loads it dynamically and passes video frames to it. If your code compiles with the v3 headers, it should work just fine.

The problem you're facing here is that your plugin wants to dynamically resolve some symbols belonging to OpenCV, but the system's dynamic linker is looking for them in the wrong places. This is done by Kurento / GStreamer's plugin registry, i.e. a dlopen() operation. The system's dynamic linker looks for the required symbols in all of the system's search paths, in their preference order. If you happen to have installed the OpenCV libraries from Ubuntu 16.04 (v2.4.9), then those are probably being the ones found.

To check what OpenCV packages you have installed: dpkg -l *opencv* | grep ii

To check what actual OpenCV library files you have in your system:

sudo updatedb
locate *libopencv*.so

To inspect what exact files are being loaded by KMS while it runs (it might need some tweaking): strace -e trace=open kurento-media-server Source.

C++ uses mangled symbol names, but they are kinda easy to read: _ZN2cv6String10deallocateEv translates into cv::String::deallocate. So, the system is looking for the implementation of this function which I assume exists only in OpenCV v3, but it looks into the v2 libraries (.so files) and those don't contain that symbol.

So what can you do?

I guess building from source code in a clean environment worked because there was no mixing of library versions. I can think of 3 options you have to use a non-standard OpenCV version in Ubuntu:

  1. Compile OpenCV v3 as a static library against your plugin. This way, the resulting .so will be bigger in size, but it will be self-contained and won't need to dynamically load any additional library.

  2. Use LD_LIBRARYPATH to tell the dynamic linker where your custom OpenCV library is built. Only needed if you don't have it already in a system directory such as /lib or /usr/lib. For example, if it is in /opt/opencv3, you would do:

    export LD_LIBRARY_PATH=/opt/opencv3/lib:$LD_LIBRARY_PATH
    kurento-media-server ...
  3. Use rpath or runpath. Source.

neilyoung commented 6 years ago

@j1elo Thanks for the detailed answer. I was already answering (a very long thread, a lot of quotes), but after "Reopen and comment" it disappeared.

Trying to provide some info here again.

Installed libs ``` decades@ubuntu:~/Documents/kms-omni-build/build-RELEASE$ dpkg -l *opencv* | grep ii ii libopencv-calib3d-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-calib3d ii libopencv-calib3d2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision Camera Calibration library ii libopencv-contrib-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-contrib ii libopencv-contrib2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision contrib library ii libopencv-core-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-core ii libopencv-core2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision core library ii libopencv-dev 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for opencv ii libopencv-features2d-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-features2d ii libopencv-features2d2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision Feature Detection and Descriptor Extraction library ii libopencv-flann-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-flann ii libopencv-flann2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision Clustering and Search in Multi-Dimensional spaces library ii libopencv-gpu-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-gpu2.4v5 ii libopencv-gpu2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision GPU library ii libopencv-highgui-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-highgui ii libopencv-highgui2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision High-level GUI and Media I/O library ii libopencv-imgproc-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-imgproc ii libopencv-imgproc2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision Image Processing library ii libopencv-legacy-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-legacy ii libopencv-legacy2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision legacy library ii libopencv-ml-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-ml ii libopencv-ml2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision Machine Learning library ii libopencv-objdetect-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-objdetect ii libopencv-objdetect2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision Object Detection library ii libopencv-ocl-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-ocl2.4v5 ii libopencv-ocl2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision OpenCL support library ii libopencv-photo-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-photo2.4v5 ii libopencv-photo2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision computational photography library ii libopencv-stitching-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-stitching2.4v5 ii libopencv-stitching2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision image stitching library ii libopencv-superres-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-superres2.4v5 ii libopencv-superres2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision Super Resolution library ii libopencv-ts-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-ts2.4v5 ii libopencv-ts2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision ts library ii libopencv-video-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-video ii libopencv-video2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision Video analysis library ii libopencv-videostab-dev:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 development files for libopencv-videostab2.4v5 ii libopencv-videostab2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision video stabilization library ii libopencv2.4-java 2.4.9.1+dfsg-1.5ubuntu1 all Java bindings for the computer vision library ii libopencv2.4-jni 2.4.9.1+dfsg-1.5ubuntu1 amd64 Java jni library for the computer vision library ii opencv-data 2.4.9.1+dfsg-1.5ubuntu1 all development data for opencv ```
Other libs ``` decades@ubuntu:~/Documents/kms-omni-build/build-RELEASE$ locate *libopencv*.so /home/decades/Documents/dragonfly2nativeProject/dragonfly2java/lib/libopencv_java331.so /home/decades/Documents/dragonfly2nativeProject/dragonfly2java/out/artifacts/Dragonfly2Java_jar/libopencv_java331.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_calib3d.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_core.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_dnn.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_features2d.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_flann.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_highgui.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_imgcodecs.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_imgproc.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_java341.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_ml.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_objdetect.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_photo.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_shape.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_stitching.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_superres.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_video.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_videoio.so /home/decades/Documents/dragonfly2nativeProject/opencv/build/lib/libopencv_videostab.so /usr/lib/jni/libopencv_java249.so /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so /usr/lib/x86_64-linux-gnu/libopencv_contrib.so /usr/lib/x86_64-linux-gnu/libopencv_core.so /usr/lib/x86_64-linux-gnu/libopencv_features2d.so /usr/lib/x86_64-linux-gnu/libopencv_flann.so /usr/lib/x86_64-linux-gnu/libopencv_gpu.so /usr/lib/x86_64-linux-gnu/libopencv_highgui.so /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so /usr/lib/x86_64-linux-gnu/libopencv_legacy.so /usr/lib/x86_64-linux-gnu/libopencv_ml.so /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so /usr/lib/x86_64-linux-gnu/libopencv_ocl.so /usr/lib/x86_64-linux-gnu/libopencv_photo.so /usr/lib/x86_64-linux-gnu/libopencv_stitching.so /usr/lib/x86_64-linux-gnu/libopencv_superres.so /usr/lib/x86_64-linux-gnu/libopencv_ts.so /usr/lib/x86_64-linux-gnu/libopencv_video.so /usr/lib/x86_64-linux-gnu/libopencv_videostab.so /usr/lib/x86_64-linux-gnu/gstreamer-1.5/libopencvfilter.so /usr/local/lib/libopencv_calib3d.so /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_dnn.so /usr/local/lib/libopencv_features2d.so /usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgcodecs.so /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_objdetect.so /usr/local/lib/libopencv_photo.so /usr/local/lib/libopencv_shape.so /usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_superres.so /usr/local/lib/libopencv_video.so /usr/local/lib/libopencv_videoio.so /usr/local/lib/libopencv_videostab.so /usr/local/share/OpenCV/java/libopencv_java341.so ```
strace output

I'm too tired today, will check tomorrow. Thanks for your answer again.

neilyoung commented 6 years ago

It's getting weird a bit. I found my OpenCV3 libs in /usr/local/lib and provided this as load path.

All compiled modules and plugins refuse to load like so:


open("./kms-filters/tests/CMakeFiles", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC
(gst-plugin-scanner:22292): GStreamer-WARNING **: Failed to load plugin './kms-filters/src/gst-plugins/opencvfilter/libopencvfilter.so': ./kms-filters/src/gst-plugins/opencvfilter/libopencvfilter.so: undefined symbol: _ZN2cv6String10deallocateEv
) = 7

There is no clue, what libopencv is taken to resolve that from the strace, since there is no such a trace

neilyoung commented 6 years ago

I cannot make this run. No way. Can anybody of you try to explain, what is required to do in order to combine KMS with an OpenCV 3 installation?

j1elo commented 6 years ago

I'm afraid you'll depend on being lucky and finding someone in the community forum who has had the same problem and has been able to solve it... try and post a message there. Kurento officially supports the OpenCV version that ships with Ubuntu 14.04 and 16.04 Long Term Support editions, which means 2.x until we upgrade the whole project to work with the latest Ubuntu LTS (18.04); that one seems to ship OpenCV 3.20, but I'm afraid I don't see the upgrade happening until late this year, at best

neilyoung commented 6 years ago

OK, thanks.

neilyoung commented 6 years ago

ok, maybe one easy question then: I managed to scaffold my own opencv plugin following http://doc-kurento.readthedocs.io/en/stable/user/writing_modules.html#opencv-module. I'm now on that VM, which let me compile and run KMS perfectly. I also managed to make my module known to KSM, it appears as myFilter.MyFilter.

Since there is a "process" entry in MyFilterOpenCVImpl.cpp my simple epxectation was, that I will be able to see this exception somehow, once I'm able to connect to that module. But even this seems to not work for me

My module appears as "myFilter.MyFilter" and this is what I tried to connect from client JS:

pipeline.create('myFilter.MyFilter', function(error, filter)

to no avail, of course. Other variations did also not work.. The scaffoled JS code seems to be too ugly for me and overkill, but maybe you know more?

neilyoung commented 6 years ago

Please, what is wrong with this approach? I made another attempt with your kms-opencv-plugin-sample. The sample is loaded, it is visible with --list under factories as OpencvPluginsample and opencvpluginsample.OpencvPluginsampel and with option -v as opencvpluginsampe.

I'm using the same JS code as for the FaceOverlay (which works), just altering the name of the plugin to be piped. But that does not work... The remote video window just shows the spinner.

Oh man, why the heck does it have to be that complicated???

neilyoung commented 6 years ago

OK, guys. After all those years I thought I would be tough enough to make it, after having seen the Super Mario hat on my head. I admit, I was wrong: Even though I made it to roll my own OpenCV module and put it under your server, so that the server is claiming to have it, there is no visible way on earth for me to make use of it from a simple browser app (it does not have to be Node or Java, just plain JS).

THANKS A LOT for this great experience 👎

j1elo commented 6 years ago

Hi, we are an extremely small team and at this point we cannot halt other tasks to check on this issue and how to solve it.

If you think that Kurento Media Server does provide some added value for you and your project, consider a support contract by which we will dedicate exclusive focus to the problem at hand. And it's also a way of making the whole project sustainable for the future.

The (free) alternative is accomodating to the free-software project priorities and scheduling. I know there are problems with creation of custom plugins, I took notes and will check on those whenever I get some free time. But currently our priority is developing means for full automatic performance and integration tests, which allow to do some critical upgrades to libnice and gstreamer libraries.

Sent: Friday, July 20, 2018 at 12:12 AM From: neilyoung notifications@github.com To: Kurento/bugtracker bugtracker@noreply.github.com Cc: "Juan Navarro" juan.navarro@gmx.es, Mention mention@noreply.github.com Subject: Re: [Kurento/bugtracker] Cannot build opencv module (#280)

OK, guys. After all those years I thought I would be tough enough to make it, after having seen the Super Mario hat on my head. I admit, I was wrong: Even though I made it to roll my own OpenCV module and put it under your server, so that the server is claiming to have it, there is no visible way on earth for me to make use of it from a simple browser app (it does not have to be Node or Java, just plain JS).

THANKS A LOT for this great experience 👎

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/Kurento/bugtracker/issues/280#issuecomment-406430379