public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Testing Requested: Python Bindings for Video4linux2
@ 2008-10-28 14:14 Jackson Yee
  2008-11-06  0:42 ` Laurent Pinchart
  0 siblings, 1 reply; 13+ messages in thread
From: Jackson Yee @ 2008-10-28 14:14 UTC (permalink / raw)
  To: video4linux-list

For anyone who is a fellow python fan and has a video4linux2 capture
card, please try out

http://code.google.com/p/python-video4linux2/

and let me know if the samples work out for you. I'd like to see how
this performs on cards other than my Happugage ImpactVCB.

--
Regards,
Jackson Yee
The Possum Company
540-818-4079
me@gotpossum.com

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Testing Requested: Python Bindings for Video4linux2
@ 2008-11-24  8:21 Jens Bongartz
  0 siblings, 0 replies; 13+ messages in thread
From: Jens Bongartz @ 2008-11-24  8:21 UTC (permalink / raw)
  To: video4linux-list

Hi Jackson, Laurent and Carl,

I would appreciate the uvcvideo supprt of the Python bindings for
Video4Linux2 a lot.
Could you send a message on this list, when its done?

Thanks a lot,
Jens


Lauren,

On Wed, Nov 5, 2008 at 7:42 PM, Laurent Pinchart
<laurent.pinchart@xxxxxxxxx> wrote:
> The uvcvideo driver doesn't implement the standard ioctls. This should not be
> fatal (and you probably want to define FindKeyas well).

The standard ioctls are, unfortunately, all I have to go by since I'm
testing on my amd64 box with a bttv card. If a function does not
succeed though, it should throw an exception and let the user code
sort things out. Do you have a link for the uncvideo driver so I could
add support for it?

FindKey looks to be Carl's code. ;-) I've added the function now.

> The problem comes from a bad alignment in the PixFormat structure. At least on
> my architecture (x86) the type field is 32 bits wide.

I've updated the type field on PixFormat to c_long, which should come
out to be the right size on both x86 and amd64 platforms now.

Thanks for the test. I'm working on adding libavcodec/libavformat
support so that we can capture straight to video instead of jpegs like
we're doing now. Please let me know if we have any other issues.

-- 
Regards,
Jackson Yee
The Possum Company
540-818-4079
me@xxxxxxxxxxxxx

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re:Testing Requested: Python Bindings for Video4linux2
@ 2008-12-31 16:17 Jens Bongartz
  2008-12-31 18:12 ` Testing " Jackson Yee
  2009-01-04  0:02 ` Laurent Pinchart
  0 siblings, 2 replies; 13+ messages in thread
From: Jens Bongartz @ 2008-12-31 16:17 UTC (permalink / raw)
  To: jackson, laurent.pinchart, carl, video4linux-list

Hi everybody,

I saw this thread recently and I am interested in this topic too.
I am using a Logitech Quickcam 9000 Pro with the uvcvideo driver. The
camera works properly with the uvccapture application.
I did some experiment with the python-video4linux2 bindings using the
python interactive mode. To be honest I am not really familiar with
v4l2.
Here are my results:

>>> import pyv4l2
>>> cam = pyv4l2.Device('dev/video0')
>>> cam.EnumInput(0)
['Camera 1', 'camera', 0L, 0L, [], []]
>>> cam.EnumFormats(1)
[('MJPG', 'MJPEG'), ('YUYV', 'YUV 4 :2 :2 (YUYV)')]
>>> cam.GetResolutions()
[(320L, 240L), (640L, 480L), (800L, 600L)]
>>> cam.QueryCaps()
>>> cam.driver
'uvcvideo'
>>> cam.businfo
'0000:00:10.1'
>>> cam.card
'UVC Camera (046d:0990)'
>>> cam.GetFormat()
>>> cam.format.width
800L
>>> cam.format.height
600L
>>> cam.format.pixelformat
'MJPEG'
>>> cam.SetFormat()

The Read() method works without an error message and the buffer is created.
>>> cam.Read()
>>> cam.buffer
<ctypes.c_char_Array_62933 object at 0xb7e5053c>

But the camera seems not to react to the Read() call. The camera's LED
does not flash like using the uvccapture application and the buffer is
filled just with '\x00'. Am I doing something wrong?

As Laurent already mentioned the "d.SetStandard( d.standards['NTSC']
)" call creates an exception.
Any suggestions? I would be happy to this webcam work with python.

Wish you all the best for 2009.

Best regards,
Jens


>From: Laurent Pinchart <laurent.pinchart <at> skynet.be>
>Subject: Re: Testing Requested: Python Bindings for Video4linux2
>Date: 2008-11-09 22:07:20 GMT (7 weeks, 2 days, 18 hours and 5 minutes ago)

>Hi,

>On Friday 07 November 2008, Jackson Yee wrote:
>> Lauren,
>>
>> On Wed, Nov 5, 2008 at 7:42 PM, Laurent Pinchart
>>
>> <laurent.pinchart <at> skynet.be> wrote:
>> > The uvcvideo driver doesn't implement the standard ioctls. This should
>> > not be fatal (and you probably want to define FindKeyas well).
>>
>> The standard ioctls are, unfortunately, all I have to go by since I'm
>> testing on my amd64 box with a bttv card. If a function does not
>> succeed though, it should throw an exception and let the user code
>> sort things out.

>That's right. But your sample application should handle that.

>> Do you have a link for the uncvideo driver so I could add support for it?

>Sure. http://linux-uvc.berlios.de/

>> FindKey looks to be Carl's code. ;-) I've added the function now.
>>
>>> > The problem comes from a bad alignment in the PixFormat structure. At
>> > least on my architecture (x86) the type field is 32 bits wide.
>>
>> I've updated the type field on PixFormat to c_long, which should come
>> out to be the right size on both x86 and amd64 platforms now.
>>
>> Thanks for the test. I'm working on adding libavcodec/libavformat
>> support so that we can capture straight to video instead of jpegs like
>> we're doing now. Please let me know if we have any other issues.

>Best regards,

>Laurent Pinchart

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-01-06 21:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-28 14:14 Testing Requested: Python Bindings for Video4linux2 Jackson Yee
2008-11-06  0:42 ` Laurent Pinchart
2008-11-07  0:12   ` Jackson Yee
2008-11-07  4:30     ` Carl Karsten
2008-11-09 22:07     ` Laurent Pinchart
  -- strict thread matches above, loose matches on Subject: below --
2008-11-24  8:21 Jens Bongartz
2008-12-31 16:17 Jens Bongartz
2008-12-31 18:12 ` Testing " Jackson Yee
2009-01-04  0:02 ` Laurent Pinchart
2009-01-04 23:22   ` Jens Bongartz
2009-01-05 18:20     ` Paul Thomas
2009-01-05 20:42       ` Jens Bongartz
2009-01-06 16:37     ` Laurent Pinchart
2009-01-06 21:43       ` Jens Bongartz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox