The ffmpegthumbnailer code (ffmpeg?) is not threading safe.
Add a lock around the usage to avoid crashing randomly.

if you try to generate a bunch of thumbnails at once, it can crash:

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fdb7a6cb700 (LWP 17295)]
0x00007fdb8031c899 in __GI_raise (sig=sig@entry=0x6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
(gdb)