Simple jpg viewer / slideshow - script request

Using applications, configuring, problems
Message
Author
musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#21 Post by musher0 »

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. :D
An aemenu is what you need.
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

#22 Post by greengeek »

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?

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

#23 Post by musher0 »

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.
Last edited by musher0 on Sun 05 Nov 2017, 20:30, edited 1 time in total.
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

#24 Post by greengeek »

Thanks for the stripping tips. I have remade pho in stripped form and uploaded the updated pet to my post above.

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

#25 Post by greengeek »

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

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#26 Post by goingnuts »

@strip of my xputimage: it is a upxed static linked binary so stripping destroys everything. It won't get smaller than as delivered.

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

#27 Post by greengeek »

Thanks - thats a good lesson in the benefits/costs of stripping. I need to do more research...

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#28 Post by trapster »

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: Select all

#!/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

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

#29 Post by greengeek »

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?

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#30 Post by trapster »

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

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

#31 Post by musher0 »

@greengeek:

mencoder is part of the mplayer suite. AFAIK, it is seldom available by itself. Which
is why you are not finding it under its own entry in the PPM.

Also, because some devs choose not to include it at compile time, some mplayer
packages will have it and some won't. There are some ready-made binaries here,
though: https://pkgs.org/download/mencoder, One of the the Debian or
Ubuntu binaries might be usable on your Pup.

IHTH. 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

#32 Post by greengeek »

trapster wrote:If by "trap" you mean save them...My camera saves them right to my server via ftp
Yeah, "trap" is probably the wrong word - it's just that I have been looking at a bunch of methods to get sequential jpg snapshots triggered by a motion event - even trialling taking screenshots of a portion of the screen that is displaying a webcam feed. If your camera is creates jpg directly at the source that makes it pretty straightforward.

My reason for wanting jpgs is that I eventually hoped to be able to get my system to upload single jpgs across the internet (via cellphone/3G) as the property I want to monitor is 150 miles away.

As part of that I plan to have a separate motion detector which can alert my Puppy that the "current" image needs to be uploaded as it has trapped some form of unexpected activity.

I also plan to connect multiple webcams to my PC once I have got the basic functionality sorted.

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

#33 Post by greengeek »

musher0 wrote:mencoder is part of the mplayer suite. .... There are some ready-made binaries here,
though: https://pkgs.org/download/mencoder, One of the the Debian or
Ubuntu binaries might be usable on your Pup.
Thanks musher. I went to that link and tried a couple (Arch and Deb Jessie) but i haven't stumbled upon the best version yet - missing libs. I will try to pin down which package is the best match.
cheers!

Post Reply