Discussion:
[Linux-uvc-devel] Logitech QuickCam Pro 9000, unable to get more then 5 fps when live recording, whats going on?
Jelle de Jong
2009-03-12 21:09:04 UTC
Permalink
Hello everybody,

I bought a Logitech QuickCam Pro 9000[1] (80euro) to make a budget
free/libre open source live video recording systems from a laptop. But I
am unable to get more then 5 frames per seconds (fps) out of the webcam
under any resolution. The last 4 days I have been trying to get this
system to work both with webcam and a digital video camera on combisite1
of a usb video grabber.

The webcam only delivers 5 fps tops most time its lower is this normal
and what to do about is, should I buy an other webcam and witch one?

Please see the attachments for all good reports about fps and mencoder
and mplayer commands.

Thanks in advance for any help,

Best regards,

Jelle de Jong

$ lsusb
Bus 005 Device 011: ID 046d:0990 Logitech, Inc. QuickCam Pro 9000

$ sudo lsusb -d 046d:0990 -v | grep bcdDevice
bcdDevice 0.08

$ uname -a
Linux debian-eeepc 2.6.26-1-686 #1 SMP Sat Jan 10 18:29:31 UTC 2009 i686
GNU/Linux

[1]
http://www.logitech.com/index.cfm/webcam_communications/webcams/devices/3056&cl=us,en
[1]
http://www.quickcamteam.net/documentation/faq/how-many-versions-of-the-quickcam-pro-9000-are-there
Jelle de Jong
2009-03-12 21:59:12 UTC
Permalink
Post by Jelle de Jong
Hello everybody,
I bought a Logitech QuickCam Pro 9000[1] (80euro) to make a budget
free/libre open source live video recording systems from a laptop. But I
am unable to get more then 5 frames per seconds (fps) out of the webcam
under any resolution. The last 4 days I have been trying to get this
system to work both with webcam and a digital video camera on combisite1
of a usb video grabber.
The webcam only delivers 5 fps tops most time its lower is this normal
and what to do about is, should I buy an other webcam and witch one?
Please see the attachments for all good reports about fps and mencoder
and mplayer commands.
It seems you use eeepc. Did you test the cam with another PC? Is your
USB Port 1.1 or 2.0 (check with usbview).
I have several 9000 here and I don't have issues with debian and this cam.
You might want to get latest uvcvideo kernel module, but this cam is
supported for a long time already.
hth,
Philipp
Hi Philipp,

Thanks for responding, what version of the webcam do you have? I seem to
have a got a 0.08

My ports are usb 2.0 I did not test it with an other pc I only have
eeepc's around me.

Is there a debian package for the latest uvcvideo kernel module?

Could you test this command for me and show me the output: (especially fps)

mencoder tv:// -tv driver=v4l2:device=/dev/video0:fps=5 -ovc lavc
-lavcopts vcodec=mpeg4:vbitrate=2240:threads=2 -of rawvideo -o webcam4.mp4

Thanks in advance,

Jelle de Jong
Paulo Assis
2009-03-13 09:10:14 UTC
Permalink
Jelle,
You must tick off the "Exposure, Auto Priority" control this is enable
by default and increases the exposure time (reducing fps) in order to
get a brighter picture.

Just use libwebcam or guvcview.

Best regards,
Paulo
Post by Jelle de Jong
Post by Jelle de Jong
Hello everybody,
I bought a Logitech QuickCam Pro 9000[1] (80euro) to make a budget
free/libre open source live video recording systems from a laptop. But I
am unable to get more then 5 frames per seconds (fps) out of the webcam
under any resolution. The last 4 days I have been trying to get this
system to work both with webcam and a digital video camera on combisite1
of a usb video grabber.
The webcam only delivers 5 fps tops most time its lower is this normal
and what to do about is, should I buy an other webcam and witch one?
Please see the attachments for all good reports about fps and mencoder
and mplayer commands.
It seems you use eeepc. Did you test the cam with another PC? Is your
USB Port 1.1 or 2.0 (check with usbview).
I have several 9000 here and I don't have issues with debian and this cam.
You might want to get latest uvcvideo kernel module, but this cam is
supported for a long time already.
hth,
Philipp
Hi Philipp,
Thanks for responding, what version of the webcam do you have? I seem to
have a got a 0.08
My ports are usb 2.0 I did not test it with an other pc I only have
eeepc's around me.
Is there a debian package for the latest uvcvideo kernel module?
Could you test this command for me and show me the output: (especially fps)
mencoder tv:// -tv driver=v4l2:device=/dev/video0:fps=5 -ovc lavc
-lavcopts vcodec=mpeg4:vbitrate=2240:threads=2 -of rawvideo -o webcam4.mp4
Thanks in advance,
Jelle de Jong
_______________________________________________
Linux-uvc-devel mailing list
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
Jelle de Jong
2009-03-13 12:40:59 UTC
Permalink
Post by Paulo Assis
Jelle,
You must tick off the "Exposure, Auto Priority" control this is enable
by default and increases the exposure time (reducing fps) in order to
get a brighter picture.
Just use libwebcam or guvcview.
Best regards,
Paulo
Post by Jelle de Jong
Post by Jelle de Jong
Hello everybody,
I bought a Logitech QuickCam Pro 9000[1] (80euro) to make a budget
free/libre open source live video recording systems from a laptop. But I
am unable to get more then 5 frames per seconds (fps) out of the webcam
under any resolution. The last 4 days I have been trying to get this
system to work both with webcam and a digital video camera on combisite1
of a usb video grabber.
The webcam only delivers 5 fps tops most time its lower is this normal
and what to do about is, should I buy an other webcam and witch one?
Please see the attachments for all good reports about fps and mencoder
and mplayer commands.
It seems you use eeepc. Did you test the cam with another PC? Is your
USB Port 1.1 or 2.0 (check with usbview).
I have several 9000 here and I don't have issues with debian and this cam.
You might want to get latest uvcvideo kernel module, but this cam is
supported for a long time already.
hth,
Philipp
Hi Philipp,
Thanks for responding, what version of the webcam do you have? I seem to
have a got a 0.08
My ports are usb 2.0 I did not test it with an other pc I only have
eeepc's around me.
Is there a debian package for the latest uvcvideo kernel module?
Could you test this command for me and show me the output: (especially fps)
mencoder tv:// -tv driver=v4l2:device=/dev/video0:fps=5 -ovc lavc
-lavcopts vcodec=mpeg4:vbitrate=2240:threads=2 -of rawvideo -o webcam4.mp4
Thanks in advance,
Jelle de Jong
Hello Paulo,

Thank you for your response.

I now see whats happening, the fps drops to around 5fps when the
environment is dark and goes to around 30fps when the environment is bright.

I changed Exposure, Auto Priority to 0 and now I seem to have an higher
stable fps.

It also seems that when recording to disk the fps also drop form say
30fps to 10fps but the cpu load and mem use is very low, is this normal?

I have installed guvcview and played a bit with the many controls. The
commandline shows a lot of errors, and the webcam responses very weird,
when trying to change the settings most things fail. I have attached the
guvcview.log.

How can I control the webcam with standardized v4l2 controls?

I want to use a webcam to record live images that move and have different
light environments, so the webcam has to adjust automatically to output
the best possible images. Is this a very hard thing to ask? I am willing
to buy a new device the only demands are usb interface and full v4l2
support. I have no idea of what is a good usb camera and what is not is
the QuickCam Pro 9000 the best one available? (200euro budget)

Is there a some anti shakiness feature like photo and video cameras have.
I kind of have shocking hands when video recording?

Is there also some feature to say well do auto exposure but make sure it
does not go below 20 fps?

So now I use the following command to record with the webcam:
mencoder tv:// -tv
driver=v4l2:device=/dev/video0:adevice=/dev/dsp1:immediatemode=0:forceaudio:width=800:height=600:fps=25
-oac lavc -lavcopts acodec=libmp3lame:abitrate=128 -ovc lavc -lavcopts
vcodec=mpeg4:vbitrate=2240:threads=2 -of lavf -lavfopts format=avi -o
webcam5.avi

but the output is 640x480 with 15 fps not the resolution and fps I
supplied with the mencoder command why is this and how to fix this using
mencoder to record? Please also see the attached webcam5.log.

Any help is welcome.

Thanks in advance,

Jelle de Jong
Paulo Assis
2009-03-13 13:45:05 UTC
Permalink
Jelle,
Post by Jelle de Jong
Post by Paulo Assis
Jelle,
You must tick off the "Exposure, Auto Priority" control this is enable
by default and increases the exposure time (reducing fps) in order to
get a brighter picture.
Just use libwebcam or guvcview.
Best regards,
Paulo
Post by Jelle de Jong
Post by Jelle de Jong
Hello everybody,
I bought a Logitech QuickCam Pro 9000[1] (80euro) to make a budget
free/libre open source live video recording systems from a laptop. But I
am unable to get more then 5 frames per seconds (fps) out of the webcam
under any resolution. The last 4 days I have been trying to get this
system to work both with webcam and a digital video camera on combisite1
of a usb video grabber.
The webcam only delivers 5 fps tops most time its lower is this normal
and what to do about is, should I buy an other webcam and witch one?
Please see the attachments for all good reports about fps and mencoder
and mplayer commands.
It seems you use eeepc. Did you test the cam with another PC? Is your
USB Port 1.1 or 2.0 (check with usbview).
I have several 9000 here and I don't have issues with debian and this cam.
You might want to get latest uvcvideo kernel module, but this cam is
supported for a long time already.
hth,
Philipp
Hi Philipp,
Thanks for responding, what version of the webcam do you have? I seem to
have a got a 0.08
My ports are usb 2.0 I did not test it with an other pc I only have
eeepc's around me.
Is there a debian package for the latest uvcvideo kernel module?
Could you test this command for me and show me the output: (especially fps)
mencoder tv:// -tv driver=v4l2:device=/dev/video0:fps=5 -ovc lavc
-lavcopts vcodec=mpeg4:vbitrate=2240:threads=2 -of rawvideo -o webcam4.mp4
Thanks in advance,
Jelle de Jong
Hello Paulo,
Thank you for your response.
I now see whats happening, the fps drops to around 5fps when the
environment is dark and goes to around 30fps when the environment is bright.
I changed Exposure, Auto Priority to 0 and now I seem to have an higher
stable fps.
It also seems that when recording to disk the fps also drop form say
30fps to 10fps but the cpu load and mem use is very low, is this normal?
I have installed guvcview and played a bit with the many controls. The
commandline shows a lot of errors, and the webcam responses very weird,
when trying to change the settings most things fail. I have attached the
guvcview.log.
The warnings you see under guvcview are related to dynamic controls
(focus, LED control, ...) if you want these controls enabled you must
run guvcview as the root user at least once per session.

If you try to change let's say gain and you have auto gain set then this
will fail, the same for exposure and white balance.

Has for a fixed frame rate your best option with that model is using
manual exposure. Just choose an appropriate exposure setting and stick
with that.
Post by Jelle de Jong
How can I control the webcam with standardized v4l2 controls?
guvcview uses a standard v4l2 interface.
if you just want to use the controls, and capture video with some other
app. run:
guvcview --controls_only
Post by Jelle de Jong
I want to use a webcam to record live images that move and have different
light environments, so the webcam has to adjust automatically to output
the best possible images. Is this a very hard thing to ask? I am willing
to buy a new device the only demands are usb interface and full v4l2
support. I have no idea of what is a good usb camera and what is not is
the QuickCam Pro 9000 the best one available? (200euro budget)
In my case I own a sphere AF and a pro5000 (2007 model) and at least
with guvcview I never noticed any significant frame drop when
recording video, but then guvcview doesn't use any expensive video
compression (just MJPG in case of yuv data).
With mencoder you are compressing to mpeg4, this is very CPU expensive.
Post by Jelle de Jong
Is there a some anti shakiness feature like photo and video cameras have.
I kind of have shocking hands when video recording?
In a webcam ???
Never heard of any such feature.
Post by Jelle de Jong
Is there also some feature to say well do auto exposure but make sure it
does not go below 20 fps?
I always use auto-exposure with both my cameras and I can easily record
avi's with 30 fps, be it a dark or bright environment.
Post by Jelle de Jong
mencoder tv:// -tv
driver=v4l2:device=/dev/video0:adevice=/dev/dsp1:immediatemode=0:forceaudio:width=800:height=600:fps=25
-oac lavc -lavcopts acodec=libmp3lame:abitrate=128 -ovc lavc -lavcopts
vcodec=mpeg4:vbitrate=2240:threads=2 -of lavf -lavfopts format=avi -o
webcam5.avi
but the output is 640x480 with 15 fps not the resolution and fps I
supplied with the mencoder command why is this and how to fix this using
mencoder to record? Please also see the attached webcam5.log.
I'm not really a mencoder guru, have you tried recording on guvcview or
cheese ?
Maybe you should try some other lighter compression method when
recording, and convert the resulting file to mpg4 ( I recommend avidemux
for editing and compressing the captured file).
Post by Jelle de Jong
Any help is welcome.
Thanks in advance,
Jelle de Jong
Best regards,

Paulo
Jelle de Jong
2009-03-13 21:38:57 UTC
Permalink
Post by Paulo Assis
Jelle,
Post by Jelle de Jong
Post by Paulo Assis
Jelle,
You must tick off the "Exposure, Auto Priority" control this is enable
by default and increases the exposure time (reducing fps) in order to
get a brighter picture.
Just use libwebcam or guvcview.
Best regards,
Paulo
Post by Jelle de Jong
Post by Jelle de Jong
Hello everybody,
I bought a Logitech QuickCam Pro 9000[1] (80euro) to make a budget
free/libre open source live video recording systems from a laptop. But I
am unable to get more then 5 frames per seconds (fps) out of the webcam
under any resolution. The last 4 days I have been trying to get this
system to work both with webcam and a digital video camera on combisite1
of a usb video grabber.
The webcam only delivers 5 fps tops most time its lower is this normal
and what to do about is, should I buy an other webcam and witch one?
Please see the attachments for all good reports about fps and mencoder
and mplayer commands.
It seems you use eeepc. Did you test the cam with another PC? Is your
USB Port 1.1 or 2.0 (check with usbview).
I have several 9000 here and I don't have issues with debian and this cam.
You might want to get latest uvcvideo kernel module, but this cam is
supported for a long time already.
hth,
Philipp
Hi Philipp,
Thanks for responding, what version of the webcam do you have? I seem to
have a got a 0.08
My ports are usb 2.0 I did not test it with an other pc I only have
eeepc's around me.
Is there a debian package for the latest uvcvideo kernel module?
Could you test this command for me and show me the output: (especially fps)
mencoder tv:// -tv driver=v4l2:device=/dev/video0:fps=5 -ovc lavc
-lavcopts vcodec=mpeg4:vbitrate=2240:threads=2 -of rawvideo -o webcam4.mp4
Thanks in advance,
Jelle de Jong
Hello Paulo,
Thank you for your response.
I now see whats happening, the fps drops to around 5fps when the
environment is dark and goes to around 30fps when the environment is bright.
I changed Exposure, Auto Priority to 0 and now I seem to have an higher
stable fps.
It also seems that when recording to disk the fps also drop form say
30fps to 10fps but the cpu load and mem use is very low, is this normal?
I have installed guvcview and played a bit with the many controls. The
commandline shows a lot of errors, and the webcam responses very weird,
when trying to change the settings most things fail. I have attached the
guvcview.log.
The warnings you see under guvcview are related to dynamic controls
(focus, LED control, ...) if you want these controls enabled you must
run guvcview as the root user at least once per session.
If you try to change let's say gain and you have auto gain set then this
will fail, the same for exposure and white balance.
Has for a fixed frame rate your best option with that model is using
manual exposure. Just choose an appropriate exposure setting and stick
with that.
Post by Jelle de Jong
How can I control the webcam with standardized v4l2 controls?
guvcview uses a standard v4l2 interface.
if you just want to use the controls, and capture video with some other
guvcview --controls_only
Post by Jelle de Jong
I want to use a webcam to record live images that move and have different
light environments, so the webcam has to adjust automatically to output
the best possible images. Is this a very hard thing to ask? I am willing
to buy a new device the only demands are usb interface and full v4l2
support. I have no idea of what is a good usb camera and what is not is
the QuickCam Pro 9000 the best one available? (200euro budget)
In my case I own a sphere AF and a pro5000 (2007 model) and at least
with guvcview I never noticed any significant frame drop when
recording video, but then guvcview doesn't use any expensive video
compression (just MJPG in case of yuv data).
With mencoder you are compressing to mpeg4, this is very CPU expensive.
Post by Jelle de Jong
Is there a some anti shakiness feature like photo and video cameras have.
I kind of have shocking hands when video recording?
In a webcam ???
Never heard of any such feature.
Post by Jelle de Jong
Is there also some feature to say well do auto exposure but make sure it
does not go below 20 fps?
I always use auto-exposure with both my cameras and I can easily record
avi's with 30 fps, be it a dark or bright environment.
Post by Jelle de Jong
mencoder tv:// -tv
driver=v4l2:device=/dev/video0:adevice=/dev/dsp1:immediatemode=0:forceaudio:width=800:height=600:fps=25
-oac lavc -lavcopts acodec=libmp3lame:abitrate=128 -ovc lavc -lavcopts
vcodec=mpeg4:vbitrate=2240:threads=2 -of lavf -lavfopts format=avi -o
webcam5.avi
but the output is 640x480 with 15 fps not the resolution and fps I
supplied with the mencoder command why is this and how to fix this using
mencoder to record? Please also see the attached webcam5.log.
I'm not really a mencoder guru, have you tried recording on guvcview or
cheese ?
Maybe you should try some other lighter compression method when
recording, and convert the resulting file to mpg4 ( I recommend avidemux
for editing and compressing the captured file).
Post by Jelle de Jong
Any help is welcome.
Thanks in advance,
Jelle de Jong
Best regards,
Paulo
I did a lot more testing today (this is full day 5 already) and I found
some very disturbing discoveries!

I can watch the webcam at width=320:height=240:fps=30 and have the
correct result. However when going over this resolution I will get only
15 fps and i can max go to 640x480 resolution.

Any idea why a tool as guvcviewer seems to output 800x600 and even
1600x1200 but mplayer does not want go higher as 640x480 (it does go lower)

I upgraded to guvcview 1.0.2 and tested some more there is still the
issue that i get lower fps when recording. Could somebody test recording
800x600 with 25fps and sound, if its really 25fps the sound will be in sync.

Also i tested the v4l2 fields of the webcam and there are a lot of errors
and non working fields. Is the device really v4l2 compatible? Could
somebody check this out further?

I also want to use the device on headless machines so no X. How can I
configure the device then so it does not use auto exposure...?

I attacked all test reports I made that lead to my conclusions please
look at them.

I can be contacted on chat.freenode.org as /msg tuxcrafter

Does somebody know a usb device that can be used for recording with v4l2
capable tools at at-leased 25pfs and 800x600 some auto balancing and
focusing would be nice to.

Again please checkout the attachment.

Thanks in advance for help.

Jelle de Jong
Paulo Assis
2009-03-13 23:01:06 UTC
Permalink
Post by Jelle de Jong
I did a lot more testing today (this is full day 5 already) and I found
some very disturbing discoveries!
I can watch the webcam at width=320:height=240:fps=30 and have the
correct result. However when going over this resolution I will get only
15 fps and i can max go to 640x480 resolution.
Any idea why a tool as guvcviewer seems to output 800x600 and even
1600x1200 but mplayer does not want go higher as 640x480 (it does go lower)
I believe mplayer checks your hardware and sets resolution accordingly (not
sure about this though).
Post by Jelle de Jong
I upgraded to guvcview 1.0.2 and tested some more there is still the
issue that i get lower fps when recording. Could somebody test recording
800x600 with 25fps and sound, if its really 25fps the sound will be in sync.
In the case of guvcview you should check the resulting fps in the avi
header, use avidemux to check the avi properties.
Sound can become out of sync due to a bad microphone or if fps varies a lot
during capture, guvcview will write the average fps (total number of frames
/ total time of capture) to the avi header.
The quality of video capture is very dependent on your hardware since video
processing requires a lot from ones system (processor, memory, disk, ...),
in your case and although the eeepc is a damn good machine for it's size and
price, I wouldn't consider it a prime candidate for this type of usage.
Post by Jelle de Jong
Also i tested the v4l2 fields of the webcam and there are a lot of errors
and non working fields. Is the device really v4l2 compatible? Could
somebody check this out further?
Maybe you had some bad luck and bought the 2008 model, this camera has some
serious firmware issues causing all sorts of problems in linux, the 2009
models according to logitech have these problems fixed:

http://forums.quickcamteam.net/showthread.php?tid=551
Post by Jelle de Jong
I also want to use the device on headless machines so no X. How can I
configure the device then so it does not use auto exposure...?
If you need a command line control application, you should consider
libwebcam:

http://www.quickcamteam.net/software/libwebcam
Post by Jelle de Jong
I attacked all test reports I made that lead to my conclusions please
look at them.
I can be contacted on chat.freenode.org as /msg tuxcrafter
Does somebody know a usb device that can be used for recording with v4l2
capable tools at at-leased 25pfs and 800x600 some auto balancing and
focusing would be nice to.
If you need hardware autofocus, the best one I can remember is the *QuickCam
* Vision Pro, but there is also the creative cam optia AF.
They are both UVC cameras so should do fine in linux.
Post by Jelle de Jong
Again please checkout the attachment.
Thanks in advance for help.
Jelle de Jong
Best regards,
Paulo
Jelle de Jong
2009-03-14 22:03:08 UTC
Permalink
I bought an other webcam today this time a QuickCam Orbit/Sphere AF but
it has the exact same issues and also seem to be a bcdDevice 0.08 device
/me cries (continuing saga day 6 ...)
Post by Jelle de Jong
I did a lot more testing today (this is full day 5 already) and I found
some very disturbing discoveries!
I can watch the webcam at width=320:height=240:fps=30 and have the
correct result. However when going over this resolution I will get only
15 fps and i can max go to 640x480 resolution.
Any idea why a tool as guvcviewer seems to output 800x600 and even
1600x1200 but mplayer does not want go higher as 640x480 (it does go lower)
I believe mplayer checks your hardware and sets resolution accordingly
(not sure about this though).
I believe it checks the v4l fields see the (attached) v4l-info2.log
could somebody run these commands on there good working >2MP webcam and
sent the test to the mailinglist?
Post by Jelle de Jong
ᅵ
I upgraded to guvcview 1.0.2 and tested some more there is still the
issue that i get lower fps when recording. Could somebody test recording
800x600 with 25fps and sound, if its really 25fps the sound will be in sync.
In the case of guvcview you should check the resulting fps in the avi
header, use avidemux to check the avi properties.
Sound can become out of sync due to a bad microphone or if fps varies a
lot during capture, guvcview will write the average fps (total number of
frames / total time of capture) to the avi header.
The quality of video capture is very dependent on your hardware since
video processing requires a lot from ones system (processor, memory,
disk, ...), in your case and although the eeepc is a damn good machine
for it's size and price, I wouldn't consider it a prime candidate for
this type of usage. ᅵ
I did some testing with guvcview and my expectations where correct I
tried to record a 800x600 stream with 25 fps. Result is complete out of
sync audio and the fps was going up and down during recording (auto
exposure was off) (result was a average of 13.833 fps)

BTW its kind of cool to see that guvcview is using a direct interface to
do the avi muxing (ID_CLIP_INFO_VALUE1)

Please see the attached capture-10.log for all the info on the recording.
Could somebody please do some testing with there device and see what the
highest possible resolution is with 25fps on there system. I would really
appreciate this. Please also test this with the mplayer command as I did.

I have an atom 1,6 GHZ 1GB DDR ram eeepc that would be fast enough for
there kinds of recording, and during recoding htop show the cpu load is
very low around 20%. And bwm-ng also tells me the hard-disk throughput is
about 14 MB/s so the hardware should not be a bottleneck here. But maybe
can test this on there system and check there throughput values.

Maybe an idea to also use mpeg4 for encoding, I tried to get named pipes
to work with guvciewer to make ffmpeg take it as input but I could not
get it to work.
Post by Jelle de Jong
Also i tested the v4l2 fields of the webcam and there are a lot of errors
and non working fields. Is the device really v4l2 compatible? Could
somebody check this out further?
Maybe you had some bad luck and bought the 2008 model, this camera has
some serious firmware issues causing all sorts of problems in linux, the
Yes i bought a 2008 model and today again a 2008 model from a store that
usually have very very high resales and should have hat the latest
version. What is the best 2MP+ webcam that works, are there any digital
foto camaras or video camares that work with uvc, I don't and can't have
any firewire interfaces (only usb) so IEEE 1394 is not an option.
Post by Jelle de Jong
http://forums.quickcamteam.net/showthread.php?tid=551
ᅵ
I also want to use the device on headless machines so no X. How can I
configure the device then so it does not use auto exposure...?
If you need a command line control application, you should consider
http://www.quickcamteam.net/software/libwebcam
hmm this software is not in the debian repository (somebody feels like
packaging it), but why cant i use standard v4l2 command line tools and
mencoder and mplayer to get the job done in an universal way.
Post by Jelle de Jong
ᅵ
I attacked all test reports I made that lead to my conclusions please
look at them.
I can be contacted on chat.freenode.org <http://chat.freenode.org>
as /msg tuxcrafter
Does somebody know a usb device that can be used for recording with v4l2
capable tools at at-leased 25pfs and 800x600 some auto balancing and
focusing would be nice to.
If you need hardware autofocus, the best one I can remember is the
/QuickCam/ Vision Pro, but there is also the creative cam optia AF.
They are both UVC cameras so should do fine in linux.
Isn't the QuickCam Vision Pro exactly the same device as the Pro 9000
except branded as special MACOS version? If i can find the creative cam
optia AF i think i will buy it, any ideas for better webcams or digital
camaras with usb interfaces?
Post by Jelle de Jong
ᅵ
Again please checkout the attachment.
Thanks in advance for help.
Jelle de Jong
Best regards,
Paulo
Thanks,

Best regards,

Jelle de Jong
Jelle de Jong
2009-03-15 11:17:10 UTC
Permalink
I changed the topic, to make the discussion more transparent. To bad
google has no text only feature, it makes using gmail and mailinglist
conventions a bit hard.
I've tried mencoder on my sphere AF but wasn't able to capture from the
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
Excepção de vírgula flutuante (Floating point exception)
Paulo could you first try to go back to the basics, and check if you can
display an image out of your webcam with mplayer, also please make
reports or the output of the commands, else i can never know what goes
wrong. Setting LANG=en_GB would also help before executions of the
commands :-D And thank you so much for helping.

# first command
$ mplayer -identify -benchmark -v tv:// -tv
driver=v4l2:device=/dev/video0:adevice=/dev/dsp1:immediatemode=0:forceaudio

# second command
mplayer -identify -benchmark -v tv:// -tv
driver=v4l2:device=/dev/video1:adevice=/dev/dsp2:immediatemode=0:forceaudio:width=800:height=600

# third command
$ mencoder tv:// -tv
driver=v4l2:device=/dev/video0:adevice=/dev/dsp1:immediatemode=0:forceaudio:width=800:height=600:fps=25
-oac lavc -ovc lavc -lavcopts
acodec=libmp3lame:abitrate=128:vcodec=mpeg4:vbitrate=2240:threads=4 -of
lavf -lavfopts format=avi -o output7.avi

Make sure auto exposure and all other fps decreasing features are off.
Thanks in advance of the reports, I really need to get mplayer and
mencoder working on higher resolutions and frame rates.
This is could mean two things auto exposure is set and fps changes with
ambient light conditions or a CPU with low horsepower.
auto exposure was not on, if cpu horsepower is an issue this would be
extreme bad, I also tried to use mencoder and mplayer on a fast headless
server but since i cant get higher resolution or fps i cant test it
correctly.
The problem is not the load, CPU time is scheduled by the system, in the
case of single core CPUs they really need to be fast enought to process
video frames and audio and still run all other system processes, for
multicore CPUs these tasks can be easily scheduled between different
cores, so you don't need a fast CPU as much.
A fast transfer disk also helps.
I made some experiments with mpeg encoding in guvcview some time ago and
I was able to make it work, but I never released the code, since it had
some heavy requirements for hardware. It's just easy to capture with a
lightweight encoder ( or even better without any encoding) and compress
the resulting file later, since this doesn't cause any frame drop.
I would really like if I can just connect mencoder, mplayer and ffmpeg to
the the guvcview tool, but since guvciew is a GUI tool I cant really use
it. I can only use it for some testing on the client desktops
Any v4l2 tool should work ! but only libwebcam will enable extension
controls.
What are the extension controls, why are those not v4l2? I will try to
make libwebcam work. Does the Creative Cam Optia AF also work with these
tools?
No, QuickCam Vision Pro has hardware autofocus, in the Pro 9000
autofucus is done in software, just like the sphere AF, so unless you
are using guvcview only the Vision will enable autofocus.
Ok sounds I will buy the Creative Cam Optia AF or QuickCam Vision Pro
since both seem to be the only 2MP+ webcams with hardware autofocus correct?

Thanks in advance for the test reports,

Jelle de Jong
Paulo Assis
2009-03-15 13:27:14 UTC
Permalink
Jelle,
Post by Jelle de Jong
I changed the topic, to make the discussion more transparent. To bad
google has no text only feature, it makes using gmail and mailinglist
conventions a bit hard.
I've tried mencoder on my sphere AF but wasn't able to capture from the
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
Excepção de vírgula flutuante (Floating point exception)
Paulo could you first try to go back to the basics, and check if you can
display an image out of your webcam with mplayer, also please make
reports or the output of the commands, else i can never know what goes
wrong. Setting LANG=en_GB would also help before executions of the
commands :-D And thank you so much for helping.
Mplayer works fine with the following command:
mplayer tv:// -tv
driver=v4l2:device=/dev/video0:width=800:height=600:fps=25

see mplayer.log

but fails for the ones below.
Post by Jelle de Jong
# first command
$ mplayer -identify -benchmark -v tv:// -tv
driver=v4l2:device=/dev/video0:adevice=/dev/dsp1:immediatemode=0:forceaudio
see mplayer_1.log
Post by Jelle de Jong
# second command
mplayer -identify -benchmark -v tv:// -tv
driver=v4l2:device=/dev/video1:adevice=/dev/dsp2:immediatemode=0:forceaudio:width=800:height=600
see mplayer_2.log
Post by Jelle de Jong
# third command
$ mencoder tv:// -tv
driver=v4l2:device=/dev/video0:adevice=/dev/dsp1:immediatemode=0:forceaudio:width=800:height=600:fps=25
-oac lavc -ovc lavc -lavcopts
acodec=libmp3lame:abitrate=128:vcodec=mpeg4:vbitrate=2240:threads=4 -of
lavf -lavfopts format=avi -o output7.avi
see mencoder.log
Post by Jelle de Jong
Make sure auto exposure and all other fps decreasing features are off.
Thanks in advance of the reports, I really need to get mplayer and
mencoder working on higher resolutions and frame rates.
This is could mean two things auto exposure is set and fps changes with
ambient light conditions or a CPU with low horsepower.
auto exposure was not on, if cpu horsepower is an issue this would be
extreme bad, I also tried to use mencoder and mplayer on a fast headless
server but since i cant get higher resolution or fps i cant test it
correctly.
I could only get 640x480, this limit seems to be hardcoded in mplayer.
Post by Jelle de Jong
The problem is not the load, CPU time is scheduled by the system, in the
case of single core CPUs they really need to be fast enought to process
video frames and audio and still run all other system processes, for
multicore CPUs these tasks can be easily scheduled between different
cores, so you don't need a fast CPU as much.
A fast transfer disk also helps.
I made some experiments with mpeg encoding in guvcview some time ago and
I was able to make it work, but I never released the code, since it had
some heavy requirements for hardware. It's just easy to capture with a
lightweight encoder ( or even better without any encoding) and compress
the resulting file later, since this doesn't cause any frame drop.
I would really like if I can just connect mencoder, mplayer and ffmpeg to
the the guvcview tool, but since guvciew is a GUI tool I cant really use
it. I can only use it for some testing on the client desktops
Like I said live video mpeg encoding requires a lot of cpu power, you wont
find many apps out there that can deliver this, with the quality you want.
Post by Jelle de Jong
Any v4l2 tool should work ! but only libwebcam will enable extension
controls.
What are the extension controls, why are those not v4l2? I will try to
make libwebcam work. Does the Creative Cam Optia AF also work with these
tools?
these are vendor specif controls, they are defined in the uvc spec and the
linux-uvc driver has support for them.
Since they are vendor specific, they cannot be defined in the v4l2 API, so
they need to be mapped into a valid control, but applications must be aware
of them.
Post by Jelle de Jong
No, QuickCam Vision Pro has hardware autofocus, in the Pro 9000
autofucus is done in software, just like the sphere AF, so unless you
are using guvcview only the Vision will enable autofocus.
Ok sounds I will buy the Creative Cam Optia AF or QuickCam Vision Pro
since both seem to be the only 2MP+ webcams with hardware autofocus correct?
They are the ones I know.
Post by Jelle de Jong
Thanks in advance for the test reports,
Jelle de Jong
Best regards,
Paulo
Jelle de Jong
2009-03-15 15:11:59 UTC
Permalink
Hi Paulo and thank you for the help,
�mplayer tv:// -tv
driver=v4l2:device=/dev/video0:width=800:height=600:fps=25
see mplayer.log
It seems mplayer does not! work fine, see the resolution, it is unable to
render 800x600 it keep sticking at 640x480.

Could you or somebody else try this command and show the full report:
mplayer -identify -benchmark -v tv:// -tv
driver=v4l2:device=/dev/video0:width=800:height=600:fps=25
but fails for the ones below.
see mplayer_1.log
Thank you, it seems mplayer dies on your system when trying to access the
sound of the webcam I will report this back to mplayer developers
see mplayer_2.log
The command was not correctly formatted since you use /dev/video0 and not
/dev/video1. Could you or somebody else try the bellow command and show
the full report:

mplayer -identify -benchmark -v tv:// -tv
driver=v4l2:device=/dev/video0:adevice=/dev/dsp1:immediatemode=0:forceaudio:width=800:height=600
see mencoder.log
could you please test ;-) and show the full report

mencoder tv:// -tv
driver=v4l2:device=/dev/video0:width=800:height=600:fps=25 -of rawvideo
-nosound -ovc lavc -lavcopts vcodec=mpeg4:threads=4 -of lavf -lavfopts
format=avi -o output0.avi
I could only get 640x480, this limit seems to be hardcoded in mplayer.
The mplayer developer tell me it is not hardcoded and is looking up v4l2
stuff. I don't know what is exactly going on here ...
Like I said live video mpeg encoding requires a lot of cpu power, you
wont find many apps out there that can deliver this, with the quality
you want.
My system is powerful enough to do live recordings with mpeg4 with only
20% cpu load with mencoder on the 640x480 15fps stream... thats why I
need mencoder and mplayer to be able to view the 800x600 at 25 fps
streams so I can record them with mencoder and have a more then powerful
engough system. mjpeg does not use treading and is very heavy for a dual
threaded designed/optimized atom cpu.
these are vendor specif controls, they are defined in the uvc spec and
the linux-uvc driver has support for them.
Since they are vendor specific, they cannot be defined in the v4l2 API,
so they need to be mapped into a valid control, but applications must be
aware of them.
They are the ones I know.
Thanks for the info!

Best regards,

Jelle de Jong
Paulo Assis
2009-03-15 22:42:55 UTC
Permalink
Jelle,
Post by Jelle de Jong
Hi Paulo and thank you for the help,
ᅵmplayer tv:// -tv
driver=v4l2:device=/dev/video0:width=800:height=600:fps=25
see mplayer.log
It seems mplayer does not! work fine, see the resolution, it is unable to
render 800x600 it keep sticking at 640x480.
Yes I notice that :-)
Post by Jelle de Jong
mplayer -identify -benchmark -v tv:// -tv
driver=v4l2:device=/dev/video0:width=800:height=600:fps=25
see mplayer_1.log
Post by Jelle de Jong
but fails for the ones below.
see mplayer_1.log
Thank you, it seems mplayer dies on your system when trying to access the
sound of the webcam I will report this back to mplayer developers
/dev/dsp1 is the audio card (OSS) for ALSA the same card is hw:0,0
for what I know usb audio is not very well supported under OSS.
Post by Jelle de Jong
see mplayer_2.log
The command was not correctly formatted since you use /dev/video0 and not
/dev/video1. Could you or somebody else try the bellow command and show
I had only one cam connected so no /dev/video1
Post by Jelle de Jong
mplayer -identify -benchmark -v tv:// -tv
driver=v4l2:device=/dev/video0:adevice=/dev/dsp1:immediatemode=0:forceaudio:width=800:height=600
No go, see mplayer_2.log
Post by Jelle de Jong
see mencoder.log
could you please test ;-) and show the full report
mencoder tv:// -tv
driver=v4l2:device=/dev/video0:width=800:height=600:fps=25 -of rawvideo
-nosound -ovc lavc -lavcopts vcodec=mpeg4:threads=4 -of lavf -lavfopts
format=avi -o output0.avi
See mencoder.log
Post by Jelle de Jong
I could only get 640x480, this limit seems to be hardcoded in mplayer.
The mplayer developer tell me it is not hardcoded and is looking up v4l2
stuff. I don't know what is exactly going on here ...
In that case it can only mean that mplayer has a bug when looking up
frame-rate and resolution.
The uvc driver enumerates all resolutions and frame rates just as defined by
v4l2.
Post by Jelle de Jong
Like I said live video mpeg encoding requires a lot of cpu power, you
wont find many apps out there that can deliver this, with the quality
you want.
My system is powerful enough to do live recordings with mpeg4 with only
20% cpu load with mencoder on the 640x480 15fps stream... thats why I
need mencoder and mplayer to be able to view the 800x600 at 25 fps
streams so I can record them with mencoder and have a more then powerful
engough system. mjpeg does not use treading and is very heavy for a dual
threaded designed/optimized atom cpu.
I'm confused mjpeg is heavy but not mpeg4 ?
mjpeg is, in a very simplistic way, a I frame only mpeg4, if you set your
camera to stream mjpeg instead of yuyv, you won't even need to compress,
just have to store the frames to disk.

Here's a good test:
in guvcview disable sound and set the camera stream to MJPG instead of YUYV,
then capture some video, if you notice a fps drop when recording this is
only due to Disk IO, not CPU since there is no extra processing.
Post by Jelle de Jong
these are vendor specif controls, they are defined in the uvc spec and
the linux-uvc driver has support for them.
Since they are vendor specific, they cannot be defined in the v4l2 API,
so they need to be mapped into a valid control, but applications must be
aware of them.
They are the ones I know.
Thanks for the info!
Best regards,
Jelle de Jong
Best regards,
Paulo
Jelle de Jong
2009-03-16 13:29:17 UTC
Permalink
Hi Paulo, thank you for the reports,

Why can't gmail sent plain test to mailinglist? ;-)
Post by Paulo Assis
Jelle,
Hi Paulo and thank you for the help,
�mplayer tv:// -tv
driver=v4l2:device=/dev/video0:width=800:height=600:fps=25
see mplayer.log
It seems mplayer does not! work fine, see the resolution, it is unable to
render 800x600 it keep sticking at 640x480.
Yes I notice that :-)
yes it is not working.
Post by Paulo Assis
mplayer -identify -benchmark -v tv:// -tv
driver=v4l2:device=/dev/video0:width=800:height=600:fps=25
see mplayer_1.log
thanks, again only 640x480 max, the strange thing is that is does
response to fps and resolution settings below this resolution.
Post by Paulo Assis
but fails for the ones below.
see mplayer_1.log
Thank you, it seems mplayer dies on your system when trying to access the
sound of the webcam I will report this back to mplayer developers
/dev/dsp1 is the audio card (OSS) for ALSA the same card is hw:0,0
for what I know usb audio is not very well supported under OSS.
It can happen, you also use alsa devices for recording, but audio in
linux is a big mess in general.

<snip>
Post by Paulo Assis
could you please test ;-) and show the full report
mencoder tv:// -tv
driver=v4l2:device=/dev/video0:width=800:height=600:fps=25 -of rawvideo
-nosound -ovc lavc -lavcopts vcodec=mpeg4:threads=4 -of lavf -lavfopts
format=avi -o output0.avi
See mencoder.log
Thanks this has real info, as you can see the fps is only going to be
15fps and it has a strange long startup swing making it impossible to
record in sync audio and video with a fixed fps. This situation is really
bad and need fixing.
Post by Paulo Assis
I could only get 640x480, this limit seems to be hardcoded in mplayer.
The mplayer developer tell me it is not hardcoded and is looking up v4l2
stuff. I don't know what is exactly going on here ...
In that case it can only mean that mplayer has a bug when looking up
frame-rate and resolution.
The uvc driver enumerates all resolutions and frame rates just as
defined by v4l2.
$ sudo v4l-info /dev/video0

this command shows me a lot of errors about the provided v4l fields, it
would not suppris me that because of all these errors mplayer fails. But
somebody need to test mplayer with a device that is fully supported and
has correct v4l flags.

And yes gstreamer, vlc and guvciewer are able to show higher resolutions
but I am unable to record them at the correct fps with synchronized video
and audio.
Post by Paulo Assis
Like I said live video mpeg encoding requires a lot of cpu power, you
wont find many apps out there that can deliver this, with the quality
you want.
My system is powerful enough to do live recordings with mpeg4 with only
20% cpu load with mencoder on the 640x480 15fps stream... thats why I
need mencoder and mplayer to be able to view the 800x600 at 25 fps
streams so I can record them with mencoder and have a more then powerful
engough system. mjpeg does not use treading and is very heavy for a dual
threaded designed/optimized atom cpu.
I'm confused mjpeg is heavy but not mpeg4 ?
mjpeg is, in a very simplistic way, a I frame only mpeg4, if you set
your camera to stream mjpeg instead of yuyv, you won't even need to
compress, just have to store the frames to disk.
in guvcview disable sound and set the camera stream to MJPG instead of
YUYV, then capture some video, if you notice a fps drop when recording
this is only due to Disk IO, not CPU since there is no extra processing.
MJPG uses a singe thread non cpu optimized process that seems to heavy
for real time processing, the mpeg4 uses threading and has some cpu
optimization making it run at 20% load. So if possible please optimize
the MJPG. The storage throughput is a issue, even since my end systems
are going to write video to SDHC storage with a absolute max of 15MB/s.


Are these test done with a full supported bcdDevice 0.09 device, so
latest hardware and software version?

Are there Logitech engineers on this list that can response to the issue
and what the future can bring for usb video devices?

And is there a real hardware difference between all these 2MP+ webcam in
the market or are they all from the same ASIC but with different packages
and marketing? And how can one tell a webcam has hardware auto focus or
software autofocus.

Well after 7 days of experimenting I have to come to the conclusion its
currently impossible to use a Linux system for real time minimal 800x600
25fps video recording with standard Debian experimental multimedia
software packages on a headless 1GB DDR2 1.6GHz Atom N270.

If somebody want to create a usb video camera out of a small laptop or
embedded system please feel free to contact me.

I just soled all my 2MP+ webcams, but if somebody can show me they got it
working I will buy some new webcams for testing.

Best regards,

Jelle de Jong

Laurent Pinchart
2009-03-15 10:35:36 UTC
Permalink
Hi Jelle,
Post by Jelle de Jong
I did a lot more testing today (this is full day 5 already) and I found
some very disturbing discoveries!
I can watch the webcam at width=320:height=240:fps=30 and have the
correct result. However when going over this resolution I will get only
15 fps and i can max go to 640x480 resolution.
Any idea why a tool as guvcviewer seems to output 800x600 and even
1600x1200 but mplayer does not want go higher as 640x480 (it does go lower)
Available resolutions depend on the image format. Your camera supports
uncompressed YUYV up to 1600x1200 and MJPEG up to 960x720. This doesn't
explain why MPlayer won't go any higher than 640x480 though, but you should be
aware that the selected image format affects the available resolutions.
Post by Jelle de Jong
I upgraded to guvcview 1.0.2 and tested some more there is still the
issue that i get lower fps when recording. Could somebody test recording
800x600 with 25fps and sound, if its really 25fps the sound will be in sync.
Also i tested the v4l2 fields of the webcam and there are a lot of errors
and non working fields. Is the device really v4l2 compatible? Could
somebody check this out further?
What do you mean by v4l2 fields ? What kind of errors do you get ? Are they
pure userspace, or does the driver print error messages to the kernel log as
well ?
Post by Jelle de Jong
I also want to use the device on headless machines so no X. How can I
configure the device then so it does not use auto exposure...?
Use a command line tool such as v4l2-ctl or uvcdynctrl (part of the libwebcam
package, make sure you use the SVN version) to change controls.
Post by Jelle de Jong
I attacked all test reports I made that lead to my conclusions please
look at them.
I can be contacted on chat.freenode.org as /msg tuxcrafter
Does somebody know a usb device that can be used for recording with v4l2
capable tools at at-leased 25pfs and 800x600 some auto balancing and
focusing would be nice to.
Again please checkout the attachment.
Thanks in advance for help.
Best regards,

Laurent Pinchart
Jelle de Jong
2009-03-15 11:34:07 UTC
Permalink
Hi laurent, thanks for your mail.
Post by Laurent Pinchart
Hi Jelle,
Post by Jelle de Jong
I did a lot more testing today (this is full day 5 already) and I found
some very disturbing discoveries!
I can watch the webcam at width=320:height=240:fps=30 and have the
correct result. However when going over this resolution I will get only
15 fps and i can max go to 640x480 resolution.
Any idea why a tool as guvcviewer seems to output 800x600 and even
1600x1200 but mplayer does not want go higher as 640x480 (it does go lower)
Available resolutions depend on the image format. Your camera supports
uncompressed YUYV up to 1600x1200 and MJPEG up to 960x720. This doesn't
explain why MPlayer won't go any higher than 640x480 though, but you should be
aware that the selected image format affects the available resolutions.
Yes I am aware of the dependencies between video codec and fps and the
resolutions. In my reports2.tar.gz in my previous mails. you can see I
tried both video capture modes of the webcam the video modes are in the
mplayer outputs logs. But to be sure the problem does is not my fault or
my webcams, I would like to have some other test reporst form other users
when they try to use mplayer and mencoder. I sent some basics commands in
my previous mail to the mailinglist, would you be willing to test them?
Post by Laurent Pinchart
Post by Jelle de Jong
I upgraded to guvcview 1.0.2 and tested some more there is still the
issue that i get lower fps when recording. Could somebody test recording
800x600 with 25fps and sound, if its really 25fps the sound will be in sync.
Also i tested the v4l2 fields of the webcam and there are a lot of errors
and non working fields. Is the device really v4l2 compatible? Could
somebody check this out further?
What do you mean by v4l2 fields ? What kind of errors do you get ? Are they
pure userspace, or does the driver print error messages to the kernel log as
well ?
See the v4l-info2.log attachment in my previous messages to the list,
there i used some commands to get the v4l2 capabilities but the output is
full with errors, I would really appreciated it if somebody could run
these commands o there working webcams.
Post by Laurent Pinchart
Post by Jelle de Jong
I also want to use the device on headless machines so no X. How can I
configure the device then so it does not use auto exposure...?
Use a command line tool such as v4l2-ctl or uvcdynctrl (part of the libwebcam
package, make sure you use the SVN version) to change controls.
I cant find the v4l2-ctl tools! I will look at the libwebcam and hope it
will be worth the investment in time.
Post by Laurent Pinchart
Post by Jelle de Jong
I attacked all test reports I made that lead to my conclusions please
look at them.
I can be contacted on chat.freenode.org as /msg tuxcrafter
Does somebody know a usb device that can be used for recording with v4l2
capable tools at at-leased 25pfs and 800x600 some auto balancing and
focusing would be nice to.
Again please checkout the attachment.
Thanks in advance for help.
Best regards,
Laurent Pinchart
Best regards,

Jelle de Jong
Loading...