UxPlay Airplay 2 Add-On

  • Harvie's mention of integrating UxPlay into Kodi let me to investigate whether it might be possible to use a Docker container. https://github.com/xbmc/xbmc/issues/20838

    I've put something together quickly which works:

    GitHub - markst/plugin.audio.uxplay: UxPlay mirroring server for LibreELEC
    UxPlay mirroring server for LibreELEC. Contribute to markst/plugin.audio.uxplay development by creating an account on GitHub.
    github.com

    Not sure if this is something people would be interested in.

  • I wonder if it might be possible to create a binary with statically linked libraries included in the addon rather than building & running in a docker container?

    uxplay: error while loading shared libraries: libplist.so.3: cannot open shared object file: No such file or directory

    Edited once, last by markturnip (January 26, 2022 at 11:22 PM).

  • Okay managed to add binary dependencies to add-on /lib directory.

    But will need to figure out including GStreamer missing plug-in:

    Code
    raop_rtp_mirror video ntp = 1643282602201152, now = 1643282602113116, latency = -88036
    0:00:08.161108608  3140 0x5567be1ba800 WARN               decodebin gstdecodebin2.c:4719:gst_decode_bin_expose:<decodebin0> error: no suitable plugins found:
    
    Missing decoder: H.264 (video/x-h264, stream-format=(string)byte-stream)
    
    GStreamer error: Your GStreamer installation is missing a plug-in.
  • Ah I've just found this post: Integrate AirPlay mirroring with RPiPlay

    Which I is pretty relevant given UxPlay is a fork of RPiPlay.

    However I'm using LibreELEC-RR fork which does include gstreamer

    SupervisedThinking
    March 15, 2021 at 11:00 AM

    Haven't been able to get missing GStreamer plugins working when using binary rather than docker container.

    Wonder what the licensing implications are for including binary & dependencies in an add-on?

  • This would be great for libreelec to put it on par with most smart tvs which tend to include some kind of ariplay or casting. Thanks and good luck with the effort.

  • Okay I've managed to update add-on to only build UxPlay using Docker.

    It'll then fetch the necessary GStreamer plugins and extract them into add-on lib directory.

    I'm sure some further improvements can be made & the dependencies could all be replaced.

    The add-on works for me, but need to investigate the performance & whether it's using hardware-accelerated videosink plugin.

  • Hey markturnip ,

    Thanks for this. Sounds really great. Before I try with a fresh install, could you please elaborate a bit on the functionality?

    - is it possible to use the addon on any system with gstreamer installed (eg osmc)?

    - how does it handle kodis Exclusive access to framebuffer and soundcard? When using rpiplay on osmc in parallel to kodi , my system simply freezes when I connect an iPhone

    - how do you geht back into kodi once the connection with the streaming device is closed?

    EDIT:

    I saw in the code that you are using X11 so assume your setup is depending on a windows manager and won't work on LibreELEC without adding X11, right? I am using KODI on a RPi4 and would like to save that overhead at any cost.

    Edited once, last by DaCHack (October 30, 2022 at 1:42 PM).

  • - is it possible to use the addon on any system with gstreamer installed (eg osmc)

    Sorry for delay getting back to you DaCHack.

    The add-on is wrapped up inside a docker container, so wouldn't have access to OSMC's gstreamer library files.

    I guess an add-on could be made to use a binary executable of the UxPlay rather.

    I might be a bit out of depth answering your other questions. I haven't kept up with UxPlay's developments.

    Potentially X11 is optional. I doubt it accesses the framebuffer.

    As far as I recall when closing the connection the UxPlay instance disappears off the screen.

  • I tried to install the plugin on a vanilla LibreELEC 11.0 with embedded Airplay support deactivated.

    I saw a range of docker containers being started according to the notification boxes and my expectation was that I could see the appliance in my iPhone's screen mirroring or at least in the Airplay audio devices menu. But none of both is the case.

    So I am still trying to figure out how to troubleshoot (but also with limited time invest since my last post :) )

  • I tried to install the plugin on a vanilla LibreELEC 11.0 with embedded Airplay support deactivated.

    I saw a range of docker containers being started according to the notification boxes and my expectation was that I could see the appliance in my iPhone's screen mirroring or at least in the Airplay audio devices menu. But none of both is the case.

    So I am still trying to figure out how to troubleshoot (but also with limited time invest since my last post :) )

    Hey DaCHack , were you ever able to solve this? I’m running into the same behavior and I can’t find anything in the logs :(

    markturnip maybe we need to add something to autostart.sh or there’s some other step missing besides just installing the addon?

    I know this thread is old and the plugin is probably not under active maintenance anymore but I’ve been trying to get airplay to work on my pi running libreelec for ages and this is the most promising approach I've found… :) :)

  • Tanks Da Flex , I forgot to mention that I was looking to stream video (ideally screen mirroring) from my iPhone to Libreelec using airplay.

    I guess Snapcast doesn't apply to my use case as, if I understood correctly, it only works for audio streaming.