Search code examples
nginxrtmplive-streaming

Custom Livestream Platform For DJI Phantom 4 Pro+


Edit : Here's my ufw status:

Status: active

To                         Action      From
--                         ------      ----
80                         ALLOW       Anywhere                  
1935                       ALLOW       Anywhere                  
80 (v6)                    ALLOW       Anywhere (v6)             
1935 (v6)                  ALLOW       Anywhere (v6)

And App List:

Available applications:
  CUPS

So, I tweaked with DJI Phantom 4 Pro+ and discovered that it support custom stream platform. My question is how to do it? I can already create NginX RTMP server but I still can't figure out how to make the Drone connect and stream to it. I already test my server using OBS to http://{IP}/live with key test and open it using VLC (on my phone) at rtmp://{IP}/live/test. Here's my nginx conf:

worker_processes  1;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       192.168.0.39:80;
        server_name  localhost;

        location / {
            root   html;
            index  index.html index.htm;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }    
    }    
}

rtmp {
        server {
                listen 192.168.0.39:1935;
                chunk_size 4096;

                application live {
                        live on;
                        record off;
                }
        }
}

Solution

  • It turns out I'm just stupid. To anyone who has the same issue, don't make the same mistake as I did. I enter rtmp://{IP}/live/drone/. It should be rtmp://{IP}/live/drone (notice the missing "/")