derf / feh

a fast and light image viewer
https://feh.finalrewind.org
Other
1.46k stars 158 forks source link

slideshow-delay #541

Open basfari opened 4 years ago

basfari commented 4 years ago

Hi team,

Thank you for your amazing work. I have a question regarding the delay in slideshow mode. In a directory I have 50 images. When displaying those 50 images with a delay of 1.0 sec, it took 1 min and 4 seconds (01:04) which is weird because it should take exactly 50 seconds. The following table shows the delay applied and the time took to run the 50 images:

Delay [sec] ...............Time consumed [sec]....................Expected time to be consumed [sec] 8....................................414.......................................................8[sec] * 50[images] = 400[sec] 4....................................213.......................................................200 2....................................114.......................................................100 1....................................64..........................................................50 1/2................................39.........................................................25 1/4................................26.........................................................12.5 1/8................................20.........................................................6.25 1/16.............................16..........................................................3.12 1/32.............................14..........................................................1.56 1/64.............................14..........................................................0.78

We can see that the delay for the slideshow is not accurate. Is there a way to make it precise? Is there a way to slideshow 25 frames/slide per second?

My code: import subprocess delay = float(1) subprocess.Popen(f"feh --slideshow-delay={delay} --on-last-slide quit /home/pi/50images/".split())

OS: I am running the latest version of feh on raspberry pi 4 b+.

derf commented 4 years ago

Hi!

That's not possible at the moment. the slideshow delay is the delay between feh displaying image n and feh starting to load image n+1, so the total slideshow duration is number of images slideshow delay + number of images average image load time.

I intend to make feh multi-threaded eventually, which will fix this issue if the slideshow delay is higher than the maximum image load time.

If you're looking for 25 slides per second, you really should be using a video player :) ffmpeg, avconv, and/or imagemagick can convert a set of images to a video.