czkawka icon indicating copy to clipboard operation
czkawka copied to clipboard

Implement Hardware acceleration

Open Wrestor opened this issue 1 year ago • 4 comments

Feature Description Implement hardware acceleration to take advantage of specialized hardware and speed up czkawka even more. This would make finding similar photos and videos even more efficient. Similar to videoduplicatefinder

Wrestor avatar Oct 24 '23 12:10 Wrestor

Is even possible to use gpu acceleration when resizing/hashing images(I am mainly talking about the available libraries)?

Duplicate videos are found by a separate library that extracts a certain number of images from the video stream and hashes them, so here, too, the main problem is the issue of resizing/hashing images and not hardware acceleration(I don't think hardware acceleration speeds up taking images from middle of video, but I could be wrong)

qarmin avatar Oct 24 '23 13:10 qarmin

Is even possible to use gpu acceleration when resizing/hashing images(I am mainly talking about the available libraries)?

Duplicate videos are found by a separate library that extracts a certain number of images from the video stream and hashes them, so here, too, the main problem is the issue of resizing/hashing images and not hardware acceleration(I don't think hardware acceleration speeds up taking images from middle of video, but I could be wrong)

I see, I didn't know that, should I close this request then?

Wrestor avatar Oct 25 '23 13:10 Wrestor

Is there anything more about it?

MystikalE avatar Nov 23 '23 11:11 MystikalE

for reference with videos:

In the past I experimented with using gstreamer instead of ffmepg to decode videos. It is very easy to use GPU-decoding with gstreamer, however:

  • Only Nvidia cards are supported
  • GPU decoding is slower if you have an old/cheap GPU
  • GPU decoding is slower if you have >=4 core CPU
  • If the video codec is very old or very new, then video decoding is not supported anyway.

So I think GPU accelerated video decoding would be a bad idea

(FWIW the underlying library, vid_dup_finder_lib uses ffmpeg not gstreamer, but I am sure ffmpeg can use GPU decoding)

Farmadupe avatar Dec 21 '23 20:12 Farmadupe