The Dragonfly Java Application is available on Ubuntu and macOS. It is assumed that the you have already some very basic knowledge about Ubuntu and/or macOS.

 

         

 

PLEASE READ: Dragonfly is also available on Docker. For detailed info please look at this page.

1 – Install the Dragonfly Java App on Ubuntu

On a fresh Ubuntu 16.04 or 18.04 system, please follow the instructions below to install the Dragonfly Java Application.

NOTE: during the installation of Ubuntu please choose ENGLISH as main language so that we will be easier for us to provide remote support if needed.

1.1 – Automatic installation

  • Go to the download location of the archive and run the following code:
    unzip dragonfly_installation_linux_20200316.zip
    cd dragonfly_linux
    ./install.sh
    # At this stage, you will be asked for superuser credentials for installation. The installation of the Dragonfly Java App, Web UI and all the dependencies could take a bit. Be patient.
  • You can now start using Dragonfly following the instructions in this page.

1.2 – Manual installation

A manual installation might be required to avoid conflicts with an already existing installation of some of the Dragonfly Java App dependencies. Specifically the Automatic installation installs:

  • FFMPEG version 3.4.2.
  • OpenCV version 3.4.1.

To proceed to the manual installation:

  • Install the following packages from the APT package manager:
    # Update repositories first
    sudo apt update
    
    # Install required packages
    sudo apt-get -y install git
    sudo apt-get -y install libgtk2.0-dev
    sudo apt-get -y install yasm
    sudo apt-get -y install libgstreamer1.0-dev
    sudo apt-get -y install libgstreamer-plugins-base1.0-dev
    sudo apt-get -y install gstreamer1.0-libav
    sudo apt-get -y install gstreamer1.0-plugins-bad
    sudo apt-get -y install gstreamer1.0-tools
    sudo apt-get -y install gstreamer1.0-plugins-good
    sudo apt-get -y install gstreamer1.0-plugins-ugly
    sudo apt-get -y install gstreamer1.0-nice
    sudo apt-get -y install ant
    sudo apt-get -y install openjdk-11-jdk
    sudo apt-get -y install cmake

    • Extract the archive:
      unzip dragonfly_installation_linux_20200316.zip
    • Install FFMPEG 3.4.2:

      cd dragonfly_linux/data
      tar -xvf ffmpeg-3.4.2.tar.xz
      cd ffmpeg-3.4.2
      ./configure --enable-nonfree --enable-pic --enable-shared
      make -j4
      sudo make install
    • Set some environment variables:
      jvm=$( ls /usr/lib/jvm | grep "1.11.0-openjdk" )
      export JAVA_HOME=/usr/lib/jvm/${jvm}
      export ANT_HOME=/usr/share/ant/
    • Install OpenCV 3.4.1 (note that the make -j4 can take some time to complete):

      cd dragonfly_linux/data
      unzip opencv-3.4.1.zip
      cd opencv-3.4.1
      mkdir build
      cd build
      cmake ..
      make -j4
      sudo make install
    • Install the Dragonfly Java App:

      # Extract the dragonfly archive
      cd dragonfly_linux/data
      mkdir application
      unzip -o dfja-1.6-dist.zip -d application
      
      # Copy the OpenCV java library in the Dragonfly directory
      cp /usr/local/share/OpenCV/java/libopencv_java341.so ./system/lib/
      chmod +x ./system/lib/libopencv_java341.so
    • You can now start using the Dragonfly Java App following the instructions in this page.

    2 – Install the Dragonfly Java App on macOS

    Under macOS, all the required dependencies for the Dragonfly Java App can be installed using brew.

    • Open a new Terminal under Applications > Utilities > Terminal.
    • Enter the following command to install brew:

      /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    • Execute the following set of commands one by one in order to install all the required dependencies:
      # Install Java/JDK 11
      brew tap homebrew/cask-versions  
      brew cask install java11
      
      # Install Ant
      brew install ant
      
      # Install FFmpeg
      brew install ffmpeg
      
      # Install Cmake
      brew install cmake
      
      # Install Gstreamer
      brew install gstreamer  
      brew install gst-plugins-base  
      brew install gst-plugins-good  
      brew install gst-plugins-bad
      brew install gst-plugins-ugly
      brew install gst-libav

    • Extract the archive:
      unzip dragonfly_installation_mac_20200316.zip
    • Install OpenCV 3.4.1: (note that the make -j4 can take some time to complete):
      cd dragonfly_mac
      unzip opencv-3.4.1.zip
      cd opencv-3.4.1
      mkdir build
      cd build
      cmake ..
      make -j4
      sudo make install
    • Install the Dragonfly Java App:
      # Go back to the dragonfly_mac directory
      cd ../..
      
      # Extract the dragonfly archive
      mkdir application
      unzip -o dfja-1.6-dist.zip -d application
      
      # Copy the OpenCV java library in the Dragonfly directory
      cd application
      cp /usr/local/share/OpenCV/java/libopencv_java341.dylib ./system/lib/
    • You can now start using the Dragonfly Java App following the instructions in this page.

    << PREVIOUS NEXT >>