Giter Site home page Giter Site logo

svpcom / wfb-ng-osd Goto Github PK

View Code? Open in Web Editor NEW
67.0 7.0 22.0 2.02 MB

Mavlink OSD and video player for wfb-ng

Home Page: https://github.com/svpcom/wfb-ng

License: GNU General Public License v3.0

Makefile 0.44% C 99.02% Shell 0.32% Python 0.22%
fpv osd raspberry-pi video x11 gstreamer

wfb-ng-osd's Introduction

This project started from https://github.com/TobiasBales/PlayuavOSD.git

Supported platforms:

  • Raspberry Pi 0-3 -- use hardware overlay mode (OpenVG)
  • Any other Linux with X11 or Wayland -- use GStreamer OpenGL mixer

Supported autopilots:

  • PX4 -- full support
  • Ardupilot -- should work, but not tested
  • any mavlink-based -- should work with small fixes

Building:

  1. Build for Linux (X11 or Wayland) (native build):
  • apt-get install gstreamer1.0-tools libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly libgstreamer-plugins-base1.0-dev
  • make osd
  1. Build for Raspberry PI 0-3 (OpenVG) (native build):
  • make osd mode=rpi

Running:

Default mavlink port is UDP 14551. Default RTP video port is UDP 5600.

  • Run ./osd
  • You should got screen like this: gstreamer

Screenshots:

px4

wfb-ng-osd's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wfb-ng-osd's Issues

Ubuntu X11 NODM Xsession Errors

I use nodm as display manager for X11 Mode.

I got follow errors and seems the problem of autovideosink on KMS.

I am running Armbian 22.11.1 Jammy with Linux 5.15.80-sunxi64 on Pine A64 Plus.

Xsession: X session started for pine at Thu Dec 29 09:40:48 PM HKT 2022
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
Use: mavlink_port=14551, rtp_port=5600, codec=h264, rtp_jitter=5, use_vaapi=0, use_xv=0, screen_width=1920
GST pipeline: udpsrc do-timestamp=true port=5600 caps="application/x-rtp, media=(string)video" ! rtpjitterbuffer latency
=5 ! rtph264depay ! avdec_h264 ! videoscale method=0 ! video/x-raw,width=1920,height=1080 ! videoconvert ! cairooverlay
name=overlay ! videoconvert ! autovideosink sync=false
gst autovideosink0-actual-sink-kms: NULL -> READY
gst autovideosink0: NULL -> READY
gst videoconvert1: NULL -> READY
gst overlay: NULL -> READY
gst videoconvert0: NULL -> READY
gst capsfilter0: NULL -> READY
gst videoscale0: NULL -> READY
gst avdec_h264-0: NULL -> READY
gst rtph264depay0: NULL -> READY
gst rtpjitterbuffer0: NULL -> READY
gst udpsrc0: NULL -> READY
gst pipeline0: NULL -> READY
gst videoconvert1: READY -> PAUSED
gst overlay: READY -> PAUSED
gst videoconvert0: READY -> PAUSED
gst capsfilter0: READY -> PAUSED
gst videoscale0: READY -> PAUSED
gst avdec_h264-0: READY -> PAUSED
gst rtph264depay0: READY -> PAUSED
gst rtpjitterbuffer0: READY -> PAUSED
gst udpsrc0: READY -> PAUSED
gst pipeline0: READY -> PAUSED
gst videoconvert1: PAUSED -> PLAYING
gst overlay: PAUSED -> PLAYING
gst videoconvert0: PAUSED -> PLAYING
gst capsfilter0: PAUSED -> PLAYING
gst videoscale0: PAUSED -> PLAYING
gst avdec_h264-0: PAUSED -> PLAYING
gst rtph264depay0: PAUSED -> PLAYING
gst rtpjitterbuffer0: PAUSED -> PLAYING
gst udpsrc0: PAUSED -> PLAYING

** (osd:161860): CRITICAL **: 21:40:51.204: Got ERROR: GStreamer encountered a general resource error. (../sys/kms/gstkm
ssink.c(1713): gst_kms_sink_show_frame (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosi
nk0-actual-sink-kms:
drmModeSetPlane failed: Permission denied (13))
gst thread exited

Questions on usage..

Hey svpcom! Do you have any tips or examples on how to get your osd up and running? Tried to run it with no additional commands and did not see anything come up on usage. Appreciated.. Thanks!

Issue on running make build_rpi

I am having issue on running the make command with build_rpi. The issue is generating with docker file. I am trying to compile it on raspberry pi 3 b+ with raspbian buster lite and also tried raspberry pi 4 b (2gb) model.

first i was getting issue
standard_init_linux.go:207 exec user process caused "exec format error"

Then after some research i find out that it need qemu packages so I installed those packages with this command.
sudo apt install binfmt-support qemu qemu-user-static qemu-system qemu-system-arm

Now i am getting a different error.
Unable to reserve 0xf7000000 bytes of virtual address space for use as guest address space (check your virtual memory ulimit setting or reserve less using -R option)

I can't seem to find the solution of it.

required packages

I had a list somewhere of the packages required to build the OSD but i am having issues now. Is it possible to get the required package list to build the OSD? I would be glad to help document the process since I see you are looking to add some documentation in the future...?

This is the error message I get when running make

cc -c -o osdconfig.o osdconfig.c -g -Wall -std=gnu99 -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
cc -c -o osdvar.o osdvar.c -g -Wall -std=gnu99 -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
cc -c -o fonts.o fonts.c -g -Wall -std=gnu99 -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
cc -c -o font_outlined8x14.o font_outlined8x14.c -g -Wall -std=gnu99 -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
cc -c -o font_outlined8x8.o font_outlined8x8.c -g -Wall -std=gnu99 -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
cc -c -o oglinit.o oglinit.c -g -Wall -std=gnu99 -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
cc -o osd main.o osdrender.o osdmavlink.o graphengine.o UAVObj.o m2dlib.o math3d.o osdconfig.o osdvar.o fonts.o font_outlined8x14.o font_outlined8x8.o oglinit.o -L/opt/vc/lib/ -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm
/usr/bin/ld: oglinit.o: undefined reference to symbol 'glLoadIdentity'
//opt/vc/lib/libbrcmGLESv2.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:10: recipe for target 'osd' failed
make: *** [osd] Error 1

trying things out on stretch lite.

fatal error

fatal error: VG/openvg.h: No such file or directory

Where is your Dockerfile?

Where is your Dockerfile?
Many packages are no longer supported.

make build_rpi (you need linux machine with docker installed)

make build_rpi
make: *** No rule to make target 'build_rpi'. Stop.

Close after first frame

After I see the first frame the OSD player just closes. If the camera is off then I see OSD with black background just fine.

GS System: Ubuntu linux 6.4.6-76060406-generic kernel
AIR: latest stable openIPC with venc in RTP mode (venc -m rtp)

./osd -w 1366
Use: mavlink_port=14551, rtp_port=5600, rtsp_url=none, codec=h264, rtp_jitter=5, osd_render=0, screen_width=1366
GST pipeline: udpsrc port=5600 caps="application/x-rtp,media=(string)video,  clock-rate=(int)90000, encoding-name=(string)H264" ! rtpjitterbuffer latency=5 ! rtph264depay ! h264parse config-interval=1 disable-passthrough=true ! avdec_h264 ! glupload ! glcolorconvert ! glvideomixerelement background=black name=osd sink_0::width=1366 sink_0::height=768 sink_1::width=1366 sink_1::height=768 ! glcolorconvert ! gldownload ! autovideosink sync=false videotestsrc pattern=solid-color foreground-color=0x00000000 is-live=true ! video/x-raw,width=640,height=360 ! cairooverlay name=overlay ! glupload ! glcolorconvert ! osd. 
gst autovideosink0-actual-sink-xvimage: NULL -> READY
gst autovideosink0: NULL -> READY
gst gldownloadelement0: NULL -> READY
gst glcolorconvertelement1: NULL -> READY
gst osd: NULL -> READY
gst glcolorconvertelement0: NULL -> READY
gst glcolorconvertelement2: NULL -> READY
gst gluploadelement0: NULL -> READY
gst gluploadelement1: NULL -> READY
gst avdec_h264-0: NULL -> READY
gst overlay: NULL -> READY
gst h264parse0: NULL -> READY
gst capsfilter0: NULL -> READY
gst rtph264depay0: NULL -> READY
gst videotestsrc0: NULL -> READY
gst rtpjitterbuffer0: NULL -> READY
gst udpsrc0: NULL -> READY
gst pipeline0: NULL -> READY
gst gldownloadelement0: READY -> PAUSED
gst glcolorconvertelement1: READY -> PAUSED
gst osd: READY -> PAUSED
gst glcolorconvertelement0: READY -> PAUSED
gst glcolorconvertelement2: READY -> PAUSED
gst gluploadelement0: READY -> PAUSED
gst gluploadelement1: READY -> PAUSED
gst avdec_h264-0: READY -> PAUSED
gst overlay: READY -> PAUSED
gst h264parse0: READY -> PAUSED
gst capsfilter0: READY -> PAUSED
gst rtph264depay0: READY -> PAUSED
gst videotestsrc0: READY -> PAUSED
gst rtpjitterbuffer0: READY -> PAUSED
gst udpsrc0: READY -> PAUSED
gst pipeline0: READY -> PAUSED
gst gldownloadelement0: PAUSED -> PLAYING
gst glcolorconvertelement1: PAUSED -> PLAYING
gst osd: PAUSED -> PLAYING
gst glcolorconvertelement0: PAUSED -> PLAYING
gst glcolorconvertelement2: PAUSED -> PLAYING
gst gluploadelement0: PAUSED -> PLAYING
gst gluploadelement1: PAUSED -> PLAYING
gst avdec_h264-0: PAUSED -> PLAYING
gst overlay: PAUSED -> PLAYING
gst h264parse0: PAUSED -> PLAYING
gst capsfilter0: PAUSED -> PLAYING
gst rtph264depay0: PAUSED -> PLAYING
gst videotestsrc0: PAUSED -> PLAYING
gst rtpjitterbuffer0: PAUSED -> PLAYING
gst udpsrc0: PAUSED -> PLAYING
gst autovideosink0-actual-sink-xvimage: READY -> PAUSED
gst autovideosink0: READY -> PAUSED
gst autovideosink0-actual-sink-xvimage: PAUSED -> PLAYING
gst autovideosink0: PAUSED -> PLAYING
gst pipeline0: PAUSED -> PLAYING
gst thread exited

Mavlink repo needed

Hi! What I do:
download release version from here wget https://github.com/svpcom/wfb-ng-osd/archive/refs/tags/wfb-ng-osd-23.08.zip
or git clone this repo
unzip it and cd inside
make osd

In file included from main.c:41:

osdrender.h:20:10: fatal error: mavlink/ardupilotmega/mavlink.h: No such file or directory
   20 | #include "mavlink/ardupilotmega/mavlink.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [Makefile:25: main.o] Error 1

But my ./mavlink/ folder is empty. Which repository I put there?

Thanks a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.