| Author |
Message |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Wed 17 Feb 2010, 01:31 Post subject:
|
|
@jemimah - based on your work with gtrayicon in pwireless2 do you think you could throw together a little tray applet that displays rotating images from a webcam - there is a pwidget that it may work with too
| Code: | <<begin loop>>
ffmpeg -y -r 1 -t 2 -f video4linux2 -s 24x24 -i /dev/video0 ~/.pcamtray/camshot%d.png &
<update trayicon> ~/.pcamtray/camshot1.png
<update trayicon> ~/.pcamtray/camshot2.png
<<end loop>> |
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: Wed 17 Feb 2010, 11:51 Post subject:
|
|
Gtrayicon is probably much too limited for what you want. I don't think it will reload the icon after starting.
However, I've been playing with Vattery, which is a battery monitor applet written in Vala - and it's not hard to make it monitor other stuff besides batteries.
Although, I'm a bit confused. Wouldn't a webcam image in the systray be too small to see? What's the overall goal of this exercise?
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Wed 17 Feb 2010, 14:00 Post subject:
|
|
I guess that depends on the size of your tray - ecomoney was asking in another thread about being able to monitor several webcams for activity (basically outdoor security cameras) after thinking about it, it may be better as a pwidget than a tray monitor... however I thought that gtrayicon could have two different images and that they reloaded the image each time the status changed (basically compare timestamp on image1 and image2 with an appropriate sleep in between) The location and name of the icons (sets of 2 streamed images) would be static but the actual image would change as it is updated by ffmpeg, so gtrayicon would "think" it was only toggling between 2 images. The tray itself is not limited to being attached to the taskbar even in jwm.. and many strictly window managers will use stalone tray which can account for this too. I agree though that for most individual users with only 1 webcam, a widget (probably an adapted slideshow pwidget) would be better suited. Alas NECESSITY is the mother of invention - not just geekiness for geekiness sake - I personally have no need for it at all now because my Acer builtin webcam finally stopped working altogether (I had only been getting 1/4 of the screen recently) I hope our business (and/or paranoid) users find a solution that is better than the bloated, mysql-dependent solution that ecomoney was talking about using.
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: Wed 17 Feb 2010, 14:25 Post subject:
|
|
I figured gtrayicon loaded the images into memory, but I just tested - and what you propose could work.
I do think Pwidgets would make more sense though. Isn't 01micko working on a slideshow widget?
|
|
Back to top
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: Wed 17 Feb 2010, 14:34 Post subject:
|
|
Or you could just write a script to update your Rox wallpaper every few seconds.
|
|
Back to top
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: Wed 17 Feb 2010, 14:54 Post subject:
|
|
Something like this perhaps.
| Code: |
while true ; do
ffmpeg -y -r 1 -t 1 -f video4linux2 -s xga -i /dev/video0 /tmp/camshot%d.jpg
/usr/local/apps/Wallpaper/set_bg /tmp/camshot1.jpg
sleep 3
done
|
Geez I had to turn that off, that's creepy since my webcam points at me.
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Wed 17 Feb 2010, 15:29 Post subject:
|
|
Yeah, that looks like it should work - never thought about the background image - I guess you could even use imaging tools to combine images from multiple camera sources (though its not my area of expertise)... if you had a webserver with an autorefresh script built in you could even use it for remote viewing (over the web - not ESP)... the possibilities are limitless I guess. ... If my webcam was working I would test it out... maybe add simultaneous video recording but I'm not sure if you can you record video and take images from the same /dev/video0 simultaneously or would you get a "device already in use" (if so I guess opening the video in defaultmediaplayer after recording is started would work if you have the resources.... though I haven't been able to test that either)
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sat 20 Feb 2010, 21:04 Post subject:
|
|
thus far the best option I can find is conky WITH Imlib2 support (Puppy's does not currently, but I will compile Imlib2 and recompile conky to check the size... would allow wbar to be installed too)
the conkyrc file should look something like this:
imlib cache_size 0
$(image /path/to/camshot1.jpg -p 0,10)
for multiple webcams
imlib cache_size 0
$(image /path/to/cam1shot1.jpg -p 0,10)$(image /path/to/cam2shot1.jpg -p 0,110)$(image /path/to/cam3shot1.jpg -p 0,210)
You can run conky first and then run your ffmpeg loop (may need dummy images though)
and you would need 1 per camera in your while loop:
ffmpeg -y -r 1 -t 1 -f video4linux2 -s 100x100 -i /dev/video0 /tmp/cam1shot%d.jpg
ffmpeg -y -r 1 -t 1 -f video4linux2 -s 100x100 -i /dev/video1 /tmp/cam2shot%d.jpg
ffmpeg -y -r 1 -t 1 -f video4linux2 -s 100x100 -i /dev/video2 /tmp/cam3shot%d.jpg
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
Kirby

Joined: 28 Dec 2009 Posts: 52 Location: Oregon, US
|
Posted: Sun 21 Feb 2010, 02:55 Post subject:
Logitech Webcam Pro 9000 Subject description: this pet works like a charm on Puppy Stardust 2009 (Puppy 4.31) |
|
*kneels before Jemimah in gratitude and humility*
OMG! OMG! OMG! Thank You SOOOOOOOOO very Much for that pet! I had bought a Logitech Webcam Pro 9000 just for puppy and nothing would work until I installed these Pets! You have No Idea how Very Happy I am now! I was having to log out of Puppy and log into Win Xp *gags* just to use my web cam!
I only tried it for a few mins and made the mistake of clicking on full screen but could not figure out how to get out so had to reboot. But it looks great!
Now I just need some friendly video editing software for Puppy and I will never have to leave it again!
Thank You So very Much for posting these pets Jemimah
Your humble servant for life.
Kirby
_________________ "When you come to your cross roads, step off the road and go down the path of your own making".
~Bohemian proverb~
*edit* "When you're lost in the woods from straying from the road, Always be sure to carry a Flashlight!"
~Improved Bohemian Proverb~
|
|
Back to top
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: Sun 21 Feb 2010, 13:54 Post subject:
|
|
You're welcome!
Let me know how the video editing thing goes. I'm uncertain what the best way to convert the raw avi that Ucview outputs, or if it even has sound embedded or not.
|
|
Back to top
|
|
 |
abushcrafter

Joined: 30 Oct 2009 Posts: 1447 Location: England
|
Posted: Sun 21 Feb 2010, 16:17 Post subject:
|
|
Failed to get a image from my "Logitech Quick Cam Express" web-cam .
| Code: | # ucview
** (ucview:13128): WARNING **: Failed to create '/root/.ucview/plugins'
search module path: /usr/lib/ucview/plugins
** (ucview:13128): WARNING **: Failed to start video capture
# |
Oh I do wish Theora video worked by the way ...
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7018 Location: qld
|
Posted: Mon 22 Feb 2010, 04:10 Post subject:
|
|
Hmmm....
techno & jemimah
I have produced 3 pwidgets slideshows which all should work with a webcam. The gtk-dialog one does, as demoed in the stardust 010 thread, I made the original xli slideshow and a slideshow for the pwidgets extras (with conky 1.7.1 and imlib2, see pwidgets thread around page 150??), I'm sure a webcam could work with both of those.
I use a debian imlib2, an older version but I threw out everything except the actual libs and conky 1.7x seems to work fine with it. It will be good to see how skinny you can get imlib2 techno.
Cheers
EDIT! Patriot already got conky-1.7.11 real small, like around 70MB, that's the one INCLUDED in the pwidgets extras (see MAIN pwidgets page). I got the slideshow/webcam to work, easy, no need to loop, conky takes care of that with "execi $NUMBER" . Made a separate pwidgets script just call ing the ffmpeg cam shot.
| Code: | TEXT
${execi 1 /usr/local/pwidgets/widgets/scripts/Webcam}
${image /tmp/cam/camshot1.jpg -s 140x105}
| um that's the conky config for pwidgets
| Code: | #!/bin/sh
mkdir /tmp/cam
#while true ; do
ffmpeg -y -r 1 -t 1 -f video4linux2 -s qvga -i /dev/video0 /tmp/cam/camshot%d.jpg &
#sleep 1
#done | That's your script, loop disabled. I think you can run multiple instances, provided filenames don't clash.
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Mon 22 Feb 2010, 11:58 Post subject:
|
|
sounds great - the only thing I might change is the -s qvga in the ffmpeg line to be -s 140x105 if that is the default widget size ... only 1 scaling instead of 2 - I think I compiled Imlib2 already- I'll have to look and recompile conky
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7018 Location: qld
|
Posted: Tue 23 Feb 2010, 04:21 Post subject:
|
|
| technosaurus wrote: | | sounds great - the only thing I might change is the -s qvga in the ffmpeg line to be -s 140x105 if that is the default widget size ... only 1 scaling instead of 2 - I think I compiled Imlib2 already- I'll have to look and recompile conky |
anything 4:3 ratio is ok (up to about 160 wide for Pwidgets, maybe a little larger), so long as both are even numbers,... 140x105 doesn't work, but 140x106 does.
BTW, tried the gtk-dialog ver with bash mathematics and grepping screen size from /etc/X11/xorg.conf and the best I can get is 3fps... a bit too flickery with the gtk-dialog lag. I have a 5 yo system with plenty of ram and a decent graphics card.
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
edoc

Joined: 07 Aug 2005 Posts: 3937 Location: Southeast Georgia, USA
|
Posted: Thu 05 Aug 2010, 17:00 Post subject:
|
|
| technosaurus wrote: | I guess you could open defaultmediaplayer to play the file as it is being recorded
Edit:
the script will stop on ffmpeg unless you use the "&"
ffmpeg .... &
defaultmediaplayer $DIR/$FILE
I was making some changes to woo-ff to fix up some hacks, but haven't tested the changes yet... here it is though if you want it for reference |
Any news re. wo-ff?
Our daughter is looking for a way to convert AVI and other files to AMR for her new MP4 player.
_________________ Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Multiple computers - currently running Puppy Exprimo ver. 5x15
|
|
Back to top
|
|
 |
|