video.start() .. invokes an IOError

Bug #552663 reported by Ben
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-v4l2capture
Fix Released
Undecided
Fredrik Portström

Bug Description

sorry if this is wrong, I am very new to Python.

I have install the module but when running the code supplied, i get the following:

./capture_picture.py

  libv4l2: error turning on stream: Invalid argument
  Traceback (most recent call last):
    File "./capture_picture.py", line 31, in <module>
       video.start()
   IOError: [Errno 22] Invalid argument

I am pretty sure the camera is working using v4l2 as using ffmap as follows works:

  vlc-wrapper -vvv v4l2:///dev/video0 :v4l2-fps=2 :v4l2-brightness=-1 :v4l2-contrast=-1 :v4l2-saturation=-1 :v4l2-black-level=-1 :v4l2-auto-white-balance=-1 :v4l2-exposure=-1 :v4l2-autogain=-1 :v4l2-hue=-1 :v4l2-width=640 :v4l2-height=480 --sout=/root/bens_tests/images/video.avi

I am using a USB "Z-Star Microelectronics Corp. ZC0303 Webcam" (Driver: zc3xx) and I am on Ubuntu 9.10
  (uname -a output: "Linux nb-03 2.6.31-20-generic #57-Ubuntu SMP Mon Feb 8 09:05:19 UTC 2010 i686 GNU/Linux")

Please let me know if you any more information... .or if I am missing something or doing something wrong.

Many thanks,
-Ben

Revision history for this message
Fredrik Portström (portstrom) wrote :

I've heard about this problem before. It seems to be that some devices require Video_device.queue_all_buffers to be called before Video_device.start. I've made a new release with the example script forked into two separate scripts, capture_picture.py which should work for you and capture_picture_delayed.py which is equal to the old script except new comments. Tell if this solves your problem.

Changed in python-v4l2-capture:
assignee: nobody → Fredrik Portström (rheo)
status: New → Fix Released
Revision history for this message
Ben (bugthing) wrote :

Excellent!... works very nicely now.
Thank you very much for sorting this out so quickly.
I will be playing with this for a while now adjusting brightness etc... but now I can get an image its a good start :)

I work for a small IT company in the UK... if we can help you in return please let me know (hosting, etc.)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.