Page 2 of 3

Posted: Wed 17 Feb 2010, 18:54
by jemimah
Something like this perhaps.

Code: Select all

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.

Posted: Wed 17 Feb 2010, 19:29
by technosaurus
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)

Posted: Sun 21 Feb 2010, 01:04
by technosaurus
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

Logitech Webcam Pro 9000

Posted: Sun 21 Feb 2010, 06:55
by Kirby
*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! :D

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

Posted: Sun 21 Feb 2010, 17:54
by jemimah
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.

Posted: Sun 21 Feb 2010, 20:17
by abushcrafter
Failed to get a image from my "Logitech Quick Cam Express" web-cam :(.

Code: Select all

# 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 :(...

Posted: Mon 22 Feb 2010, 08:10
by 01micko
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: Select all

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

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

Posted: Mon 22 Feb 2010, 15:58
by technosaurus
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

Posted: Tue 23 Feb 2010, 08:21
by 01micko
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.

Posted: Thu 05 Aug 2010, 21:00
by edoc
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.

Posted: Thu 05 Aug 2010, 21:03
by jemimah
Have you tried FFconvert from Shinobar?

Posted: Thu 05 Aug 2010, 21:43
by edoc
Is there an option to convert AVI to AMR in FFconvert.

We couldn't find it.

CORRECTION:

My error, it wants AMV not AMR ... there is an option in wo-ff for AMR but not for AMV.

BTW: I did a conversion to AMR but it is identified in Puppy as a text file ... though that could be a mis-ID.

Posted: Thu 05 Aug 2010, 23:16
by edoc
I found this page of AMV sample files but the MP4 player that will only play AMV files says that the file format is wrong.

http://samples.mplayerhq.hu/amv/

Can someone test them on a known-good MP4 player that handles AMV and tell me if they are OK?

I need to know if this is just another piece of cheap Chinese fake-MP4 junk hardware that needs to be returned or if something else is going on with more than one AMV file format out there.

Sigh.

Posted: Sun 21 Nov 2010, 09:02
by jemimah
I rebuilt ucview with the newest libtheora and now theora encoding doesn't crash. Yay! Updates coming for Puppeee and Fluppy.

Posted: Mon 22 Nov 2010, 12:58
by abushcrafter
Yay :D! Could you also build it for other puppy's please.

Posted: Mon 22 Nov 2010, 17:22
by jemimah
Which Puppies?

Surely there's a UCview package in the Ubuntu repo that would work with LuPu?

Posted: Wed 24 Nov 2010, 13:40
by abushcrafter
I was think of a generic build that would work of 4.3.* or newer. How ever I can't test it until I get my non UVC logitech quick cam express webcam working. Then there's the though of that am am considering using Fluppy as a base for my system...

Posted: Sun 28 Aug 2011, 15:24
by MU
nice, many thanks!

Example video, grabbed with 1 frame every 5 seconds, then encoded with 25 fps (resulting in 125* speed):
http://www.youtube.com/watch?v=n9VAk_EN_Yc


using a subfolder called "1" to store the jpg frames:


grab.sh

Code: Select all

#!/bin/bash


thedir=1

while [ 1 ];do


 ffmpeg  -y -f video4linux2 -s 960x720 -r 1 -t 1 -i /dev/video $thedir/`date +%s`.jpg

# ffmpeg  -y -f video4linux2 -s 1280x960 -r 1 -t 1 -i /dev/video $thedir/`date +%s`.jpg

 sleep 5

done
encode.sh

Code: Select all

#!/bin/bash

thedir=1



#-vf eq2=gamma:contrast:brightness:saturation
#where gamma 0.1 - 10 (default 1.0), contrast -2 − 2 (default 1.0), brightnes -1 - 1 (default 0.0),
#saturation 0 − 3 (default 1.0),

#res="w=640:h=480"
res="w=960:h=720"


mencoder-mt mf://$thedir/*.jpg -mf $res:fps=25:type=jpg -ovc lavc \
    -vf eq2=1.4:1.2:0.0:1.5 \
    -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output-$thedir.avi
To encode I used this mencoder:
http://dotpups.de/puppy4/dotpups/Multim ... ltiThread/

Mark

Posted: Wed 16 Dec 2015, 08:22
by greengeek
Does anyone have a copy of the ucview pet please?
Jemimah - please come home. There is much to do.

Posted: Fri 18 Dec 2015, 12:00
by CatDude
Hello greengeek
greengeek wrote:Does anyone have a copy of the ucview pet please?
Jemimah - please come home. There is much to do.
After a quick search, it appears that the missing package from page 1 is/was unicap-0.9.5-i486.pet
you can grab a copy from here: http://akita.scottjarvis.com/

Hope that helps.
CatDude
.