NautiluX / slide

Simple slideshow showing random images from specified directory
MIT License
105 stars 19 forks source link

slide

Simple, lightweight slideshow selecting random images from specified directory. This slideshow is designed to compile and run also on a Raspberry Pi, for example to turn it into a digital picture frame.

Tested versions:

Screen background is filled with a scaled version of the image to prevent pure black background.

screenshot

This project is maintained by myself during my spare time. If you like and use it, consider buying me a coffee.

Usage

slide [-t rotation_seconds] [-T transition_seconds] [-h/--overlay-color overlay_color(#rrggbb)] [-a aspect] [-o background_opacity(0..255)] [-b blur_radius] [-p image_folder|-i imageFile,...] [-r] [-O overlay_string] [-v] [--verbose] [--stretch] [-c path_to_config_json]

Configuration file

Slide supports loading configuration from a JSON formatted file called slide.options.json. This file can be specified by the -c command line option, we will also attempt to read ~/.config/slide/slide.options.json and /etc/slide/slide.options.json in that order. The first file to load is used and its options will override command line parameters. The file format is:

{
   "path" : "/path/to/pictures",
   "aspect" : "m",
   "overlay" : "20|20|<filename>",
   "shuffle" : true,
   "recursive" : true,
   "sorted" : false,
   "stretch": false,
   "rotationSeconds" : 300,
   "opacity" : 200,
   "debug" : false,
   "scheduler" : [
      {
         "exclusive" : true,
         "path" : "/path/to/pictures/reddit_sync"
         "stretch" : true,
         "times": [
            {
                "start": "14:00",
                "end": "16:00"
            }
         ]
      },
      { 
         "exclusive" : true,
         "stretch" : false,
         "times": [
            {
                "start": "08:00",
                "end": "10:00"
            },
            {
                "start": "16:00",
                "end": "19:00"
            }
         ],
         "path" : "/path/to/pictures/show_peak_times/"
      },
      {
               "path" : "/path/to/pictures/always_show_1"
      },
      {
               "path" : "/path/to/pictures/always_show_2"
      }

}

Supported keys and values in the JSON configuration are:

Folder Options file

When using the default or recursive folder mode we support having per folder display options. The options are stored in a file called "options.json" in the images folder and support a subset of the applications configuration settings:

{
   "stretch": false,
   "aspect" : "m",
   "opacity" : 200,
   "blur" : 20,
   "times": [
      {
          "start": "08:00",
          "end": "10:00"
      },
      {
          "start": "17:00",
          "end": "19:00"
      }
   ]
}

See the Configuration File section for details of each setting.

Dependencies

Ubuntu/Raspbian:

sudo make install-deps-deb

Build

Install dependencies

make install-deps-deb

Build project

make

Install binaries

sudo make install

macOS

Prerequisite: brew

brew install qt5
brew install libexif
brew install libexif
make

Article on using slides

This article has more helpful ways that you could use this repo as a picture frame
https://opensource.com/article/19/2/wifi-picture-frame-raspberry-pi

Removing black border (Raspberry Pi)

if you find that you have a black border around your screen you can remove it by disabling overscan. This is done by editing /boot/config.txt and uncommenting disable_overscan=1