CS Player installation on Raspberry Pi
To play media content on a screen, install CS Player on the Raspberry Pi that drives the screen and connect the player to your CS Play account.
CS Player ships as APT packages for two Raspberry Pi device families:
| Devices | OS | APT repository |
|---|---|---|
Raspberry Pi 3 and newer |
Raspberry Pi OS Bookworm (32-bit) |
|
Raspberry Pi Zero / Zero W / Pi 1 |
Raspberry Pi OS (Legacy) Buster |
|
| The Raspberry Pi package runs as a systemd service and renders directly to the display (EGLFS), so no desktop environment is required and Raspberry Pi OS Lite is sufficient. |
Installing on Raspberry Pi 3 and newer
Flash Raspberry Pi OS Bookworm (32-bit) to the SD card, boot the device, then add the CS Play APT repository and install the player:
curl -fsSL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x6f999c2f1bfe311dda96f9bfd9e1deff2437df62' \
| sudo gpg --dearmor -o /usr/share/keyrings/cityscreen.gpg
echo "deb [signed-by=/usr/share/keyrings/cityscreen.gpg] https://packages.cityscreen.cloud/repository/bookworm-releases bookworm main" \
| sudo tee /etc/apt/sources.list.d/cityscreen.list
sudo apt update
sudo apt install -y cityscreen-player
Installing on Raspberry Pi Zero and Pi 1
Single-core devices use the legacy Buster repository:
curl -fsSL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x6f999c2f1bfe311dda96f9bfd9e1deff2437df62' \
| sudo gpg --dearmor -o /usr/share/keyrings/cityscreen.gpg
echo "deb [signed-by=/usr/share/keyrings/cityscreen.gpg] https://packages.cityscreen.cloud/repository/raspberry-zero-buster buster main" \
| sudo tee /etc/apt/sources.list.d/cityscreen.list
sudo apt update
sudo apt install -y cityscreen-player
After the installation completes on Buster, enable the legacy GL driver and reserve GPU memory for video decoding:
sudo raspi-config
# Advanced Options -> GL Driver -> Legacy
# Performance Options -> GPU Memory -> 256
Then create symbolic links to the Broadcom video libraries:
sudo ln -s /opt/vc/lib/libbrcmEGL.so /opt/vc/lib/libEGL.so
sudo ln -s /opt/vc/lib/libbrcmEGL.so /opt/vc/lib/libEGL.so.1
sudo ln -s /opt/vc/lib/libbrcmGLESv2.so /opt/vc/lib/libGLESv2.so
sudo ln -s /opt/vc/lib/libbrcmGLESv2.so /opt/vc/lib/libGLESv2.so.2
Reboot the device after changing these settings.
Installing from a ready-made image
As an alternative to the APT installation, you can use a ready-made SD card image with CS Player pre-installed: raspberry.img. If the link is unavailable, contact CS Play support to receive the image.
Flash the image to the SD card (for example, with Raspberry Pi Imager or Etcher), insert the card into the device and power it on — then proceed to connecting the player to your account.
Connecting the player to your account
On Raspberry Pi the player reads the connection PIN from
/opt/cityscreen/player/credentials.env.
-
Go to your CS Play account.
-
Select a screen (or create a new one) on the Screens page.
-
On the Parameters tab find PIN generation and click Generate. A 6-digit PIN will appear.
-
Put the PIN into the credentials file on the device:
/opt/cityscreen/player/credentials.env--password=123456 -
Enable and start the player service:
sudo systemctl enable --now cityscreen-player
When the player starts, it connects to your account and is ready to play media content.
The service starts automatically on every boot. Additional player command-line options can be
set in /opt/cityscreen/player/args.env.
| The PIN connects a player to your account. Before you give a PIN to anyone who asks for it by phone or message, confirm who is asking and that the player is being installed for you. |
Rotating the screen
To rotate the picture, add an environment override to the player service:
sudo systemctl edit cityscreen-player
Set the rotation angle (90, 180 or 270):
[Service]
Environment=QT_QPA_EGLFS_ROTATION=90
Then restart the service:
sudo systemctl restart cityscreen-player
Forcing the output resolution
By default the player window matches the video resolution: when the advertisement resolution is lower than the physical screen resolution, the video is shown in the top-left corner; when it is higher, only a part of the video is visible.
To force a fixed output resolution, create an EGLFS configuration file and pass its path to the
player via the QT_QPA_EGLFS_KMS_CONFIG environment variable:
cat > /home/pi/EGLConfig.json <<'EOF'
{
"outputs": [
{
"name": "HDMI1",
"mode": "1280x720"
}
]
}
EOF
Replace name and mode with the values matching your display, then add the variable to the
service the same way as the rotation override (sudo systemctl edit cityscreen-player):
[Service]
Environment=QT_QPA_EGLFS_KMS_CONFIG=/home/pi/EGLConfig.json
Restart the service afterwards.
Place the configuration file outside /opt.
|