mavlink / qgroundcontrol

Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
http://qgroundcontrol.io
3.34k stars 3.65k forks source link

lack of support for Raspberry PI cam #5721

Open Mocart96 opened 7 years ago

Mocart96 commented 7 years ago

For video streaming from the Raspberry PI ( pi2, pi3, pi0w ) you can use PI cam, the best solution for low latency streaming. In the case of Pi cam great results you can achive running following gstreamer pipeline from pi shell: raspivid -n -w 864 -h 480 -b 750000 -fps 25 -t 0 -o - | \ gst-launch-1.0 --gst-debug-level=0 -v \ fdsrc ! \ h264parse ! \ rtph264pay config-interval=10 pt=96 ! \ udpsink host=xxx.xxx.xxx.xxx port=5600 (resolution, fps, port, destination can be defined by user) this pipeline can be well decoded (with low latency ) on the ground station side with a following function: c:/gstreamer/1.0/x86_64/bin/gst-launch-1.0.exe -e -v udpsrc port=5600 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false Can you implement option to input custom streamer pipeline under UDP option to allow input following command for Raspberry users. udpsrc port=5600 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false I did test it with different android sofware and it works perfect. With the current decoding instraction I can see video feed working but very often it shows pixels on the screen. My suggestion is related to android application of course.

baomin commented 7 years ago

good !!!

baomin commented 6 years ago

raspivid -n -w 864 -h 480 -b 750000 -fps 25 -t 0 -o - | gst-launch-1.0 --gst-debug-level=0 -v fdsrc ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=xxx.xxx.xxx.xxx port=5600

sinamics commented 5 years ago

Hi Would appreciate if we could get the option to add custom pipeline. In some cases when streaming on lower bandwidth or through several layers of NAT firewalls using NAT traversal, the video image gets greyed out. Mission Planner also had this issue until Michael Osborne added the option for custom commands. The grey overlay issue can be solved by adding rtpjitterbuffer to the pipeline.

This element reorders and removes duplicate RTP packets as they are received from a network source

image

FYI For Mission planner this can be solved by adding this line as gstreamer source. udpsrc port=5600 caps = "application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96" ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! videoconvert ! video/x-raw,format=BGRA ! appsink name=outsink

More info on rtpjitterbuffer can be found here. https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-rtpjitterbuffer.html

Thank you in advance.

ask21on commented 5 years ago

Is there any news about this? It seems my video suffer from this issue too...

GiliardiSantos commented 4 years ago

+1

GlidLov commented 3 years ago

+1