Simple jpg viewer / slideshow - script request

Using applications, configuring, problems
Message
Author
User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

Simple jpg viewer / slideshow - script request

#1 Post by greengeek »

Script request:

I have a directory "jpgstore" which contains up to 20,000 jpg images taken by my homemade security camera and I would like to display them as a slideshow in the simplest way possible.

I have tried viewnior and it works, but it seems to allow a quickest display time of one second per image. Ideally i would like to be able to set the "frame rate" anywhere between 10 per second up to 5 seconds per frame. This would allow me to animate the jpg images so I can do a "quick review" of the events trapped by the camera, or set the speed for a slower look if needed.

I don't need a fancy speed dial or gui - just a script with changeable parameters.

It sounds as if feh may do the job (just about to download/install it and try it now....) but I have it in the back of my mind that someone here (maybe Technosaurus?) posted a method to use X to display a borderless window or something similar.

I would like the script to be placed in the same directory as the jpgs so that it does not need to be told what directory to look for - I just want to click it and have a slideshow run.

Any thoughts appreciated.

cheers!

EDIT : Summary of solutions:
So far the best solution seems to be "pho" which is highlighted in these posts:
http://www.murga-linux.com/puppy/viewto ... 919#972919 (for Carolina)
http://www.murga-linux.com/puppy/viewto ... 923#972923 (for Slacko 5.6)

Other similar options are still useful but require some dependencies:

Musher0 highlighted qiv and I made a test pet here:
http://www.murga-linux.com/puppy/viewto ... 629#972629 but it also requires "imlib"

feh works well but the pet was too big to post here. Also it requires imlib2 and gliblib dependencies:
https://github.com/derf/feh
Last edited by greengeek on Wed 01 Nov 2017, 18:45, edited 6 times in total.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#2 Post by greengeek »

Just gave feh a try and it works but I would prefer not to have to rely on it and its dependencies if there is any other way to do this.

Slideshow syntax for feh is:

Code: Select all

# feh -D1
(1 second delay per image)

Code: Select all

# feh -D0.1
(0.1 second delay per image)
Last edited by greengeek on Sat 28 Oct 2017, 19:55, edited 1 time in total.

User avatar
ally
Posts: 1957
Joined: Sat 19 May 2012, 19:29
Location: lincoln, uk
Contact:

#3 Post by ally »


User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#4 Post by greengeek »

Hi Ally - thanks for this - ffmpeg seems a good option. I wonder if there is a way to have the output displayed in a "live window" rather than as an mp4 output file?

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#5 Post by musher0 »

greengeek wrote:Just gave feh a try and it works but I would prefer not to have to rely on it and its dependencies if there is any other way to do this.

Slideshow syntax for feh is:

Code: Select all

# feh -D1
(1 second delay per image)

Code: Select all

# feh -D0.1
(0.1 second delay per image)
Hi greengeek.

IIRC, qiv requires no dependencies. It is very similar
to feh otherwise. Qiv offers full screen, slide show and delay for display (whatever
is needed) options as well.

IHTH.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#6 Post by smokey01 »

feh offers full screen as well by pressing the v key. Press h to pause the slide show.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#7 Post by greengeek »

musher0 wrote:IIRC, qiv requires no dependencies. It is very similar to feh otherwise.
Thanks musher - I just tried downloading qiv source and attempted a compile but I get the following eror:

Code: Select all

/bin/sh: imlib-config: command not found
main.c:9:22: fatal error: gdk/gdkx.h: No such file or directory
compilation terminated.
make: *** [main.o] Error 1
#
I guess this means it needs imlib which is one of the dependencies of feh also. I will have another go tonight - compiling is a weak point for me but I need the practice...

EDIT : I think I'm almost there now - I was trying to compile an older, more basic version of qiv and it needed imlib version 1 and the only pet I had available was imlib2. Now that I have tried to compile the latest version of qiv it is happy with imlib2 and started up ok automatically when I asked "make install". Just got to figure out the best way to use it..

feh works really well so it will be interesting to compare the two.

Still hoping to find a viewer that works without any dependencies though.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#8 Post by greengeek »

OK - i got qiv going.
Just for the record the syntax for my needs is:

Code: Select all

# qiv --slide -d0.2 *jpg
I have made a pet which I can use on my Slacko 5.6 derivative - this pet contains a cutdown version of the imlib2 dependencies so do not use it if you have imlib already installed or if you need a full set of imlib loaders to handle other image formats - this is for jpg only.

***WARNING***
Do not use this pet if you use a savefile.
Only try this pet on a "live" puppy (ie: fresh boot of Slacko 5.6)

This pet only handles .jpg files (had to chop the rest of the loaders to get below the 256Kb limit for attachments).

Load the pet, navigate to your image directory, then in a terminal enter:

qiv --slide -d0.2 *jpg

Shorten the delay from 0.2 to 0.1 if you want "fast forward" through the images.
Attachments
qiv_and_S56_jpgdeps_gg-0.0.pet
(239.56 KiB) Downloaded 155 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#9 Post by musher0 »

Hi greengeek.

If you can get that delay down to 0.04 second, you'll get 24 images per second,
and you'll have yourself a movie !!! :lol: Just teasing !

(BTW, I don't know of any regular picture viewer that could handle such a speed...)

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#10 Post by greengeek »

musher0 wrote:If you can get that delay down to 0.04 second, you'll get 24 images per second, and you'll have yourself a movie !!!.
That raises a good question - would I be better off capturing the webcam output as a movie and stripping still frames out of it? That may possibly be a method that takes less overall storage space (depending on formats?) - but I decided to capture jpg images because I thought that might give the best quality "stills".

But is there a way to get good quality stills (and efficient storage space usage) by creating a movie format direct from the webcam? Maybe someone has already done this?

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#11 Post by musher0 »

Hi greegeek.

I know nothing about video security software, unfortunately, so I cannot help you with
that decision.

Maybe somewhere on the Web, someone has produced a comparison table for such
things, with pros and cons? Just a thought.

Good luck.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
souleau
Posts: 148
Joined: Sun 23 Oct 2016, 15:24

#12 Post by souleau »

musher0 wrote:If you can get that delay down to 0.04 second, you'll get 24 images per second,
and you'll have yourself a movie !!! :lol: Just teasing !

(BTW, I don't know of any regular picture viewer that could handle such a speed...)
Feh can do that. I use feh for exactly such purpose to have an animated desktop screen buildup at boot, loading conky drawing it line by line top down, speed 0.05., plus, I have a big version of my avatar in the middle of the screen, and it blinks its eye once, speed 0.03.

As long as the images are a reasonably small size, these speeds are achievable. And so, yes, animations.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#13 Post by greengeek »

Is "xloadimage" available within anyone elses Puppy? It is missing from my Slacko 5.6 but seems as if it should be part of any Linux that uses X.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#14 Post by musher0 »

greengeek wrote:Is "xloadimage" available within anyone elses Puppy? It is missing from my Slacko 5.6 but seems as if it should be part of any Linux that uses X.
Hi gg.

It still exists, but it may not be what you want. The (c) has not been renewed since
1992, and there is no jpg or png support according to:

http://sioseis.ucsd.edu/xloadimage.html
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#15 Post by Geoffrey »

Pho image viewer does a number of things including slideshow

http://shallowsky.com/software/pho/

https://github.com/akkana/pho

easy to compile, just run "make" in the extracted directory

to make it smaller run "strip --strip-unneeded pho"
Attachments
pho-1.0pre1.tar.gz
Binary compiled in Carolina 1.3
(27.01 KiB) Downloaded 137 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#16 Post by musher0 »

Pretty good find. Thanks, Geoffrey!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#17 Post by greengeek »

Geoffrey wrote:Pho image viewer does a number of things including slideshow
Hi Geoffrey, thanks for mentioning pho - I have been testing this the last couple of days and found that it worked without any extra dependencies - however it was not capable of accepting non-integer values for delay (eg a delay of 0.2seconds hung the programme). The minimum acceptable delay was one second.

I contacted Akkana to request an update that would allow the smaller delay increments and the change was made same day. Fantastic!

I have just tested the new version uploaded to git and it works perfectly for me.

The syntax I am using is:

Code: Select all

pho -s0.2 -r /root/SamplePics/*jpg
Just adjust the image source directory as required.

As an alternative I can place the following script in the same directory as the jpg images:

Code: Select all

#!/bin/sh
pho -s0.2 -r *jpg
Pho source is here:
https://github.com/akkana/pho

I have attached a copy of pho that is compiled on Slacko 5.6 (compiled by a non-expert in compiling so users please compile yourself if you have more experience!)
The pet loads pho into /usr/bin.

EDIT : Geoffrey - you seem to have got your pet down to 27kb where my pet is 80Kb - is that compression do you think or is that the result of stripping?
cheers!

EDIT 2 : I have now used the "stripping" technique and uploaded the new smaller pet. Same functions, smaller package. Awesome.
Attachments
pho_slacko56_gg-0.2.pet
Pet loads pho binary into /usr/bin
Binary compiled on Slacko 5.6
(29.43 KiB) Downloaded 118 times
Last edited by greengeek on Sat 04 Nov 2017, 02:47, edited 6 times in total.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#18 Post by Geoffrey »

greengeek wrote:I contacted Akkana to request an update that would allow the smaller delay increments and the change was made same day. Fantastic!
I compiled it in Carolina only minutes before I posted it, so it should have that update, I think I recall there was a update to the git 8 hours ago.

I've used the older version previously when I needed a command line image viewer, works great.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#19 Post by Geoffrey »

greengeek wrote:you seem to have got your pet down to 27kb where my pet is 80Kb - is that compression do you think or is that the result of stripping?
Maybe stripping the binary, at compile it was around 170kb, stripped 61kb then tar.gz down to 27kb.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

#20 Post by belham2 »

This thing is pretty cool, I just put it in my 'frugal' install of Carolina 1.3.

Though, I think I'm getting spoiled something terrible: CLi is fun an all, even a script inside the directory as greengeek is doing, but boy, this thing needs a simple, elegant 'gui' interface with the pic directories already linked to it so we can just go at it. :D

Post Reply