![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
General Help All your general support questions for Ubuntu, Kubuntu, Edubuntu and Xubuntu. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Way Too Much Ubuntu
![]() Join Date: May 2005
Beans: 151
|
odd request: Webcam as desktop background?
Hey, I've got a shiny new EeePC with a 1.3 MP camera built in. Drivers worked fine after downloading and compiling the newest uvcvideo modules; that's not the problem.
I would like to set it up so that the camera feed is the desktop "wallpaper". Is there any way to do this? Right now I'm using Gnome, but I would readily switch desktop environments if it let me do this.
__________________
double free or corruption (fasttop) |
|
|
|
|
|
#2 | |
|
Spilled the Beans
![]() Join Date: Aug 2006
Beans: 13
|
Re: odd request: Webcam as desktop background?
Quote:
To get started, lets try some things. This is NOT tested. Download and install VLC Set the webcam to store a video clip to your hard drive. Set VLC to stream the video to your background. Did this work? Is this what you wanted? The video filesize will get pretty large, sadly, and an EEEpc doesn't have a ton of storage space. Maybe someone can chime in on how to cut off the front of the video every once in a while, or a better solution overall? Also, have you considered how resource intensive this may be? |
|
|
|
|
|
|
#3 |
|
Way Too Much Ubuntu
![]() Join Date: May 2005
Beans: 151
|
Re: odd request: Webcam as desktop background?
Hey, found something else that works. Good ol' mplayer.
Sidenote: I kind of miss old-school Linux programs like mplayer. Belligerently user-unfriendly but capable of anything given the proper command line input. Which, in this case, is: mplayer -rootwin -fs -fps 15 tv:// -x 1024 -y 600 -sws 0 -vf crop=640:375 -rootwin sets it as the root window -fs stretches it to fullscreen -fps 15 keeps it at fifteen frames per second (to decrease processing time spent on it) tv:// goes to the default video source (the webcam) -x 1024 -y 600 stretches it to the exact resolution of my 1024x600 screen -sws 0 sets the software scaling mode to the least processor-intensive option -vf crop=640:375 crops the 640x480 camera output to the proper widescreen before stretching it, so the aspect doesn't get screwed up. This works almost perfectly and takes almost no CPU power. Some problems: 1) desktop icons won't show up, because I need to turn Nautlius's "show-desktop" option off. 2) other programs can't use the cam at the same time, unfortunately. 3) the biggie: suspend-to-RAM doesn't work when the camera is in use, or it does work but the camera stops working until a reboot. unfortunately, #3 there is a dealbreaker. I've filed a bug report; that happens with any program using the camera. Anyway, maybe anyone on a desktop where you don't need suspend might find this helpful.
__________________
double free or corruption (fasttop) |
|
|
|
|
|
#4 |
|
Way Too Much Ubuntu
![]() |
Re: odd request: Webcam as desktop background?
You can do it using xwinwrap.
EDIT: New![]() It boxes my conkys when i click on them. You can keep your icons and docks too. Code:
xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf -- mplayer -wid WID -quiet -fps 15 tv:// in terminal Code:
sudo apt-get install build-essential libx11-dev x11proto-xext-dev libxrender-dev libxext-dev cvs Code:
cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xapps co xwinwrap Code:
cd xwinwrap Code:
make Code:
sudo cp xwinwrap /usr/bin Last edited by easybake; August 8th, 2008 at 06:58 AM.. |
|
|
|
|
|
#5 |
|
Way Too Much Ubuntu
![]() Join Date: May 2005
Beans: 151
|
Re: odd request: Webcam as desktop background?
That's an excellent solution to problem 1 up there; now just to figure out 2 and 3.
__________________
double free or corruption (fasttop) |
|
|
|
|
|
#6 | |
|
Way Too Much Ubuntu
![]() |
Re: odd request: Webcam as desktop background?
Quote:
In terminal Code:
gedit blahblah Code:
#!/bin/sh # click to start, click to stop if pidof xwinwrap ; then killall xwinwrap else exec xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf -- mplayer -wid WID -quiet -fps 15 tv:// fi In terminal Code:
sudo chmod a+x blahblah Code:
./blahblah |
|
|
|
|
|
|
#7 |
|
Way Too Much Ubuntu
![]() Join Date: May 2005
Beans: 151
|
Re: odd request: Webcam as desktop background?
Hey, how did you get transparency to work right with mplayer? If I use the xv output driver, there are big black borders wherever something should be transparent. (And if I use the x11 driver, it takes like a third of my CPU power so that's right out.)
__________________
double free or corruption (fasttop) |
|
|
|
|
|
#8 | |
|
Way Too Much Ubuntu
![]() |
Re: odd request: Webcam as desktop background?
Quote:
Edit: I wrote a Howto on how i accomplished it, but it hasn't been approved yet. Last edited by easybake; August 7th, 2008 at 09:30 PM.. |
|
|
|
|
|
|
#9 |
|
Way Too Much Ubuntu
![]() Join Date: May 2005
Beans: 151
|
Re: odd request: Webcam as desktop background?
No, I'm using compiz. xwinwrap doesn't work at all under metacity. But the transparent parts of compiz (i.e. the whole damn point of compiz) don't do a proper transparent overlay over the video background, instead they just show solid blue or solid black or whatever.
Unless I change mplayer's output driver to x11 software rendering, but that's pretty CPU-heavy. If it's what's needed, though, I guess it's what I have to do. I'll just give it a high "nice" value.
__________________
double free or corruption (fasttop) |
|
|
|
|
|
#10 |
|
☀ ☀ ☀
![]() ![]() |
Re: odd request: Webcam as desktop background?
this is the best hack i've seen for awhile now.
thanks easybake ![]() |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|