A while ago I built a tool to speed up the generation of video preview thumbnails (the images you see when scrubbing through a video on the timeline). Why? Because on a large library it can take many days since Plex’s built-in approach is CPU only.
Recently it’s been upgraded with a web UI and integration with Sonarr/Radarr/Tdarr. I’ve never posted it anywhere so I thought I’d share it here in case others find it useful.
----------------------
Plex Generate Previews - uses your GPU (NVIDIA, AMD, Intel, or even Apple Silicon) to generate BIF files way faster. On my setup it’s roughly 5-10x quicker than Plex.
Omg… you’re the developer? Thank you for making it. That really helped me out a lot when I changed the Plex GenerateBIFFrameInterval to 10. I had to scrap all the previews and start over.
Hi @stevezau, no, I meant turn off your script and let plex generate the thumbnails for new entries afterwards.
First your fast script → then the Plex default generation.
Hi, I just got your app running on my Unraid machine. It’s very easy-to-use. UI is clean and instructions are all very clearly written. I was able to follow through installation without much hiccup.
My Unraid server has a Intel® Core™ Ultra 7 255H and I’m able to use quicksync hardware acceleration without issue. The problem is that all thumbnail previews I’ve generated are wildly out of sync when I play them on Plex. They are about 4-5x slower than the actual movie. Meaning, when the movie is at 1:00:00 mark, the thumbnails are still showing 15:00~20:00.
It doesn’t matter if I use CPU or GPU. Doesn’t matter which movie/what codec the movie is in. The same issue persists. When I go to finished jobs to look at the results in preview inspector, the thumbnail previews are fine-- and they cover the whole movie. They also get “published” to my Plex server just fine. But when I watch this movie in Plex-- the thumbnail preview timing is all wrong.
I’m on version 4.3 of Media Preview Generator and PMS version 1.43.3.10793. Any help? Thanks in advance.
Here I’m using Annihilation for testing purposes because it has very recognizable chapter title cards. I can confirm that the thumbnail preview is generated correctly as far as I can tell because chapter title cards, like this one later in the film, all appear to be in the right place. So I’m really at a loss why it plays out of sync with the movie itself in Plex.
The only thing I can think of is, here I’m using 5s interval. Is the 05:45:00 supposed to match the length of the movie? The actual movie is only 01:55:00 long. So that’s precisely 3 times its length. Could this be the problem?
Thanks for the detailed report and the log I think you’ve found a bug…
The tool builds a strip of preview thumbnails and tells Plex they’re spaced 5 seconds apart. On your Dolby Vision file it accidentally grabbed about 3× too many frames (roughly one every 1.7s
instead of every 5s) but still labelled them “5s apart.” So Plex thinks the preview strip is 3× longer than the movie — scrub to the end of the film and it shows a thumbnail from only ~40 minutes in. That’s the drift you’re seeing, and it’s why it happens on both CPU and GPU (it’s a frame-count problem, not a decoding one).
The tell is right in your log: 4,141 thumbnails for a 1h55m movie at 5s spacing = 5h45m of previews — exactly 3× too long, which matches the “05:45:00” you spotted. Normal HDR10 and single-layer Dolby Vision files come out fine — it’s the dual-layer Dolby Vision (Profile 7) format specifically that’s tripping up the frame grabber.
I will ship a fix.. but to make sure I ship the right one, could you run this quick test on that Annihilation file? It tells me whether the fix is simple or needs deeper Dolby Vision handling. Replace CONTAINER with your container name (find it with docker ps):
Paste the output back. In short: if it shows ~4,100 frames but the last timestamp is still ~6,900, the fix is simple. Thanks again for chasing this one down — really helpful.
My NAS CPU fires up to 100% but I never received an output. I have to stop the container after a good 10 minutes. Not sure if You have to specify one input file means the file path is wrong. I tried to use /mnt/user/media and /data/ but same result. There’s no file not found error or anything like that.
I ran the app on more movies. It generated previews for 2046 and Beau Travail correctly-- the previews play in Plex without issues.
But most previews generated have the same issue I described from above. Not sure if it’s Dolby Vision related because it happens on seemingly the most basic h.264 encode as well. Here’s an example:
The length of previews for all three of these movies appear to be correct i.e. same as movie runtime in the preview inspector, unlike Annihilation. But, only the previews for 2046 and Beau Travail worked in Plex. I’m struggling to understand the common denominator of the issue here. Hope this helps.