antimof / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.36k stars 186 forks source link

How to run on a raspberry pi #1

Open PauGri18 opened 4 years ago

PauGri18 commented 4 years ago

I've been following the development of this and rpiplay. I don't have much knowledge of gstreamer but I've compiled the project successfully on pi Stretch and ran it with the same parameters as rpiplay. I can connect to it with an iphone and ipad and connection information is shown in the terminal windows. Unlike rpiplay I am not getting the ios screen output. Can you provide some more information on execution?

antimof commented 4 years ago

Please send me the output of the following command: GST_DEBUG=3 ./uxplay

PauGri18 commented 4 years ago

Many thanks- I'll send this tonight when i get home.

I did some more testing yesterday with raspberry pi for pc on a VM (https://www.raspberrypi.org/downloads/raspberry-pi-desktop/). This works OK - just a little screen corruption probably due to the VM speed.

I also tried again on the pi, waiting a bit longer after starting uxplay before I tried to connect. It did connect but only got the initial picture (the 'blurred' background) and then it froze.

PauGri18 commented 4 years ago

0:00:01.740414057 886 0x15492a0 WARN kmssink gstkmssink.c:710:gst_kms_sink_start: error: Could not open DRM module (NULL) 0:00:01.740714213 886 0x15492a0 WARN kmssink gstkmssink.c:710:gst_kms_sink_start: error: reason: No such file or directory (2) 0:00:01.741070618 886 0x15492a0 WARN basesink gstbasesink.c:5265:gst_base_sink_change_state: error: Failed to start 0:00:01.760237459 886 0x1522580 FIXME default gstutils.c:3981:gst_pad_create_stream_id_internal: Creating random stream-id, consider implementing a deterministic way of creating a stream-id Initialized server socket(s) WARNING The program 'uxplay' uses the Apple Bonjour compatibility layer of Avahi. 0:00:01.820340996 886 0x15225b0 FIXME default gstutils.c:3981:gst_pad_create_stream_id_internal: Creating random stream-id, consider implementing a deterministic way of creating a stream-id WARNING Please fix your application to use the native API of Avahi! WARNING For more information see http://0pointer.de/blog/projects/avahi-compat.html Accepted IPv4 client on socket 24 Local: 192.168.1.68 Remote: 192.168.1.67 raop_ntp receive timeout Accepted IPv4 client on socket 26 Local: 192.168.1.68 Remote: 192.168.1.67 raop_rtp_mirror starting mirroring 0:00:14.926382098 886 0x74727290 WARN basetransform gstbasetransform.c:1355:gst_base_transform_setcaps: transform could not transform video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)730, height=(int)972, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)0/1 in anything we support 0:00:14.927525690 886 0x74727290 WARN basetransform gstbasetransform.c:1355:gst_base_transform_setcaps: transform could not transform video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)730, height=(int)972, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)0/1 in anything we support 0:00:14.927651783 886 0x74727290 WARN GST_PADS gstpad.c:4226:gst_pad_peer_query: could not send sticky events 0:00:14.927863397 886 0x74727290 WARN videodecoder gstvideodecoder.c:3772:gst_video_decoder_negotiate_pool: Subclass failed to decide allocation 0:00:14.953893089 886 0x74727290 WARN videodecoder gstvideodecoder.c:3772:gst_video_decoder_negotiate_pool: Subclass failed to decide allocation raop_rtp_mirror tcp socket closed Connection closed for socket 24 Destroying connection Connection closed for socket 26 Destroying connection

**Output from GST_DEBUG=3 ./uxplay Re-installed on latest buster OS on a pi2 with 256M memory split An ipad will connect and the mirroring is visible eventually. All actions appear after about a 30sec delay. Using htop you can see very high cpu usage

rpiplay on same hardware is much more responsive

antimof commented 4 years ago

It looks like a problem with glimagesink or decoder. Make sure you have gstreamer1.0-omx package installed. Also check if you have gstreamer opengl video sink with "gst-inspect-1.0 glimagesink". Uxplay is a general unix AirPlay server, therefore it's not optimized for Raspberry Pi.

Kraego commented 6 months ago

I‘ve created a script which installs all needed packages, builds uxplay from source and installs it, see: https://github.com/Kraego/uxPlay-debian-install