Coder Social home page Coder Social logo

skshadan / opencv-dji-drones Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 2.0 584 KB

Use OpenCV with any model of DJI Drones, you can gain access to the real-time camera feed of your drone. This allows for live streaming and analysis of the drone's field of view, providing valuable insights for various applications including aerial photography, surveying, and drone-based monitoring systems.

License: MIT License

Python 100.00%
aws dji dji-drone drone-api drones environmental-monitoring machine-learning object-detection opencv rtmp-server

opencv-dji-drones's Introduction

App Screenshot

OpenCV with DJI Drones

So, you're trying to tap into your DJI drone's camera feed to use OpenCV, huh? Doesn't matter if it's a DJI Mini 2, DJI Mini 2 SE, or some other model, it can be a real pain, right? I was in the same boat, but after messing around with a bunch of methods, I finally cracked it.

Step 1 Create an RTMP Server

  • (Note: I used AWS EC2)

  • What is RTMP Server?

An RTMP Server is a type of server that uses the Real Time Messaging Protocol (RTMP). This protocol, developed by Adobe Systems, is primarily used for streaming audio, video, and data over the internet. When you create an RTMP Server, you essentially set up a destination for your stream, which can then be accessed and viewed by others on the internet.

Step 2 Add Security Groups

  • Use this Security Group to enable both inbound and outbound traffic.

  • Inbound Rules App Screenshot

  • Outbound Rules App Screenshot

Step 3: Connect with Your Server

sudo apt update && sudo apt upgrade -y
sudo apt install nginx
sudo add-apt-repository universe
sudo add-apt-repository universe
sudo apt install libnginx-mod-rtmp
sudo nano /etc/nginx/nginx.conf  or   search for "etc/nginx/nginx.conf"  with "Win SCP"

Modify NGINX configuration and save (scroll to the bottom of the .conf file and add the following code)
rtmp {

  server {

    listen 1935;

    chunk_size 4096;


    application live {

      live on;

      record off;

    }

  }

}
sudo systemctl restart nginx

Screenshots

Open the DJI Fly App ⇒ Connect your drone ⇒ Navigate to 'Transmission' ⇒ Click on 'Live Streaming Platforms'. Here, you'll find the RTMP option. Enter your server IP address as shown.

App Screenshot

Example Code to Access the Video Feed

And boom! That's all it takes to tap into your DJI Drone Camera Feed from anywhere with RTMP. Stuck or got a question? just hit me up.

App Screenshot

opencv-dji-drones's People

Contributors

skshadan avatar therealazzy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

therealazzy

opencv-dji-drones's Issues

Question

how to stream without internet for local system because i done wired feed transmitted to jetson , now i want to do in wireless can you help me

Asking

Is there a tutorial for making an RTMP server locally so it doesn't require internet access and avoids lagging?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.