PLEASE READ: this tutorial assumes that the Dragonfly Java App has been already setup on the CLIENT machine following the instructions available starting from this page.

Any USB camera connected to a machine running macOS or Linux (SOURCE machine) can easily be used as a wireless remote camera for Dragonfly streaming a video over an Internet connection to another machine running Dragonfly (CLIENT machine).

1 – Calibration of the USB camera

  1. Connect the USB camera to the SOURCE machine.
  2. Open the browser and call the following URL:
  3. Follow the instructions shown inside the Dragonfly Web Calibration Tool or shown inside this page.
  4. At the end of the calibration process:
    1. click on the Download button and download the JSON calibration file generated by the calibration tool.
    2. move the JSON file from the SOURCE machine to the CLIENT machine.
    3. place the JSON calibration file inside the config folder of the CLIENT machine (cd dragonfly_linux/application/Dragonfly2Java_jar/config).

2 – Setup of the SOURCE machine

2.1 – Install Gstreamer

We use Gstreamer to stream the video from the SOURCE machine. To install it enter the following commands on your SOURCE machine:

2.2 – Activate the streaming

Connect to the SOURCE machine:

  1. Launch the following command to list all video devices picked up by Ubuntu in order to find the ID of the USB camera:

  2. Launch one of the following commands (ip_of_your_device is the local IP address assigned to the SOURCE machine):
    1. For MJPEG streaming – use this solution if the hardware does not allow live H264 encoding, or if H264 is not satisfying:
    2. For H264 streaming much lower bandwidth requirements than MJPEG, but requires live encoding and some CPUs might not be powerful enough.
    3. For H264 (accelerated) streaming – same as H264 streaming, but does not require a powerful CPU encoding. However, all platforms are not compatible. Raspberry Pi and Jetson Nano should work fine.

3 – Make use of the stream inside the Dragonfly Java App

  1. If not already done please setup the Dragonfly Java App on the CLIENT machine following carefully the instructions available starting from this page.
  2. Launch the Dragonfly Java Web UI on the CLIENT machine.
  3. Click on the Configuration tab:
    1. set the CAM_SOURCE parameter to the following string depending on the type of streaming chosen during the configuration of the SOURCE machine (ip_of_your_device is the local IP address assigned to the SOURCE machine):
      • For MJPEG streaming:
      • For H264 streaming:

      • For H264 (accelerated) streaming:

    2. set the CAM_CALIBRATION_FILE parameter to the name of the JSON calibration file placed inside the config folder at the root of the Dragonfly Java App installation folder (cd dragonfly_linux/application/Dragonfly2Java_jar/config)
    3. set the CAM IMAGE WIDTH and HEIGHT to 640 x 480.
  4. Click on Save and Restart.