]> pere.pagekite.me Git - homepage.git/blob - blog/data/2018-07-31-exif-photo-rss.txt
Generated.
[homepage.git] / blog / data / 2018-07-31-exif-photo-rss.txt
1 Title: Sharing images with friends and family using RSS and EXIF/XMP metadata
2 Tags: english, debian
3 Date: 2018-07-31 23:30
4
5 <p>For a while now, I have looked for a sensible way to share images
6 with my family using a self hosted solution, as it is unacceptable to
7 place images from my personal life under the control of strangers
8 working for data hoarders like Google or Dropbox. The last few days I
9 have drafted an approach that might work out, and I would like to
10 share it with you. I would like to publish images on a server under
11 my control, and point some Internet connected display units using some
12 free and open standard to the images I published. As my primary
13 language is not limited to ASCII, I need to store metadata using
14 UTF-8. Many years ago, I hoped to find a digital photo frame capable
15 of reading a RSS feed with image references (aka using the
16 &lt;enclosure&gt; RSS tag), but was unable to find a current supplier
17 of such frames. In the end I gave up that approach.</p>
18
19 <p>Some months ago, I discovered that
20 <a href="https://www.jwz.org/xscreensaver/">XScreensaver</a> is able to
21 read images from a RSS feed, and used it to set up a screen saver on
22 my home info screen, showing images from the Daily images feed from
23 NASA. This proved to work well. More recently I discovered that
24 <a href="https://kodi.tv">Kodi</a> (both using
25 <a href="https://www.openelec.tv/">OpenELEC</a> and
26 <a href="https://libreelec.tv">LibreELEC</a>) provide the
27 <a href="https://github.com/grinsted/script.screensaver.feedreader">Feedreader</a>
28 screen saver capable of reading a RSS feed with images and news. For
29 fun, I used it this summer to test Kodi on my parents TV by hooking up
30 a Raspberry PI unit with LibreELEC, and wanted to provide them with a
31 screen saver showing selected pictures from my selection.</p>
32
33 <p>Armed with motivation and a test photo frame, I set out to generate
34 a RSS feed for the Kodi instance. I adjusted my <a
35 href="https://freedombox.org/">Freedombox</a> instance, created
36 /var/www/html/privatepictures/, wrote a small Perl script to extract
37 title and description metadata from the photo files and generate the
38 RSS file. I ended up using Perl instead of python, as the
39 libimage-exiftool-perl Debian package seemed to handle the EXIF/XMP
40 tags I ended up using, while python3-exif did not. The relevant EXIF
41 tags only support ASCII, so I had to find better alternatives. XMP
42 seem to have the support I need.</p>
43
44 <p>I am a bit unsure which EXIF/XMP tags to use, as I would like to
45 use tags that can be easily added/updated using normal free software
46 photo managing software. I ended up using the tags set using this
47 exiftool command, as these tags can also be set using digiKam:</p>
48
49 <blockquote><pre>
50 exiftool -headline='The RSS image title' \
51 -description='The RSS image description.' \
52 -subject+=for-family photo.jpeg
53 </pre></blockquote>
54
55 <p>I initially tried the "-title" and "keyword" tags, but they were
56 invisible in digiKam, so I changed to "-headline" and "-subject". I
57 use the keyword/subject 'for-family' to flag that the photo should be
58 shared with my family. Images with this keyword set are located and
59 copied into my Freedombox for the RSS generating script to find.</p>
60
61 <p>Are there better ways to do this? Get in touch if you have better
62 suggestions.</p>
63
64 <p>As usual, if you use Bitcoin and want to show your support of my
65 activities, please send Bitcoin donations to my address
66 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>