Integrate AirPlay mirroring

Thanks guys! Still missing something I’m guessing?

And yes, this is just the OSMC distro I got from the site

osmc@osmc:~/RPiPlay/build$ cmake ..
You have called ADD_LIBRARY for library ilclient without any source files. This typically indicates a problem with your CMakeLists.txt file
-- Configuring done
CMake Error: Cannot determine link language for target "ilclient".
CMake Error: CMake can not determine linker language for target: ilclient
-- Generating done
-- Build files have been written to: /home/osmc/RPiPlay/build

So Im gussing ilclient and Broadcom’s OpenMAX stack as present in /opt/vc in Raspbian. I need to get this installed?

Will this break anything?

Yeah OSMC, just isn’t going to work sadly.


Did you install rbp-userland-dev-osmc? This will give you the OpenMAX headers.


SO its doable? Mate! you’re a bloody lifesaver!

I had to go to full Raspbian with everything tacked on. Its seems slow, and LIRC is hard to get working/ complicated :frowning:

Ill give this a go tonight! Thanks Sam, appreciate it!

Yes, it will work.

OK, So we seem part way there.

Im getting an error for

CMake Error: Cannot determine link language for target "ilclient".
CMake Error: CMake can not determine linker language for target: ilclient

Acording to this Error with cmake: library ilclient without any source files · Issue #10 · FD-/RPiPlay · GitHub

I need to download the libraries and path them manually. Is that right, or is that an easier way?

From the link;

RPiPlay’s build system requires the VideoCore libraries that Raspbian provides at the paths

  • /opt/vc/include/
  • /opt/vc/include/interface/vcos/pthreads
  • /opt/vc/include/interface/vmcs_host/linux
  • /opt/vc/src/hello_pi/libs/ilclient

Building fails with the error above if the OS you use doesn’t provide these libraries. You could try to download them from the Raspbian firmware repo to the locations listed above. Alternatively, you could copy them into any other location and modify the includes in renderers/CMakeLists.txt accordingly.

OK, basically copy whats in SRC to your home drive using win-scp (though im sure there are many ways) then use sudo mv /home/osmc/src /opt/vc/ to move the files.

Got it installed for me; but its not running at start up;

if [ "x${SSH_TTY}" = "x" ]; then
  /home/osmc/RPiPlay/build/rpiplay -n Bedroom -b auto -a hdmi  # Or wherever the rpiplay binary is located

./rpiplay works, but startup does not. Is there another way to run it?

Thanks mate! worked a treat!

1 Like

Hi. Can you give some general instructions on how to install it?

Thanks :slight_smile:

I just followed this exactly from; GitHub - FD-/RPiPlay: An open-source AirPlay mirroring server for the Raspberry Pi. Supports iOS 9 and up.

git clone cd RPiPlay

For building on a fresh Raspbian Stretch or Buster install, these steps should be run:

sudo apt-get install cmake sudo apt-get install libavahi-compat-libdnssd-dev sudo apt-get install libssl-dev mkdir build cd build cmake … make

Dont follow this this the formatting is wrong, get it from the link

ok…I’m in a stage where after manual running the script it works. Can you advise how to add it to the autostart after a reboot?

Just follow these instructions from Tom

Finally it works. Thanks :wink:

Thank you so much for the RPiPlay server. I dread the day that Apple breaks it but for now, it is one valuable piece of the cord-cutting puzzle I am navigating. I finally got it up and running under OSMC. (It failed miserably under Rasbpian.) I found the instructions in this thread along with the README from RPiPlay helpful but inadequate. It assumed a fair bit of knowledge I did not (yet) have. I am very comfortable but rusty with UNIX (yes, that dates me) and command lines, but have had no experience with git/apt-get/Linux distros, etc. I have tried to carefully document my steps for installing RPiPlay on a fresh OSMC system. Would here in this thread be a suitable place to post those directions or is there a better place?

Finally, the last step I have not achieved is getting rpiplay to run upon startup. From the link posted here, it looks like I should use the service approach. I will confess the description in “Running Scripts on Startup and Shutdown” has me completely baffled. I don’t understand any of the terminology or follow what is going on in the example. Is there a tutorial out there applying the concept to rpiplay specifically or that explains what is going on in each step?

I don’t know if it is relevant to this post, but I am running a Raspberry Pi Model B (grep Revision /proc/cpuinfo returns 000f) with OSMC.

I would be very interested in your step by step manual.


Here are the steps I went through, to the best of my knowledge. Be sure you understand the commands used before blindly typing them in. My UNIX knowledge is rusty. There are probably more efficient ways to step through this process. I am open to feedback on the steps.

I wrote this like a script, but it is not meant to be run like one.
This was for a Raspberry Pi B. My laptop is a MacBook running Mojave (10.14.6).

# Connect to Raspberry Pi from Laptop
ssh osmc@<IP Address>

# Set Password (Default is osmc) This is just good practice.
passwd osmc

# Make sure apt-get database is up-to-date
sudo apt-get update

# Essential tools for compiling, missing from OSMC
sudo apt-get install build-essential
sudo apt-get install git

# OpenMAX Headers
# This populates most of /opt/vc libraries
sudo apt-get install rbp-userland-dev-osmc

# Create a directory for downloading stuff, for good housekeeping
mkdir Downloads
cd Downloads

# Get missing /opt/vc libraries from GitHub (those in /opt/vc/src)
# It is large, over 1GB for the full repository.
# I couldn’t figure out how to only download the part I needed without
# doing it one file at a time.

git clone

# Run from the Pi I kept getting a broken pipe and it wouldn’t complete.
# So I ran the above command on my laptop
# Note, you may get an error of paths colliding in firmware/modules
# due to case-sensitive/non-case-sensitive issues.
# These can be ignored since we don’t need that directory
# Move the necessary files to Raspberry Pi from the Laptop

scp -r firmware/opt/ osmc@:~/Downloads/

# However you get it onto the Raspberry Pi, copy files to /opt/vc.
# This probably could have been done with the scp step directly, but I felt
# better doing the final move on the Pi itself.

cd firmware/opt/vc
sudo cp -r src /opt/vc/

# Install packages for compiling
sudo apt-get install cmake
sudo apt-get install libavahi-compat-libdnssd-dev
sudo apt-get install libssl-dev

# Download RPiPlay from GitHub
cd ~/Downloads
git clone
cd RPiPlay

# Build it
mkdir build
cd build
cmake …

# The executable is found in ~/Downloads/RPiPlay/build
# To run from that directory

# To run from anywhere

# To quit rpiplay on the Pi, type Ctrl-C.

# The Raspberry Pi will show up in AirPlay lists as “RPiPlay”
# The Raspberry Pi screen will go black when you run it with no arguments.
# I assumed that made Kodi unusable at the same time so I dug further.

# Help Information
./Downloads/RPiPlay/build/rpiplay -h
RPiPlay 1.2: An open-source AirPlay mirroring server for Raspberry Pi
Usage: ./Downloads/RPiPlay/build/rpiplay [-b (on|auto|off)] [-n name] [-a (hdmi|analog|off)]
-n name Specify the network name of the AirPlay server
-b (on|auto|off) Show black background always, only during active connection, or never
-a (hdmi|analog|off) Set audio output device
-l Enable low-latency mode (disables render clock)
-d Enable debug logging
-v/-h Displays this help and version information

# To make it easier to run
# I created a bin directory in my home directory and copied rpiplay to it
mkdir bin
cd Downloads/RPiPlay/build
cp rpiplay ~/bin

# Then I added that directory (and current directory) to my path in .bashrc
export PATH=.:${HOME}/bin:${PATH}

# Create .bash_aliases (e.g. with vi)
# Not surprisingly emacs is not installed. I didn’t look very hard for any other editors.
# Add the following line
# This gives a name other than RPiPlay to the Raspberry Pi,
# Allows you to use Kodi when not connected via AirPlay
# Ensures sound goes through the HDMI cable.

alias rpiplay=‘rpiplay -n <Server_Name> -b auto -a hdmi’

# Final Step, run rpiplay on start up

1 Like

This post would made a good how-to if you would like to make a new thread for it. You can find information on how to format for a how-to here and for your first step on accessing the terminal you could just replace that with a link to this thread.

@darwindesign, Thanks for the pointer to turning this into a How-to. I think that is a great place for this. A couple of questions I have before doing that are as follows:

  1. Is there an easier way to get just the /opt/vc/src directory tree from the firmware repository than the way I did it?

  2. What is the best default text editor on OSMC? While it was fun to remind myself how to use vi, I don’t know if there is something a little more user-friendly.

  3. I assume all the apt-get commands can be lumped together instead of being separated by the git of RPiPlay. Did I get the process for making sure apt-get is up-to-date correct? Somewhere I saw an apt-get upgrade command and wonder if that should be included.

  4. Are there any community conventions for naming the directory for downloads or a user’s bin directory? Should rpiplay simply be copied to (or linked from) somewhere such as /usr/local/bin?


  1. I’m a linux noob but one of the other mods should see this and have an answer.
  2. Normally we just have people use nano as it is already installed. Probably not the most user friendly thing out there but that hasn’t been a problem that i’ve noticed so far on this forum.
  3. I don’t see an issue with what you did. That is the correct command to update the apt-get database. The upgrade command is only for updating programs already installed and OSMC already runs that on a schedule. There should be no need to include that. If manually running the upgrade command though it should be a dist-upgrade and not just upgrade though.
  4. Not sure. Another mod should be able to answer that.