Indexer and amount of CPU cores

I think it would be cool, if you from the admin interface could tell the new transcoder how many threads to use, going from 1 to amount of CPU cores in the PMS

 

Python:

 

import multiprocessing

multiprocessing
.cpu_count()

 

That way, if you had like a quad-core box, you could set this to 2 threads, and the overall CPU usage from the indexer would never go over 50 %

 

Regardless of whether you like this or not, comments are welcome, as long as they are valid, and not just +1 posts

 

Also, if you agree here, then press the "Like This" on this post.

 

And as a site note, and not counted by Plex according to the forum rules, I just wanna take it for a test spin, so there's also a poll, but it's the "Like This" that counts :)

I want the thumbnail indexer to be asynchronous background process and not part of the common media indexer refresh process.

agree!

I want the thumbnail indexer to be asynchronous background process and not part of the common media indexer refresh process.

Kinda what I meant with this :)

Kinda what I meant with this :)

Funny. Must be my mistake. Because when I read the topic post I comprehend something complete different about limiting how many processors a process can use. This would make the indexing process take even longer and thus make me wait even more for the media refresh scan to complete when indexing is enabled. Actually, I don't see how this topic is anything like requesting the thumbnail index process be asynchronous.

I meant, that when calling the new transcoder (ffmpeg) for indexing, one could add "threads=x", but only for that call.

The regular scanning stuff should, at least IMHO run for full speed.

Only the Indexer should have the option of been reduced, since it's so demanding, and can make your device unusable for literately weeks.

/Tommy 

Heh, I’m not sure why, but this “feature” seems to be baked in on my server. The indexing process won’t use more than 50% of the CPU in my Mac Mini. I got impatient so I told it to index another section at the same time. Everything is still usable while they’re running, though transcoded content takes 15 seconds or so to start on my Roku (Plex/Web is pretty much instant) and the fan on that thing had been screaming since Monday with at least 3 or 4 days to go.

As an alternative to this request, what about creating the BIF files on demand? It seems stupid to do them all in advance when they’re just going to sit there, most of them unused in my case. Why not fire off a parallel process to index on the first play of a file and then save that BIF for reuse?

i also would like to see this feature for transcodings.

I never understood why it needed the transcoder to begin with. Wouldn't it be more CPU efficient to 'view' the movie at full resolution, take pictures of the full res movie and then scale them down after the picture is taken? Resizing a single picture is super fast whereas transcoding an entire movie has got to be a huge strain by comparison.

I never understood why it needed the transcoder to begin with. Wouldn't it be more CPU efficient to 'view' the movie at full resolution, take pictures of the full res movie and then scale them down after the picture is taken? Resizing a single picture is super fast whereas transcoding an entire movie has got to be a huge strain by comparison.

Interesting idea, but why do you think that they transcode in order to grap the screenshots?

Remember, that the new fancy transcoder is a clone of ffmpeg, and to capture, look here:

https://trac.ffmpeg.org/wiki/Create%20a%20thumbnail%20image%20every%20X%20seconds%20of%20the%20video

As for a test, I ran this:

export LD_LIBRARY_PATH=/share/MD0_DATA/.qpkg/PlexMediaServer

./Plex\ New\ Transcoder -i ‘/share/MD0_DATA/video/Nyt/movies/okt/myMovie)/myMovie.mkv’ -f image2 -vf fps=fps=1/60 /share/MD0_DATA/.qpkg/PlexMediaServer/Resources/tommy/out%d.png

Above on QNAP, so might have to adjust path etc...

Outcome was, that a 5.8Gb 720p MKV file with a png screen-shot created every minute, took about the same time as the build-in function from Plex does!

As such, I think that that's what Plex already is doing, but could be wrong here though.....walking in the dark :rolleyes:

And also note, that the new fancy transcoder can do a lot, regardless of the "transcoder" name

/Tommy