Skip to content

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

Notifications You must be signed in to change notification settings

skshadan/Opencv-DJI-Drones

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages