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 Sun 26 Oct 2014, 03:24
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
webcam on desktop
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
outsider.gonzo

Joined: 19 Mar 2011
Posts: 4
Location: Salzgitter/Germany

PostPosted: Thu 24 Mar 2011, 06:09    Post_subject:  webcam on desktop  

hi,
i would receive a private webacam and that image should be on the desktop right side on the top.

i have seen a topic on a ubuntu website, but i have no idea where can i use it and how.

have anybody here an idea?

here is the link where i have found it(it's in German)

http://forum.ubuntuusers.de/topic/bild-auf-desktop-anzeigen-und-automatisch-akt/#post-1394767


ty for your help
Back to top
View user's profile Send_private_message 
DPUP5520

Joined: 16 Feb 2011
Posts: 801

PostPosted: Thu 24 Mar 2011, 08:27    Post_subject:  

If I translated that right I believe they are saying to create a script with that code which will automatically pull an image from wherever you choose every five minutes, which is in their case such as yours a home webcam.
_________________
PupRescue 2.5
Puppy Crypt 528
Back to top
View user's profile Send_private_message 
zigbert


Joined: 29 Mar 2006
Posts: 5754
Location: Valåmoen, Norway

PostPosted: Thu 24 Mar 2011, 13:35    Post_subject:  

this command shows my webcam output.
Code:
mplayer -fps 30 -cache 128 -tv driver=v4l2:width=640:height=480:device=/dev/video0 tv://

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
DPUP5520

Joined: 16 Feb 2011
Posts: 801

PostPosted: Thu 24 Mar 2011, 13:38    Post_subject:  

@ zigbert

I believe he's talking about a IP cam

_________________
PupRescue 2.5
Puppy Crypt 528
Back to top
View user's profile Send_private_message 
zigbert


Joined: 29 Mar 2006
Posts: 5754
Location: Valåmoen, Norway

PostPosted: Thu 24 Mar 2011, 15:23    Post_subject:  

Sorry.
Pwidgets-extra pack has a slideshow widget which uses xli to show images
Code:
xli -geometry +100+100 -gamma 2.2 /path/file.jpg

I guess the german script could be used for downloading the image.


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
zigbert


Joined: 29 Mar 2006
Posts: 5754
Location: Valåmoen, Norway

PostPosted: Thu 24 Mar 2011, 16:26    Post_subject:  

Here is an example. It's too simple since it
- has window decoration
- should be set to a layer below other windows
- views downloaded image in actual size




Code:
#!/bin/bash
DIR=$HOME/.pwebcam
IMAGE=http://www.hemnes.kommune.no/webcam/korgen.jpg

while [ "$N" != "1" ]; do
   wget -N --directory-prefix=$DIR --no-check-certificate $IMAGE
   xli -geometry +100+100 -gamma 2.2 -delay 5 $DIR/korgen.jpg &
   sleep 4
done

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
zigbert


Joined: 29 Mar 2006
Posts: 5754
Location: Valåmoen, Norway

PostPosted: Thu 24 Mar 2011, 16:35    Post_subject:  

This one doesn't make a new window each download, but updates the running window.
Code:

#!/bin/bash
DIR=$HOME/.pwebcam
IMAGE=http://www.hemnes.kommune.no/webcam/korgen.jpg
echo -n $DIR/korgen.jpg

xli -geometry +100+100 -gamma 2.2 -delay 5 -goto $DIR/korgen.jpg $DIR/*.jpg &

while [ "$N" != "1" ]; do
   wget -N --directory-prefix=$DIR --no-check-certificate $IMAGE
   sleep 5
done

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Thu 24 Mar 2011, 19:39    Post_subject:  

has anyone been able to do this in such a way that it can be recorded and watched at the same time? tee + pipes maybe, or using x11grab on the stream window?
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
zigbert


Joined: 29 Mar 2006
Posts: 5754
Location: Valåmoen, Norway

PostPosted: Fri 25 Mar 2011, 14:06    Post_subject:  

Code:
#!/bin/bash

URL=http://www.hemnes.kommune.no/webcam/korgen.jpg

DIR=$HOME/.pwebcam
IMAGE_DIR=`dirname $URL`
IMAGE_BASE=`basename $URL`
echo -n $DIR/$IMAGE_BASE

xli -geometry +100+100 -gamma 2.2 -delay 1 -goto $DIR/$IMAGE_BASE $DIR/*.jpg &

while [ "$N" != "1" ]; do
   wget -N --directory-prefix=$DIR --no-check-certificate $URL
   ffmpeg -f image2 -i $DIR/$IMAGE_BASE -y $DIR/pwebcam.mpg
   cat $DIR/pwebcam.mpg >> $HOME/pwebcam.mpg
   sleep 1
done

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
zigbert


Joined: 29 Mar 2006
Posts: 5754
Location: Valåmoen, Norway

PostPosted: Sun 27 Mar 2011, 05:16    Post_subject:  

Here is a simple webcam viewer / recorder. You can control it from gui or commandline. The pet includes 'xli' as the viewer and 'resizepng' for scaling the downloaded image. These are not in Puppy by default. For recording it uses ffmpeg and that is already in you Puppy.


pwebcam-0.2.pet
Description 
pet

 Download 
Filename  pwebcam-0.2.pet 
Filesize  101.66 KB 
Downloaded  310 Time(s) 

_________________
Stardust resources

Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Mon 28 Mar 2011, 16:49    Post_subject:  

zigbert,

Very cool (I mean cold) webcam viewer Smile

You might move this code to just above the "while loop"

Code:
[ -f "$TARGETDIR/$IMAGE_NAME.mpg" ] && gxmessage "$TARGETDIR/$IMAGE_NAME.mpg already exist. Rename or move before continuing."


When record is true, the gxmessage keeps looping.

Can spring be far away there?

Cheers,
s
Back to top
View user's profile Send_private_message 
zigbert


Joined: 29 Mar 2006
Posts: 5754
Location: Valåmoen, Norway

PostPosted: Wed 30 Mar 2011, 04:56    Post_subject:  

seaside
Quote:
You might move this code to just above the "while loop"
Done.... I have made an actual use of it, and did some general fixing. Version 0.2 is uploaded 2 posts up.

Quote:
Can spring be far away there?
Hopefully not. Even I (who is a snow-lover) feels this winter has been a bit long. We've had snow since October, and there is still 1 meter left in the garden. Today it is snowing heavily.....


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0947s ][ Queries: 13 (0.0304s) ][ GZIP on ]