Servers by jDrones

Controlling Parrot Disco video

(tridge) #1

I’ve been wanted to work on this for ages, and finally got around to it with the encouragement of Gus Whitehouse (thanks Gus!).
One of the key missing features with ArduPilot on the disco has been the lack of a way to control video recording and streaming and taking of still photos with an R/C controller. I opened a PR to fix that today:

The approach I took is to allow arbitrary shell scripting commands to be associated with GPIO values. This means you can connect shell script commands on Linux ports of ArduPilot with the existing relay support. As the Disco already has shell commands for video control it means that connecting R/C switches to control video becomes easy.
How to try it
If you want to try it out then do the following:

  • either build ArduPilot from my PR yourself, or use this prebuilt binary:
  • copy this script onto your Disco into the same directory that ArduPilot lives in, /data/ftp/internal_000/ardupilot
  • set RELAY_PIN to 100, RELAY_PIN2 to 101 and RELAY_PIN3 to 102
  • choose what RC input channels you want to use for switches to control video and photos. I will assume below that you have video start/stop on RC8, recording start/stop on RC7 and taking a photo on RC6
  • set RC6_OPTION to RELAY (option 28)
  • set RC7_OPTION to RELAY2 (option 34)
  • set RC8_OPTION to RELAY3 (option 35)

Then restart your Disco. You should find that:

  • Changing the switch associated with RC6 to a high PWM will take a photo.
  • Changing RC7 high will start recording video to the internal storage of the Disco. Lowering RC7 will stop recording.
  • Changing RC8 to a high PWM value will start video streaming to the IP address of your GCS on port 8888. Lowering RC8 will stop streaming.

It is all controlled by If you want to control some other aspect of your plane then just edit to make it do something else, or add new functions.
Happy flying!

(macfly1202) #2

Thanks so much Tridge! This is a great new. I will try as soon as I can in the next days ! I’m so excited, thanks.

(Andre-K) #3

Fantastic ! - one step closer to perfect ArduPlane integration (with no disadvantages)

(Andre-K) #4

it it possible to control the pitch, and type of digital stabilization as well ?

(tridge) #5

you can script up anything that can be some with command line tools. I haven’t investigated what can be done with pimpctl for video controls beyond recording and streaming.
Cheers, Tridge

(macfly1202) #6

HI Tridge,

I’ve done some test today of your script during 2h at home (2*1h) and nothing has failed.
I’ve use Qgroundcontrol with Video on udp 14550. Perfectly working stream with multiple start/stop hit rc control CH8. I didn’t check the photos and videos recorded on media but gpio.log file indicate RC control OK.

Sun Mar 17 19:43:49 UTC 2019 Starting recording
Sun Mar 17 19:43:56 UTC 2019 Stopping recording
Sun Mar 17 19:44:03 UTC 2019 Taking picture
Sun Mar 17 19:48:10 UTC 2019 Starting streaming to 8888
Sun Mar 17 19:48:44 UTC 2019 Stopping streaming to 8888
Sun Mar 17 19:48:46 UTC 2019 Starting streaming to 8888
Sun Mar 17 19:48:47 UTC 2019 Stopping streaming to 8888
Sun Mar 17 19:48:56 UTC 2019 Starting streaming to 8888
Sun Mar 17 19:48:57 UTC 2019 Stopping streaming to 8888
Sun Mar 17 19:53:36 UTC 2019 Starting streaming to 8888
Sun Mar 17 19:53:37 UTC 2019 Stopping streaming to 8888
Sun Mar 17 19:53:37 UTC 2019 Taking picture
Sun Mar 17 19:53:37 UTC 2019 Starting recording
Sun Mar 17 19:53:38 UTC 2019 Stopping recording
Sun Mar 17 19:54:05 UTC 2019 Taking picture

I try with mission planner but for unknow reason MP was crashing on control+F / then VLC … Probably a misconfiguration on my side.

I check quickly with Skycontroller2 and it doesn’t seem to stream on FreeFlight.
Tridge: could you be kind enough to tell the correct behaviour on SK2. I mean must it stream or not on attached device on SK2 (Android/iPhone) ?

Thanks again for this big step ahead in the Disco video issue with Arduplane !

attached small screenshot of PIP under Qgroundcontrol:

(tridge) #7

I have a sk2 but I haven’t used it yet. I use a taranis with a frsky receiver.
I’ll have a go with the sk2 sometime and let you know.

(Lucas De Marchi) #8


I’m working on support for skycontroller2 and will send a PR soon. The skycontroller2 is a wifi RC - the most difficult part is convincing it to remain connected to disco when the dragon flight stack is not running, other than that it’s working great for me

(macfly1202) #9

My best RC friend is taranis for years now but for the disco, having video feed on a portable device with Hud is really important for the best fpv experience.
If only we could have Taranis + Osd on video feed, it will be truly amazing but what you accomplish is already cool. Thanks again.

(macfly1202) #10

nice info Lucas. Ready to test if necessary.
I had the idea the change the GPIO script from Tridge with info find here ( -> port 55004) but didn’t start yet.

Fyi I just donate 30$ to Paypal Ardupilot because I’m convince with great work done from Arduplane dev team since 2013.

(Kikislater) #11

So how do you connect to SC2 ? Ethernet to usb cable ?

(Lucas De Marchi) #12

@macfly1202 my intention is to let both connected. So you can even use either of them.

@kikislater to connect to the drone SC2 is on wifi or 4G with the disco4g mod. To connect to a tablet/phone I think the best is to use a usb-ethernet. But disco is compatible with just a few dongles. For not using usb-ethernet we would need to demux the data over the USB like freeflight does… But it’s too much trouble

(Lucas De Marchi) #13

@macfly1202 that said I’ve heard about interference of taranis due to both operating on 2.4GHz.

(Kikislater) #14

I’m aware about few eth-usb support with Disco.
So what is your solution to handle SC2 with disco and QGC or MP ?