I don't know about a standard, photo-specific way of defining and displaying slideshows, but VLC does allow for the creation of playlists with images.
The resulting m3u
or xspf
file (wiki, project site) defines the order of the images, and in the case of xspf
can also set additional properties such as the duration of each image.
Upside is that you don't have to change (the metadata of) your images at all, the playlist is a separate file. Downside is that this might not meet your 2nd requirement, as in my tests only VLC could read playlist files with images. Apple Music for example did not work, but maybe this can work in WinAmp with the ImageAmp plugin.
Basic: Using the VLC GUI
For a basic slideshow, with a constant duration per image, you can use the VLC GUI. I have 10 dummy images I created in three separate folders:
![folder with images](https://cdn.statically.io/img/i.sstatic.net/wZM2dDY8.png)
- Ensure you have VLC installed, it's freely available on Windows, Apple, Linux and Android operating systems.
- I have tried this out on macOS 12.7.4 with VLC 3.0.20.
- Open VLC
- Ensure the playlist window is shown (Window -> Playlist or ALT+CMD+P)
- Drag and drop the images in the order you want them in your slideshow, e.g. I chose to show the increasing even numbers first followed by the increasing odd numbers:
![VLC](https://cdn.statically.io/img/i.sstatic.net/YFLW4XEx.png)
- Save the playlist as a file next to your images (File -> Save Playlist...).
- Open the saved playlist in VLC to play the slideshow.
- You can set the speed of the slideshow under Preferences -> Show All -> Input/Codecs -> Demuxers -> Image -> Duration in seconds:
![VLC settings](https://cdn.statically.io/img/i.sstatic.net/z2ovju5n.png)
Advanced: Creating m3u
or xspf
files directly
As the playlists are regular text files, you can use any tool that can output text to create it.
You can order the images by hand, or use a scripts + image processing tools to define an order automatically by for example EXIF data or dominant color of the image.
According to the m3u
wiki you should be able to set the duration of each playlist item (= image in this case) in the #EXTINF
key like so:
#EXTM3U
#EXTINF:1,0.png
a/0.png
#EXTINF:2,2.png
a/2.png
#EXTINF:3,4.png
a/4.png
...
#EXTINF:9,7.png
c/7.png
#EXTINF:10,9.png
c/9.png
Unfortunately, VLC did not pick up on that, it simply displayed the image in accordance with the "Duration in seconds" earlier.
Using the xspf
file I did manage to set a per-image duration.
You can set the VLC option image-duration
for each image and VLC actually uses that:
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/">
<vlc:option>image-duration=1</vlc:option>
<trackList>
<track>
<title>0.png</title>
<location>a/0.png</location>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:option>image-duration=1</vlc:option>
</extension>
</track>
<track>
<title>2.png</title>
<location>a/2.png</location>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:option>image-duration=2</vlc:option>
</extension>
</track>
...
<track>
<title>7.png</title>
<location>c/7.png</location>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:option>image-duration=9</vlc:option>
</extension>
</track>
<track>
<title>9.png</title>
<location>c/9.png</location>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:option>image-duration=10</vlc:option>
</extension>
</track>
</trackList>
</playlist>
Additionally, according to the wiki you can use absolute (file:///home/user/...
), relative (a/1.png
) and even external image locations (https://i.sstatic.net/wZM2dDY8.png
), which I think is pretty neat.
If you decide to programmatically build xspf
playlists you could start from scratch (or let AI generate it for you), but a brief search also shows pre-existing scripts such as neko-neko-nyan/vlc_playlist.py
.
Here you can find: