Slow video preview thumbnail generation

I am attempting to generate video preview thumbnails for a movie library. I understand that “video preview thumbnails can take a considerable amount of time and CPU resources. It’s not uncommon for a single movie to take 10 minutes or more of processing, during which the majority of your CPU resources will be used.”. However, I only have 2-3% CPU utilization. I have free memory in spades. Data is not IOP nor bandwidth limited. Is generation artificially throttled or simply poorly threaded? I can’t figure out why video preview thumbnail generation is not leveraging more resources.

Server Version#: 1.26.2.5797-5bd057d2b
Player Version#: N/A

Yes, I have searched for answers. None are definitive. I have seen statements that data transfer is a bottleneck, or CPU bound, etc. I have also reviewed and utilized the Advanced Hidden Settings for the config xml file.

System Specs:
2x Intel E5-2697 v4 (36C / 72T)
256GB DDR4 -2400
Plex Storage (DB, Media, Metadata): NVMe backed Ceph Cluster
Media Storage: Ceph Cluster

Take a look at the results of the top command. You’ll be able to tell that way if Plex is only maxing out a single core for a process.

My system takes a few minutes to generate preview thumbnails as well, it’s normal and I wouldn’t consider it to be problematic. Depending on the amount of media that thumbnails are being generated for, I wouldn’t want it to be any more than a single core process - saves resources for things that matter like transcodes.

1 Like

Top would indicate its a single threaded process as it hovers around 100%. It is unfortunate that, like much in Plex, there is no configuration or tuning options available to speed up or slow down generation. I don’t need the resources saved for anything else, they are readily available. Also, I have GPU’s for transcodes. Appropriately leveraging my system resources, I could complete this task 30X faster than it is going to end up taking.

I hear you, I’ve got plenty of resources as well. It is what it is though, everything functions as it should - just maybe not as quickly as it could.

While you might have cores and memory to spare, things like NAS boxes don’t.

Trying to write a dynamic-loading control module which could load the CPU with administrative tasks then adapt instantaneously to on-demand user-playback / transcoding would be extremely difficult.

Such a piece of code is a BIG task.

1 Like

Understand and agreed. Adaptive, dynamic scaling would be amazing but highly complex. However, a single dropdown option which allows the selection of X number of concurrent tasks is substantially less tedious to code and would yield enormous gains for those of us who aren’t using an ARM processor weaker than most cell phones.

I LIKE THAT IDEA! :slight_smile:

Care to do a feature request? I will add a comment to it.

1 Like

I just found this from @stevezau and I am going to give it a try. Looks amazing. I will work on a feature request in a bit as well.

1 Like

I wanted to close this thread out for anyone searching or for search engine indexing…

The solution (as of May 2022) is to use a third-party python script to generate video preview thumbnails. Github is https://github.com/stevezau/plex_generate_vid_previews.

Advantages over just letting Plex handle generation are:

  • CUDA acceleration for decode and encode
  • HDR tonemapping
  • Configurable frame intervals
  • Configurable thumbnail quality
  • Configurable number of GPU and CPU threads
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.