Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 15 Dec 2017, 12:18
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Simple jpg viewer / slideshow - script request
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [33 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
musher0


Joined: 04 Jan 2009
Posts: 11274
Location: Gatineau (Qc), Canada

PostPosted: Wed 01 Nov 2017, 03:59    Post subject:  

Pretty good find. Thanks, Geoffrey!
_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4745
Location: Republic of Novo Zelande

PostPosted: Wed 01 Nov 2017, 04:10    Post subject:  

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:
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:
#!/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.
pho_slacko56_gg-0.2.pet
Description  Pet loads pho binary into /usr/bin
Binary compiled on Slacko 5.6
pet

 Download 
Filename  pho_slacko56_gg-0.2.pet 
Filesize  29.43 KB 
Downloaded  17 Time(s) 

Last edited by greengeek on Fri 03 Nov 2017, 22:47; edited 6 times in total
Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 2313
Location: Queensland

PostPosted: Wed 01 Nov 2017, 04:54    Post subject:  

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.

_________________
Carolina: Recent Repository Additions

Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 2313
Location: Queensland

PostPosted: Wed 01 Nov 2017, 05:33    Post subject:  

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.

_________________
Carolina: Recent Repository Additions

Back to top
View user's profile Send private message 
belham2

Joined: 15 Aug 2016
Posts: 1362

PostPosted: Wed 01 Nov 2017, 05:41    Post subject:  

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. Very Happy
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 11274
Location: Gatineau (Qc), Canada

PostPosted: Wed 01 Nov 2017, 13:10    Post subject:  

belham2 wrote:
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. Very Happy

An aemenu is what you need.

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4745
Location: Republic of Novo Zelande

PostPosted: Wed 01 Nov 2017, 14:08    Post subject:  

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

to make it smaller run "strip --strip-unneeded pho"
Seems like a good space saving. What does "stripping" actually do? Does it have any negative impacts like reducing the range of machines it can run on? Or restricting languages or locales? Must be something lost along the way surely?
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 11274
Location: Gatineau (Qc), Canada

PostPosted: Wed 01 Nov 2017, 15:10    Post subject:  

greengeek wrote:
Geoffrey wrote:
easy to compile, just run "make" in the extracted directory

to make it smaller run "strip --strip-unneeded pho"
Seems like a good space saving. What does "stripping" actually do?
Does it have any negative impacts like reducing the range of machines it can run on?
Or restricting languages or locales? Must be something lost along the way surely?

Hi greengeek.

Yes something is lost, but nothing essential like you mention.

During the compilation process, the compiler stores a lot of debugging information, in
the form of comments and similar, alongside the executable code to help the
programmer pinpoint the problem if the compilation goes wrong. (The programmer
can view these comments, etc., in an hex editor.)

However, if the compilation is successful, those infos are not needed anymore, so
they can be "stripped" out of the executable without worry. This is what the strip
utility does with the command < strip --unneeded ExecutableX >. (The strip utility
also offers other parameters of use to an advanced programmer, but I am not too
familiar with them.)

IHTH.

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)

Last edited by musher0 on Sun 05 Nov 2017, 16:30; edited 1 time in total
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4745
Location: Republic of Novo Zelande

PostPosted: Fri 03 Nov 2017, 22:49    Post subject:  

Thanks for the stripping tips. I have remade pho in stripped form and uploaded the updated pet to my post above.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4745
Location: Republic of Novo Zelande

PostPosted: Sat 04 Nov 2017, 15:30    Post subject:  

Just wanted to highlight some work done by technosaurus and goingnuts in making lightweight image viewers.

Technosaurus made a couple of posts here and following pages

Goingnuts offered "xputimage" here

xputjpeg available here but I don't know how to use it...

Just looking at alternatives to pho for the sheer interest of it. Maybe there is something even smaller than pho...

EDIT : If I "strip" goingnuts xputimage it comes down to 208 Bytes. There is potential here if I can script it to display sequential jpegs at a set delay...

EDIT 2 : ..except that after "stripping" it no longer works and give me a segmentation fault.. Hmmmm
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 900

PostPosted: Sun 05 Nov 2017, 16:21    Post subject:  

@strip of my xputimage: it is a upxed static linked binary so stripping destroys everything. It won't get smaller than as delivered.
Back to top
View user's profile Send private message Visit poster's website 
greengeek


Joined: 20 Jul 2010
Posts: 4745
Location: Republic of Novo Zelande

PostPosted: Mon 06 Nov 2017, 01:00    Post subject:  

Thanks - thats a good lesson in the benefits/costs of stripping. I need to do more research...
Back to top
View user's profile Send private message 
trapster


Joined: 28 Nov 2005
Posts: 2098
Location: Maine, USA

PostPosted: Sat 11 Nov 2017, 20:05    Post subject:  

I use the following to combine .jpg's into an .avi video from my motion detected cam. I run it with cron every midnight.
You may or may not have the libraries required.

Code:

#!/bin/sh

mencoder mf:///some/folder/cam1/*.jpg -mf w=800:h=600:fps=10:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o /save/folder/somewhere/`date +%a_%b_%d_%Y.avi`

rm /some/folder/cam1/*.jpg

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog
Back to top
View user's profile Send private message Visit poster's website 
greengeek


Joined: 20 Jul 2010
Posts: 4745
Location: Republic of Novo Zelande

PostPosted: Sun 12 Nov 2017, 01:48    Post subject:  

I do not appear to have mencoder in my Puppy and when I look in the Slacko 5.6 PPM for mencoder it is unfortunately not found at all. There have been a couple of other times where I tried to use mencoder for various purposes so I must dig it out...

However, I would like to avoid creation of a movie at this stage - I would like to be able to just review the jpegs themselves onscreen (while new jpgs are continuously accumulated..). The other thing I want to do is to change my webcam jpeg script so that images are collated in directories representing one hour of images only.

I currently collect 10 hours of images and this seems to generate a circumstance where I run out of "kernel memory" (not the same thing as user RAM). I am hoping that breaking the jpgs up into one hour bites might allow me to avoid this problem (which reveals itself as "unable to fork, cannot allocte memory" messages when I try to use Rox to navigate to my jpgstore folder after some hours of recording).

What method do you use to trap your original jpg images?
Back to top
View user's profile Send private message 
trapster


Joined: 28 Nov 2005
Posts: 2098
Location: Maine, USA

PostPosted: Sun 12 Nov 2017, 09:12    Post subject:  

If by "trap" you mean save them...My camera saves them right to my server via ftp
_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 3 [33 Posts]   Goto page: Previous 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0592s ][ Queries: 14 (0.0048s) ][ GZIP on ]