All went well except for one hiccup; the webcam. My mother-in-law loves to Skype and at the very least I had to make sure that was working. After googling around a bit I found directions to install the Video4Linux control panel to tweak the camera settings and for some reason a script to launch Skype with a specific library preloaded.
#!/bin/bash
#LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so /usr/bin/skype
I had tried the first library and it didn't work, so the second attempt I left. Still didn't work. Then I noticed something. When I installed Cheeze (so I could test the webcam without having to call someone on Skype), the camera wouldn't work until I did a preview in the Video4Linux control panel.
I had no idea why this was, but in an effort to get this working, I decided to automate it. Gnome3 is nice, but ALL of the advanced controls for anything you want to do is GONE. Ok, I might have overstated that a bit but it was a bit frustrated being familiar with Gnome2. At least the Gnome Shell Extensions in Mint made it easier to use.
After investigating how the Video4Linux control panel did its preview I wrote the following script named "initialize.camera.sh" and set it to executable (sudo chmod a+x initialize.camera.sh).
#!/bin/sh
mplayer tv:// -vo test.mpg
What the script essentially does is grab a frame from the camera and directing the output to a file. Something is wrong with my mplayer syntax, but it works, so I'm good. Fight the battles worth fighting and all that.
After I confirmed the script was working, I had to add it to the startup when she logged in, so from a terminal I ran gnome-session-properties, added it as a startup application, did a reboot test and voila!

No comments:
Post a Comment