Is there a parameter in Ardupilot which specifies which external program to start when a certain button is pressed on the controller? Or otherwise a possibility to run a custom executable started by the ardupilot under certain conditions?
You can take a look at the init scripts like explained in my tutorial to start ardupilot but be careful, a bad manipulation and your software will be bricked (no linux console starting for instance).
My idea is to place a mencoder or ffmpeg compiled with gnueabihf, and start recording from v4l2 device under linux on Bebop2.
This part is not really an easy one. You can take a look at the work from the paparazzi uav team who managed to get something basically working, capturing frames here and there, so for fun it’s ok. Now in order to get a quality even just like the one on Ardupilot disco, you’d have to
- Understand how the Parrot7 SoC’s Image Signal Processor works
- Implement both Auto-Exposure and Auto-White balance algorithms
- Debayer the v4l2 stream and use the GPU to flatten the fish-eyed image
- Encode it in software, which wouldn’t be of great quality on a Cortex A9
This is a lot of fun but doing this by reverse engineering would probably take a lot of time, and the quality would still not be the same as the one on the original video stream because some algorithms would still be missing. So I think the best option would be to make what is already on the Ardupilot Disco work with some help from the guys at Parrot.