The manifold_cam project implements a functionality to get H.264 video stream from DJI Zenmuse X3 camera, decode and display the video in realtime. What's more, it also allows developers to transfer stream data to the mobile APP.
This package is specially designed for DJI Manifold. It doesn't support any other platform.
- GStreamer, FFmpeg, libusb (Install already)
- libdcam.so, Manifold camera driver library
Connect the 8-pins port on the camera to the CAM_IN port through the supplied 8-pins cable. Then, connect the CAM_OUT port to the 8-pins port on the N1 flight controller on the Matrice 100. Finally, connect the 10- pins port from the N1 flight controller to the 10 pins port on the gimbal camera.
$ sudo make install //install the libdcam.so to /usr/lib, you need to install the library first
$ make //compile to the obj file 'test'
$ make clean //remove the obj file and intermediate files
$ sudo ./test [-dgt]
Usage:
- -d --display display video stream
- -g --getbuffer get NV12 format buffer
- -t --transfer transfer video datas to RC
This program needs a graphical library from xinit&
, which won't be found when working with SSH.
To solve it:
-
(Optional) Disable lightdm for stability:
in
/etc/init/lightdm.conf
line 12:Modify
runlevel [!06]
torunlevel [!026]
-
Add xinit& to a startup script, such as:
echo -e '#!/bin/bash\nxinit&' > /home/ubuntu/pre_x3 chmod a+x /home/ubuntu/pre_x3
And add
/home/ubuntu/pre_x3
into/etc/rc.local
. Theubuntu
here is the current user, you may need to change it into yours. -
Add
export DISPLAY=:0
to your .bashrc or remember to set this environment variable to THE USER WHO WILL RUN THE CODE -
(Maybe a reboot at first) Run the ./test with paramters you want.
This part is contributed by @groundmelon, check his repository for more detail.
d
andg
cannot be used at the same time- DJI GO APP is not necessary. If the APP is running, developers should tap
enter camera view
and it's very important that the APP should always be in camera view mode. - The resolution of image frame is 1280 X 720, and the format is NV12
The resource of Manifold: