Servers by jDrones

MP Gstreamer Pipeline

(Max Messinger) #1

Is it possible to change the gstreamer pipeline that Mission Planner uses? I have a camera that streams video via RTSP but only allows port configuration. I have a pipeline that works, I just need a way to drop it into MP.


(Michael Oborne) #2

what is your pipeline? currently no its not possible to modify the pipeline.

(Max Messinger) #3

The pipeline is:
gst-launch-1.0 rtspsrc location=rtsp:// latency=60 ! queue ! rtph264depay ! avdec_h264

As I understand it, the pipeline in MP is expecting a broadcast on port 5600?

(Artem Bulashev) #4

This is defenately a future pro would need. The pipe you have now creates a lag and some how it accumilates latency over the time, even though we are on UDP protocol. If I launch my pipe over the CMD it has no problems, latency is below 300ms (I have 4g on copter and and on the ground) + image quality and consistancy is much better.

Is there any way to change default pipeline?

Also found a bug in Mission planner and UDP mavlink (Qgroundcontrol works perfect, but MissionPlanner drops the signal from 100% to 26-33%)

(Michael Oborne) #5

ive added a custom gstreamer pipeline to the hud right click > video > and enter the pipeline
the pipeline needs to end in

! avenc_mjpeg
eg …! rtph264depay ! avdec_h264 ! queue leaky=2 ! avenc_mjpeg …

(Michael Oborne) #6

what is the udp bug? I assume out of order packets or similar?

(Artem Bulashev) #7

As far as I saw latest version only has preparation for custom pipe, no? Wen I try to add my pipe, which works flawless in cmd, into right click HUD->gstream it does nothing


Yes, for some inexplicable reason with mission planner I get telemetry signal strength 26-33%, but with qgroundcontrol it works fine.

(Michael Oborne) #8

please provide a tlog for the udp issue.

also please provide the pipeline you plan on using as well

(Artem Bulashev) #9

I will do tomorrow. It seems like Pixhawk only gets that percentage of control packs and that is how signal strength is calculated.

(Antonio Policicchio) #10

I’m trying to activate gstreamer pipeline on mission planner HUD (MP ver but I’m not able to see anything (I’ve tested the link and it works: I can see streaming via gst-launch-1.0 on same laptop where MP is running).
Here is the pipeline on RPi (companion computer on the drone) collecting data from ad-hoc camera

raspivid -n -w 1280 -h 720 -rot 180 -b 10000000 -fps 30 -t 0 -ex antishake -awb auto -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=10 pt=96 ! gdppay ! tcpserversink host= port=9010

client side (tested on an other raspberry and on latop where MP is running

gst-launch-1.0 -v tcpclientsrc host= port=9010 ! gdpdepay ! rtph264depay ! h264parse ! queue ! avdec_h264 ! videoconvert ! autovideosink sync=false

In gstream I’ve copied the string above and added the optical cable

gst-launch-1.0 -v tcpclientsrc host= port=9010 ! gdpdepay ! rtph264depay ! h264parse ! queue ! avdec_h264 ! videoconvert ! autovideosink sync=false ! avenc_mjpeg

…but nothing
what am I doing wrong?


(Michael Oborne) #11

why do you have gdppay ? also output to port UDP 5600


gst-launch-1.0.exe videotestsrc pattern=ball ! queue ! x264enc ! rtph264pay ! queue ! udpsink host= port=5600

(Antonio Policicchio) #12

Hi Michael,
which is the string to use on MP?

I’m using tcp (port 9010 is only a test) instead of udp because companion does not know haead the IP of client to send the video to.

(Pedro Henrique Silva) #13

Did you solve your problem??

I’m using MP 1.3.56, when I run cmd with the following line:

gst-launch-1.0 rtspsrc location=rtsp:// latency=50 ! queue ! rtph264depay ! avdec_h264 ! autovideosink

I have my video streaming perfectly.

But I can’t run it inside MP, even when I use the modifications that were suggested here.

(Michael Oborne) #14

what command are you using inside MP?

the example you provided means MP would have to request it

(ijustwant) #15

I need to connect a secondary monitor. Can i use a Raspberry pi running gstreamer to connect to MP’s RTSP server? Tried with the same rtsp server IP as in the hud config, but no luck.