Servers by jDrones

Bebop2 Video stream


(Suhail Pallath Sulaiman) #1

I have a Bebop2 running on arducopter. I would like to stream the video over wifi to my Linux computer. I saw instructions for doing that for parrot Disco. But I am not able to find any working resources for bebop2. Any help would be appreciated.

I found gstreamer is an option, but I am not really sure how to start the streaming from the bebop2 without using the sdk
@julienberaud


(julienberaud) #2

Hi,

So about the bebop. There is no support for raw video streaming with ardupilot. Some specific developments were required for Disco and though they should be portable easily now on Bebop2, it hasn’t been done by the guys at Parrot. I am not working for Parrot anymore so I keep polling from time to time to see if someone is likely to work on that.
The quality of the video is though not at the level it is with the proprietary firmware.
In case someone is interested in rewriting the whole video stack for fun and for the community, I can help.
The guys from paparazzi team were given a few pointers in order to develop a custom solution but it was pretty hack-ish last time I checked.

Regards,
Julien


Access and process video of Bebop 2 drone before transmission
(Suhail Pallath Sulaiman) #3

Thanks a lot for replying. could you direct me to some links if there is any which gives me more idea about “Some specific developments were required for Disco and though they should be portable easily now on Bebop2”.

I read somewhere that if I could push the pimp-ctl used in disco, to bebop there is a chance of success. But I am not able to find the “pimpctl” executable anywhere. Do you have any thoughts about this?

apologize if any of my statements sound naive, I am pretty new to this


(julienberaud) #4

So,

I think that with a bit of work it could be feasible to get the disco software to work but it will require patching the kernel at least and testing stuff here and there.

Julien


(Kashish Goyal) #5

@julienberaud

Hi, I am facing similar issues myself. Is there any place where I can get “pimpctl” and associated libraries for running the video stream from bebop2.

Thanks.

Kashish


(Alex) #6

@tridge, or someone who has Disco, could you please post pimpctl from your disco filesystem, because we would like to test it on bebop 2 for sending / recording video.


(Kashish Goyal) #7

Hi Julien,

I tried building gstreamer for bebop2 for this purpose and while copying files I accidentally deleted some libraries. The bebop2 now just fails to boot up. Is there a way I can flash it? I remember looking at your video where you mentioned a specific cable is needed. If I arrange that, is it possible to get the tools needed to flash the bebop?
Thank you for your time and help.

Kashish


(julienberaud) #8

pimpctl would not be enough, it is a control tool for the video processing pipeline, so it requires the video processing pipeline itself (based on gstreamer).
Building the pipeline from bottom up is a long task.

About deleting some libraries, if your not booting, you are in trouble and you may then require a USB cable with some trick.
Please refer to the ardupilot section of the wiki to use the uart cable and see what is preventing the bebop to boot.
You may want to open a new topic in here for that.
Julien


(Kashish Goyal) #9

For reflashing the bebop visit the following:


(Alex) #10

hi @julienberaud , thank you for your answer regarding streaming with pimpctl. So, if I understand correctly, it means that the dragon-prog is a monolithic beast doing both flying and streaming at the same time? Sound a bit risky. So these two function cannot be run/started separately using the original firmware? For example telling the dragon to only operate the camera, but leave piloting to ardupilot?
The bebop 2 filesystem has a file containing some streaming commands:

mt9v117_streaming()
case 0
    mt9v117_set_state 0x50 # Enter standby
case 1
    mt9v117_set_state 0x34 # Enter streaming

it’s in /usr/bin/mk3_cam2_common.sh
What is the functionality of this file?


(julienberaud) #11

It looks like a utility for vertical camera. I don’t know if or how it’s used. Normally vertical camera is programmed by the software.
So yes exactly, you got it, it is a bit risky :slight_smile:
The more recent parrot drones (anafi) handles different functionalities in different processes for safety.
Dragon is too monolithic to be told to do only one thing over two, or at least was last time I worked at parrot.
Thing is the camera processing requires some data from the autopilot, like you can see on my implementation of disco video streaming.

Regards,
Julien


(Alex) #12

My idea is to place a mencoder or ffmpeg compiled with gnueabihf, and start recording from v4l2 device under linux on Bebop2.

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?


(julienberaud) #13

@AlexP

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.

Regards,
Julien