po5 / thumbfast

High-performance on-the-fly thumbnailer script for mpv
Mozilla Public License 2.0
760 stars 34 forks source link

fix: improve the decoding #43

Closed hooke007 closed 1 year ago

hooke007 commented 1 year ago

We do not need much too many threads to decode when requesting.

hooke007 commented 1 year ago

christoph-heinrich commented 1 year ago

It has less cpu usage, but it's also slower.

hooke007 commented 1 year ago

Comparing with the current branch, I didn't notice the diff about the preview presenting.

christoph-heinrich commented 1 year ago

I'm surprised how little difference it makes most of the time, but with something like 4k h265 it becomes very noticeable for me.

https://user-images.githubusercontent.com/8932183/194657303-beddd4fe-c019-4c5c-b3de-b085f5f64eb6.mp4

https://user-images.githubusercontent.com/8932183/194657331-326cf095-657b-40c5-8af1-683364cd9bee.mp4

hooke007 commented 1 year ago

How about two threads?

christoph-heinrich commented 1 year ago

https://user-images.githubusercontent.com/8932183/194661090-6cde0d70-afca-48b1-a2c0-7b8d44485201.mp4

https://user-images.githubusercontent.com/8932183/194661704-ac054246-83a0-4414-aad9-9d7890e85716.mp4

hooke007 commented 1 year ago

I added the other solution to reduce the CPU's pressure but faster seeking.

natural-harmonia-gropius commented 1 year ago

Just put default options.hwdec to "no", it's good to be able to modify this. e.g. low-end graphics cards unable to decode two 8k 10bit av1 streams at same time, driver will crash.

hooke007 commented 1 year ago

Isn't it 'no' now?

natural-harmonia-gropius commented 1 year ago

mybad.