ForFruit
Posts: 3
Joined: Tue Oct 24, 2017 12:49 pm

Endless slideshow with FIM using argument --slideshow

Tue Oct 24, 2017 1:01 pm

Dear developers,

May I ask you a question?

Now, I just got a new Raspberry zero and have been setting up for a photoframe.

I thought I did everything needed and started a marathon test before going to my office this morning.
for the first 10 minutes, it was working well and I was happy.

When I came back home, the monitor was displaying only one figure and it looks like the slideshow has been ended.
So I did some experiments to know why this is not behaving as I intended.

FYI, I'm using Raspbian stretch light without any GUI. I'm going to stick to just console system.


1. To check the system deadlock, I tried to connect to the system via Putty from other system ==> It responds normally
2. To confirm that the slideshow displays the photos endlessly after reaching last photo
==> prepare one folder with 3 photos
==> Start slideshow with these 3 photos
==> after displaying the last one, slideshow stops.

So I concluded that the argument '--slideshow' is only for one loop, not for an endless loop.

Then, how can I make an endless slideshow?

I inserted below line into crontab.

@reboot /usr/bin/fim /mnt/Photos/*.jpg -a -u -R --slideshow 5 -q

This system is going to be used by my grandmother. I don't want her to give it a command manually. So would you please help me?

Thanks in advance and sorry for a bad English.

ForFruit
Posts: 3
Joined: Tue Oct 24, 2017 12:49 pm

Re: Endless slideshow with FIM using argument --slideshow

Tue Oct 24, 2017 10:16 pm

Dear all,

Meanwhile, I was struggling with FIM & command and found one approach which can be a solution.
I can pass FIM command to the execution like below

==> fim *.jpg -c 'while(1){display;sleep "5";next;}'
To me, I can interpret this like
1. Load *.jpg
2. Display one file from list
3. Wait for 5 sec
4. Go to next file in the list
5. Repeat 2 to 4

This is a good approach. But the problem is,
1. this is not randomic
2. this is not recursive

So from FIM website, I found something like this
list 'pushdirr' ==> Make file list recursively
list 'random_shuffle' ==> shuffle the loaded file list

But I can't implement these two to achieve the same effect as the first string in crontab as explained on the top with recursive effect.

Would you please help me to implement this correctly?

FYI, Previous execute string in crontab
@reboot /usr/bin/fim /mnt/Photos/*.jpg -a -u -R --slideshow 5 -q
a for autoscaling
u for random
R for recursive file search
slideshow with 5 sec delay
q no verdose

Thanks in advance.

ForFruit
Posts: 3
Joined: Tue Oct 24, 2017 12:49 pm

Re: Endless slideshow with FIM using argument --slideshow

Sat Oct 28, 2017 2:12 am

I'm answering to my own question

Achieved what I need via below command

find /directory -iname "*.jpg"|shuf|fim -a -u -q -c 'while(1){display;sleep "5";next;}'

Actually, only one of 'shuf' or 'u' is required.
Alternatively,
fim -a -u -q -R /directory -c 'while(1){display;sleep "5";next;}' also works fine with 5 sec of delay between photos.

User avatar
eastpole
Posts: 24
Joined: Wed Feb 15, 2012 7:17 pm
Location: Toronto, Canada
Contact: Website

Re: Endless slideshow with FIM using argument --slideshow

Thu May 02, 2019 1:59 pm

ForFruit,

Your question was interesting (to me and many others who do not need a whole desktop/GUI environment) and your answer made a lot of sense. It was not obvious and I appreciate your work to discover the solution and explain it to us! Thank you very much!

--
eastpole

Return to “Beginners”