Hello!<br /><br />Intro: <br />I wrote script that in case of some event takes picture using usb webcam [Creative Live! Cam Vista IM (VF0420)] and command line utility v4lctl (from package xawtv).<br /><br />Problem1:<br />To catch error and info messages from script I used:<br />sys.stdout = open('/tmp/log','a')<br />sys.stderr=sys.stdout<br /><br />All writes to log file well, except v4lctl error messages. If script is run from commandline, than v4lctl error messages are shown there.<br />How to catch these messages?<br /><br />Problem2:<br />When script is run from /etc/init.d (in runlevel 2) during boot, no pictures are taken. I can't tell error message, because of Problem1.<br />If I execute now v4lctl from commandline (while my script is running in background), picture is taken.<br />If script is restarted (using same init.d startup script that was used by pc to start my python script) pictures are taken - all works.<br />I set in rc2.d that script starts at the end of boot - "S99script" - so it starts after webcam drivers are loaded.<br />I set delay of minute at the begining of script to allow pc to finish boot - no results.<br /><br /><br />In dmesg there are error messages:<br />"v4lctl: segm: ...... : error 4"<br /><br />Command executed: v4lctl -c /dev/video0 snap jpeg full test.jpg<br /><br />Using Linux Ubuntu 8. <br />Drivers for webcam - using EasyCam [https://help.ubuntu.com/community/EasyCam].<br />Where can be found v4lctl return codes?<br /><br /><br />Best regards,<br />Gatis Liepins
<!--                                                                                                                                                                                                                                                                                                                      -->