Synology Photos full-screen slideshow for Raspberry Pi.
Features speed control, fade-transition effect and blurry background fill.
I wrote this code for a DIY digital photo frame project using Raspberry Pi connected to a monitor (runs great on Pi Zero 2). The goal was to fetch photos directly from my Synology NAS over LAN.
Why not use Synology Photos browser client directly? There are two reasons. First, current version of Synology Photos (1.3.3 at the time of writing) does not allow slideshow speed adjustments, and changes photo every 3 or 4 seconds - way too fast for a photo frame. Second, running a full www browser is much more resource demanding than a simple console app, which matters when using Raspberry Pi, especially in its Zero variant.
Since I am running all of this over local area network at home only, security is not a priority for me. You should take extra steps which are out of scope of this guide if you plan to access your NAS over Internet, or if you're running this setup in an un-trusted LAN (e.g. in an office or a dorm).
Assuming Synology Photos package is installed on DSM
The assumption is that you are starting with a fresh installation of Raspberry Pi OS Lite, network has been set up (so you can access the Synology NAS) and you have command line access to the Pi.
Update the system and install the OS packages needed to run the app
sudo -- sh -c ' \
apt update && \
apt upgrade -y && \
apt install -y libgl1 libegl1
Releases contains pre-built binary for aarch64 Linux target, which should work on Raspberry Pi 3 and up, as well as Zero 2 (assuming 64bit version of Raspbian OS is installed). For other platforms you must build the project yourself - see Building From Source.
Download the syno-photo-frame
binary from Releases.
Display help message:
./syno-photo-frame --help
Run the app:
./syno-photo-frame {sharing link to Synology Photos album}
If everything works as expected, press Ctrl-C to kill the app.
Install Rust if you have not already.
Install build dependencies:
sudo -- sh -c ' \
apt update && \
apt upgrade -y && \
apt install -y \
libsdl2-dev \
libdrm-dev \
libgbm-dev \
libssl-dev \
cmake
Build the project:
cargo build --release
The binary is located at target/release/syno-photo-frame
.
For targets other than aarch64-unknown-linux-gnu
, only libsdl2-dev
and libssl-dev
are needed as it uses dynamically linked libs.
100 MB swap file may be too small when running on low memory systems such as Pi Zero. See Increasing Swap on a Raspberry Pi.
So that the slideshow starts automatically on boot, you can add it to crontab:
crontab -e
Add something like this at the end of crontab:
@reboot sleep 5 && /home/pi/syno-photo-frame https://{share_link} >> /tmp/syno-photo-frame.log 2>&1
Remember to replace your share link with a real one. Short sleep is required to not start before some services (like network) are started - try to increase it if errors occur. Error messages get redirected to a log file.
For other (untested) alternatives see e.g. this article.
A proper digital photo frame doesn't run 24/7. Shutdown can be scheduled in software only, but for startup you'll need a hardware solution, e.g. for Raspberry Pi Zero I'm using Witty Pi 3 Mini.
By default photos are displayed in the order of shooting date. If the
album is very large, and the startup-shutdown schedule is short,
potentially the slideshow might never reach some of the later photos
in the album. The --order random-start
option solves the problem by
starting the slideshow at randomly selected photo. Adding this option
to the startup schedule will start at a different photo every time.
For my digital photo frame project I attached a light sensor to Pi's GPIO to adjust monitor's brightness automatically depending on ambient light. TSL2591 is an example of such sensor. Check out my auto-brightness-rpi-tsl2591 project to add automatic brightness control to your digital photo frame.