MP Gstreamer Pipeline

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.

Thanks

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

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

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

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%)

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 …

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

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

UDP

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

please provide a tlog for the udp issue.

also please provide the pipeline you plan on using as well

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

I’m trying to activate gstreamer pipeline on mission planner HUD (MP ver 1.3.52.10) 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=0.0.0.0 port=9010

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

gst-launch-1.0 -v tcpclientsrc host=192.168.2.100 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=192.168.2.100 port=9010 ! gdpdepay ! rtph264depay ! h264parse ! queue ! avdec_h264 ! videoconvert ! autovideosink sync=false ! avenc_mjpeg

…but nothing
what am I doing wrong?

thanks

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

eg

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

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.

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://192.168.1.168:8557/PSIA/Streaming/channels/2?videoCodecType=H.264 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.

what command are you using inside MP?

the example you provided means MP would have to request it

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.

I know this is two years old, but I’ve been trying to stream from my android phone to Mission Planner running on a Windows 10 laptop.

Android side (Samsung Galaxy S9+):
Using “USB Camera” app found on Google Play
For testing purposes, I have a logitech webcam plugged into a OTG adapter (the one supplied with phone)
Started IP camera server in app. Provides a rtsp:// address. In my case rtsp://192.168.1.33:8554/live
The default username is “admin” and the default password is “admin”. I believe the app allows you to change this (maybe in the pay version?)

Laptop side (Microsoft Surface Pro 4 running Windows 10):
Gstreamer installed in default location (c:/gstreamer)
Mission planner (1.3.70)
On MP HUD, go to Video -> Set GStreamer source.
Based on the server address provided above, I enter:

rtspsrc location=rtsp://admin:admin@192.168.1.33:8554/live caps=“application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264” latency=100 ! queue ! rtph264depay ! avdec_h264 ! videoconvert ! video/x-raw,format=BGRA ! appsink name=outsink

I’ve fiddled with adding/removing certain portions of the above, but this one works great (a little laggy, but tolerable).

I am not the one to ask if this doesn’t work for you (whoever comes down this path next). I was simply pattern matching. I have virtually no understanding of the commands in the GStreamer pipeline.

Mike

your gstreamer pipeline looks fine to me. i dont see any issues. and if it works even better