DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Streaming directly to laptop from DJI Go 4 App

hainerob

Active Member
Joined
Nov 14, 2017
Messages
35
Reactions
15
Age
40
Hi Guys,

Just thought I would share a reasonably easy way to stream to a Windows laptop so that you have a second larger screen, perhaps to assist with framing shots or others who wish to watch the video feed. All you need is a laptop, nginx for windows with RTMP compiled in, and VLC media player.

The basic premise is to create a hotspot on your laptop, connect your device to this hotspot, stream to nginx rtmp, and then open that stream on VLC. Only paid software that you will need is the operating system on your laptop.

Disclaimer: Follow at own risk. I have tested this on my own equipment with a lot of success, but I take no responsibility for a crashed drone and/or laptop. --- or if you manage to crash your drone into your laptop! (I used an android 6 phone and a Windows 7 laptop)

Ok, if your not already using VLC, you should be. Download it from here: https://www.videolan.org

You will need to get a copy of nginx with RTMP compiled in. This can be a bit tricky, but a google search led me to this one: http://nginx-win.ecsds.eu/download/nginx 1.7.11.3 Gryphon.zip

1. Extract the nginx software to somewhere. Doesn't matter where. It should probably go into program files.
2. In the conf directory of nginx, create a new text file called nginx.conf and put the following in it:
worker_processes 1;
events {
worker_connections 1024;
}
rtmp {
server {
listen 1935;
chunk_size 4096;

application live {
live on;
record off;
}
}
}
PS: Make sure your saving this file as nginx.conf and not nginx.conf.txt - if you are using notepad, you will need to select All files from the Save as type drop down!

3. Create a hotspot on your laptop by running these commands in command prompt (running as administrator).
netsh wlan set hostednetwork mode=allow ssid=MyNetworkhere key=Password
where MyNetworkHere is the name of your new hotspot
and Password is the password you are setting on it
netsh wlan start hostednetwork
This will start the new hotspot network, You will need to re-use this command to re-start the hotspot if you were to reboot the computer.

4. Go into Control Panel and open up your network connections (Network and sharing centre --> Change adaptor settings)
5. Locate the new network which has been created, will be a Microsoft Virtual WIFI one. Right click and go to Properties, find Internet Protocol version 4, highlight it, and click Properties. Click use the following IP address and pick a static private one. Because you will need to type this later on your phone, I entered 10.1.1.1 with the subnet mask of 255.255.255.0. Leave gateway and DNS blank. Click OK and OK again.

6. Connect your phone to this new wireless network. There should be an option to manually set an IP address under advanced when you connect. Set the IP address of your phone to 10.1.1.2 with the subnet mask of 255.255.255.0 - again, other fields can be left blank. Your phone will complain about an inability to access the internet via this connection --- this is normal, and by design!

7. Turn off your firewall -- or, if you know how to use it, put an exception in for nginx.exe

8. Start nginx.exe from the nginx directory. It runs in the background, use task manager to check if its running, and to close it when you are finished.
TIP: you can use taskkill /f /im nginx.exe to close it also, perhaps create a shortcut?

9. Start DJI Go 4, connect your bird. Go to the live streaming bit and choose other platform. type the url rtmp://10.1.1.1/live/bird - and start the stream. Should put an icon at the top left.

10. Open up VLC media player. Go to the Media menu at the top, click Open Network Stream and type the same url: rtmp://10.1.1.1/live/bird

And Wolla! you should have a live stream on your laptop, which will probably be 5 seconds behind what you see in DJI Go.

Once you have done it once, to get it going on the next flight, you need to:
1. run netsh wlan start hostednetwork on you laptop to start the hotspot
2. connect to the network on your phone (which should remember the static IP and key)
3. start nginx on you laptop
4. Start the livestream in DJI go 4
5. connect VLC to the stream.

Things I have also done to make the process easier (which you can probably work out yourself)
- Create a shortcut to start nginx and the hotspot using a batch file
- Create another shortcut/batch to stop it
- Create a shortcut to open the stream in VLC

Have fun, Fly safe.
 
I have been waiting for this solution!

You can also mirror the iPad screen direct to a PC with lonely screen, but I find Ipad streaming to be a little too glitchy sometimes when using go4. It's ok, but I would rather stream rtmp.

Thanks for this!
 
  • Like
Reactions: hainerob
I have been waiting for this solution!

You can also mirror the iPad screen direct to a PC with lonely screen, but I find Ipad streaming to be a little too glitchy sometimes when using go4. It's ok, but I would rather stream rtmp.

Thanks for this!

Yeah, I've tried the Android equivalent and I was less than satisfied, besides, the on-lookers don't really need the DJI interface either, although it would be nice to be able to overlay simple things like speed/elevation.
 
Streamed from phone to tv inflight on 2 occasions worked fine for first minute then dji go froze then flew home remote only twice.
Anyone know why app (maybe phone) freezes
 
If you have an android phone and a laptop running Windows 10 then you don' need anything else. You can simply screen mirror from you android device directly to the laptop.
20170208_165951.jpg
 
Last edited:
I found this post extremely helpful! Thank you!

But I can't get past a reaaaally long delay in the stream.
In the DJI app it says under "Status of livestream" that I have a framerate of around 30, a video bitrate of around 3000kbps and a data buffer of 0.
On the app itself the live image has (almost) no delay as usual. But on every VLC client that I connect I get an image maybe every 10 to 15 seconds.
The iPhone is connected to the Spark's Wifi and via lighting to USB to Ethernet Adapter connected to the same Network as the Laptop running nginx.
Is there anything I can configure to have a smoother stream?
 
I found this post extremely helpful! Thank you!

But I can't get past a reaaaally long delay in the stream.
In the DJI app it says under "Status of livestream" that I have a framerate of around 30, a video bitrate of around 3000kbps and a data buffer of 0.
On the app itself the live image has (almost) no delay as usual. But on every VLC client that I connect I get an image maybe every 10 to 15 seconds.
The iPhone is connected to the Spark's Wifi and via lighting to USB to Ethernet Adapter connected to the same Network as the Laptop running nginx.
Is there anything I can configure to have a smoother stream?

Hi tzippy, I haven't tried it in that configuration so I am unsure. As I am using a Mavic, the WIFI on my phone is free to connect to any network (as the phone is connected via USB to the controller), and I suppose I get somewhere around a 5 second delay in the stream, without any noticeable frame rate loss.It also allows the pilot to operate the mavic normally without being tethered to a computer with a cable. I also haven't tried it with multiple VLC clients either.
 
If you have an android phone and a laptop running Windows 10 then you don' need anything else. You can simply screen mirror from you android device directly to the laptop.
View attachment 27325

Yeah, I have an android TV, so my first attempt at this was exactly that. Unfortunately I barely getting 1fps on my TV, so I canned that Idea and went for the live stream instead.
 
Yeah, I have an android TV, so my first attempt at this was exactly that. Unfortunately I barely getting 1fps on my TV, so I canned that Idea and went for the live stream instead.
I have used my Galaxy S5 phone and Galaxy Tab S2 tablet with my Windows 10 laptop. The tablet had a lot less lag than the phone did probably because its more powerful than the S5. The lag with the tablet was pretty insignificant especially if you just want to use the laptop as a secondary monitor for spectators.
 
As Mavic's Ocusync interferes heavily with 2.4 GHz Wifi, you should always use 5.8GHz Wifi for streaming. This will also increase the framerate significantly.
 
Hi, I was thinking to use a multi portable Type C hub adapter to connect the phone to the RC and the phone to the laptop with hdmi.
Have you ever tried this solution? Do you know if it is possible?
Connected through cables should be a lot better the video resolution and without lags.
 
As Mavic's Ocusync interferes heavily with 2.4 GHz Wifi, you should always use 5.8GHz Wifi for streaming. This will also increase the framerate significantly.
I only use my set up for spectators but there is no interference and the video quality is the same as what I see on my phone.

Hi, I was thinking to use a multi portable Type C hub adapter to connect the phone to the RC and the phone to the laptop with hdmi.
Have you ever tried this solution? Do you know if it is possible?
Connected through cables should be a lot better the video resolution and without lags.

I don't think this will work. There are many threads about this and people have tried it with negative results.
 
hi , thanks for sharing

it is working great !!!

now i have on my raspberry pi with ngnix+module and my laptop with this :)

best regards,
 
  • Like
Reactions: hainerob
hi , thanks for sharing

it is working great !!!

now i have on my raspberry pi with ngnix+module and my laptop with this :)

best regards,
I was gonna do this with a pi3. Just to lazy. Now you can set up a hotspot for all them onlookers can connect and watch your stream instead of thier Stanky breath as they look over your shoulder like they wanna nibble on your ear......
 
How do you mirror you samsung to windows 10. Im using a s7 and windows 10 laptop? thanks
On your phone you pull down the top menu (where the flashlight is) and select Smartview. Then in windows 10 you select the bottom right corner (the notifications icon). There you should see an option for projecting. It should say something like projecting to this PC. Once you select that the Smartview should show your pc. I cant remember 100% because I'm not on my laptop now. I've been meaning to make a video.
 
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
134,442
Messages
1,594,814
Members
162,978
Latest member
dojin23