Search code examples
kurento

Module 'opencvpluginsample' is not installed in the Kurento Media Server


What I Did:

  1. I downloaded the updated opencv_plugin-sample from the https://github.com/Kurento/kms-opencv-plugin-sample.

  2. Run the cmakelist using the cmake-gui and generated the so using

    sudo make install
    
  3. The so is generated in the path

    usr/local/lib/x86_64-linux-gnu/kurento/modules
    
  4. From the js folderin the kms-opencv-plugin-sample,i run the command

    cmake .. -DGENERATE_JS_CLIENT_PROJECT=TRUE
    
  5. To generate the "kurento-module-opencvpluginsample.min.js", "kurento-module-opencvpluginsample.map" file i installed grunt in the js folder,using the command

    npm install grunt grunt-browserify grunt-contrib-clean grunt-jsdoc grunt-npm2bower-sync minifyify

  6. A dist folder is generated which contain the file("kurento-module-opencvpluginsample.min.js", "kurento-module-opencvpluginsample.map","kurento-module-opencvpluginsample.js")

  7. I created a folder for kms-opencv-client and copied all the files from the kurento-crowddetector folder from the link https://github.com/Kurento/kurento-tutorial-js

  8. In the kms-opencv-client ,inside bower-component,I replaced the kurento-crowddetector-module with the opencv-plugin-sample-module which contains the js generated from step:6

  9. Also changed the js path in the index.html and also replaced the module name in index.js

  10. I started the Kurento media server and and also http server

  11. When i loaded the page from the browser

    http://10.10.1.3:8080/index.html?ws_uri=ws://10.10.1.3:8888/kurento#

  12. When i click the start button,the following error occurs

    SyntaxError: Module 'opencvpluginsample' is not installed in the Kurento Media Server

    Did i miss anything in the opencv-plugin instalation process


Solution

  • The problem is that js client is trying to check all modules that you require and it seems that this module is not installed correctly in kurento mediaserver.

    You say that you generated the .so file, but you also need to let mediaeserver load it. For this, you have three options:

    1. Install it at /usr/lib/x86_64-linux-gnu/kurento/modules/
    2. Edit /etc/default/kurento and add KURENTO_MODULES_PATH variable to indicate the directory where your so file is loaded
    3. Indicate the installation directory to cmake correctly by executing: cmake .. -DCMAKE_INSTALL_PREFIX=/usr && make && sudo make install

    Once this is done, the kms logs should show that the module is being loaded.