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:
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.
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!events {
worker_connections 1024;
}
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
}
}
}
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.