From owner-freebsd-multimedia@FreeBSD.ORG Wed Jun 1 10:25:07 2011 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8928B106566B for ; Wed, 1 Jun 2011 10:25:07 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id 43FBE8FC14 for ; Wed, 1 Jun 2011 10:25:07 +0000 (UTC) Received: from bb.ipt.ru ([194.62.233.89]) by services.ipt.ru with esmtps (TLSv1:AES128-SHA:128) (Exim 4.54 (FreeBSD)) id 1QRibq-000Dr6-1k; Wed, 01 Jun 2011 14:25:06 +0400 From: Boris Samorodov To: Hans Petter Selasky References: <201105240020.49377.hselasky@c2i.net> <201105311932.38205.hselasky@c2i.net> <45215846@bb.ipt.ru> <201106011150.13316.hselasky@c2i.net> Date: Wed, 01 Jun 2011 14:25:05 +0400 In-Reply-To: <201106011150.13316.hselasky@c2i.net> (Hans Petter Selasky's message of "Wed, 1 Jun 2011 11:50:13 +0200") Message-ID: <23778750@bb.ipt.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-multimedia@freebsd.org Subject: Re: Pre-release of webcamd [v0.2.4] X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2011 10:25:07 -0000 Hi, On Wed, 1 Jun 2011 11:50:13 +0200 Hans Petter Selasky wrote: > On Wednesday 01 June 2011 11:41:13 Boris Samorodov wrote: > > Running: > > ----- > > % pwcview > > Webcam set to: 320x240 (sif) at 5 fps # OK (shaky, but it's 5 fps) > > % pwcview -f 30 > > Webcam set to: 320x240 (sif) at 30 fps # shaky video, (5 fps?) > > % pwcview -s vga > > Webcam set to: 640x480 (vga) at 5 fps # seems to use 30 fps > > % pwcview -s vga -f 5 > > Webcam set to: 640x480 (vga) at 5 fps # seems to use 30 fps > > ----- > > > > Thanks! > Hi, > The shakyness I'm not sure if my english is good here. When I say "shaky" it means that video is stable (fixed) for some moments, than changes and stable again. But it's OK for the first command since 5 fps is the default according to PWCVIEW(1) and video changes about 5 times per second. The problem is with the second video which should change 30 times per second. It does not. And I'm not sure that a buffer change may help here since I get good vga (-s vga) video with 30 fpc (i.e. existing buffers allows it). The next problem is that just with the option "-s vga" the resulting fps should be 5 (the default). But I get a good 30 fps video. And the last problem is that adding "-f 5" to "-s vga" option does not result in 5 fps video -- I get good 30 fps video! > I think can be fixed by increasing the buffer size used by UVC > video driver, it is currently very small, only 2*7ms: > Index: patches/uvcvideo.h.diff > =================================================================== > --- patches/uvcvideo.h.diff (revision 1788) > +++ patches/uvcvideo.h.diff (working copy) > @@ -8,7 +8,7 @@ > +#define UVC_URBS 2 > /* Maximum number of packets per URB. */ > -#define UVC_MAX_PACKETS 32 > -+#define UVC_MAX_PACKETS 56 > ++#define UVC_MAX_PACKETS (8*16) /* ms/8 for HighSpeed */ > /* Maximum number of video buffers. */ > #define UVC_MAX_VIDEO_BUFFERS 32 > /* Maximum status buffer size in bytes of interrupt URB. */ However I tested the patch with webcamd 0.1.26 (just editted by hand the existing patch, rebuild/reinstall webcamd, replug my cam). Nothing has changed. > This value should be dynamic depending on various factors like device speed > and endpoint configuration. I have found any time yet to make the change. -- WBR, Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD Committer, http://www.FreeBSD.org The Power To Serve