Multi-Threaded Tone-Mapped Hardware Thumbnail Generation

Server Version#: 1.32.8.7639
Player Version#: 8.29 (iOS)

Just re-built my server on an Intel NUC13 and am generally very happy with the setup. For context, I’ve chosen to run Plex server like this for greatest stability/portability/flexibility:

NUC13 → Proxmox VE → Ubuntu v22 VM → Docker → Plex, using official docker image

I have QuickSync hardware transcoding w/HDR tone mapping working, so it transcodes 4K HDR Blu-ray rips quickly and beautifully.

But I’m noticing how long the video preview thumbnail generation is taking. Hours have bled into days now. Upon investigation, I discovered that there’s only a single Plex Transcoder running, and it’s only consuming 15-18% of my CPU. I’ve also read that it’s using software CPU transcoding rather than the hardware iGPU. Further, I’ve read complaints that the thumbnails are not properly tone mapped / color graded as well.

This seems like a great process to multi-thread. There are hundreds-to-thousands of media files to perform the same operation on, and the outputs/files are all independent of one another.

As I searched for a solution to this, I came across this project from a couple of years ago that got multi-threaded hardware thumbnail generation working with NVIDIA GPUs. The results posted in this thread were great! Processing time per movie was cut from 3-4 minutes to just 20-30 seconds. I imagine that with Intel’s QuickSync, the results would be even more impressive. Note that this was after this explanation of how Plex’s thumbnail generation’s performance had already been improved significantly.

For stability and simplicity, I’d rather stick with Plex’s official processes rather than mess with the project mentioned above, so here’s a feature request describing the “complete” desired end state, including multi-threading, hardware, and HDR tone mapping/color grading.

At least some of the logic seems to have been worked out by the contributors to that project, and I think many people would benefit from this being properly baked into PMS (and working on an Intel GPU).

Add, h265 and AV1 to the mix and you’ll see some ridiculous time saving (AV1 is surely >10x faster).

2 Likes

I’ve been away from Plex for a few years. I was surprised to find that preview generation is still not hardware accelerated.

I found this thread when trying to understand why my CPU was getting killed during thumbnail generation even though it appears to be running ffmpeg behind-the-scenes. I’m kind of shocked streaming transcodes can use HW acceleration but thumbnail and preview generation cannot.

I’m surprised this still hasn’t been addressed over a year later. Seems like a very easy change to make.

I don’t currently use this feature but totally would if it is HW accelerated and can be done in more efficient format so it takes less space.