>>709952I've made myself a script to convert images into webm slideshows. I can just right click a group of images and convert them.
slideshow#!/usr/bin/env python
from sys import argv, exit, stderr
from os import symlink
from os.path import exists, join, getmtime, abspath, splitext
from subprocess import run
from tempfile import TemporaryDirectory
if len(argv) < 2:
print("slideshow [IMAGES]")
print(" Generate slideshow based off modified time")
exit(1)
frames = [
path
for (_, path) in sorted(
[(getmtime(name), abspath(name)) for name in argv[1:]],
key=lambda x: x[0],
)
]
target = splitext(frames[0])[0] + ".webm"
extension = splitext(frames[0])[1]
for path in frames:
if splitext(path)[1] != extension:
print("Mismatched extensions", file=stderr)
exit(1)
if exists(target):
print("File already exists", file=stderr)
exit(1)
folder = TemporaryDirectory()
for i, path in enumerate(frames):
symlink(path, join(folder.name, f"{i:06d}{extension}"))
run(
"ffmpeg -framerate 1 -i".split(" ")
+ [f"{folder.name}/%06d{extension}"]
+ "-b:v 1M -vf tpad=stop_mode=clone:stop_duration=3 -vcodec vp8".split(" ")
+ [target]
)
slideshow.nemo_action[Nemo Action]
Name=Convert Images to Slideshow
Exec=<slideshow %F>
Selection=m
Mimetypes=image/jpeg;image/png;image/webp;
Terminal=true
This should work on Linux Mint or any distro using Cinnamon. It should be pretty easy to port to other desktop environments too.
To install, just copy the files into `~/.local/share/nemo/actions` and mark `slideshow` as executable.
>>710378Not sure, but it kinda look like something from Studio Fantasia. They're known for their panty shots.