Menu

#9 Extremely low fps

next
closed
None
2014-10-10
2014-08-17
No

Just update to the latest git revision (ec5396c85cd7e0d8c226cc2884608b5a71bd9a23), the resulting guvcview has a very low fps (~5). However, package built by my distro has the maximum fps (30). The only interesting debug message is this:

GUVCVIEW: couldn't read line 46 of config file: File exists

But I have no idea which config file this is.

Discussion

  • Paulo Assis

    Paulo Assis - 2014-08-17

    Hi,
    please make sure you disable 'exposure auto priority' and set exposure mode to 'aperture priority', then please change fps to say 25 and then back to 30.

    NOTE: the config is now in $HOME/.config/guvcview2/video0
    and please disregard that warning, I've just remove it, it was there just for debug purposes.

     
  • Mario Ray M.

    Mario Ray M. - 2014-08-17

    Done, still no difference. My built-in webcam only has 30/1 fps setting. Even if I use manual exposure with the lowest value, I still can't get better fps. So obviously something is wrong.

    Here I attach debug messages from running with -w 3. Apparently there are more interesting messages.

    P.S.: I've also tested with my better USB webcam, the result is the same. 1.7.3 built by my distro's package maintainer works better.

     
  • Paulo Assis

    Paulo Assis - 2014-08-17

    Hi,
    Can you try a different resolution and input format (e.g: yuyv and 640x480)?

    Regards,
    Paulo

     
  • Mario Ray M.

    Mario Ray M. - 2014-08-18

    Certainly I've tried (again, log attached). Smaller resolution (640x480) gives better, but not significant result. The fps is now ~10.

     
  • Paulo Assis

    Paulo Assis - 2014-08-18

    Hi,

    All pixel formats with the exception of yuyv are based on mjpg (yv12,yu12,bgr3 and rgb3 are converted from mjpg by libv4l), also in the case of yuyv guvcview doesn't do any processing, it just renders the image directly from the camera.

    Now for your camera you have the following:

    { pixelformat = 'YUYV', description = 'YUV 4:2:2 (YUYV)' }
    { discrete: width = 640, height = 480 }
    Time interval between frame: 1/30,
    { discrete: width = 160, height = 120 }
    Time interval between frame: 1/30,
    { discrete: width = 320, height = 240 }
    Time interval between frame: 1/30,
    { discrete: width = 1280, height = 720 }
    Time interval between frame: 1/10,

    so 10 fps is normal for 1280x720 in yuyv, but for 640x480 it should go up to 30 fps, if it doesn't it has to do with the camera settings, if exposure is responsible for the lower fps then trying the camera in daylight should give much better results.
    like I said at least with the camera input set to yuyv there shouldn't be any differences between guvcview versions. (actually in all my cameras even in MJPG there is a slight performance improvement in version 2.0, mainly due to the use of SDL2)

    Note: you should do a 'git update', I've fixed a couple of issues with the devel version yesterday.

    Regards,
    Paulo

     
  • Mario Ray M.

    Mario Ray M. - 2014-08-18

    OK, I've pulled your latest changes and do a bit more extensive testing.
    On 640x480, instead of 30 fps, I get 10.
    On 1280x720, instead of 10 fps , I get 3 1/3.
    This is even with exposure mode set to manual and its value set to 10 (lowest).

    I want to test something else, could you provide me a precompiled x86_64 package from fresh git master? .zip / .tar.gz is OK, no need for special format. I just want to ensure whether the wrong side is my environment or the code because 1.7.3 binary I built my self crashes with segmentation fault upon startup. Even gdb stucks before the crash point.

     
  • Mario Ray M.

    Mario Ray M. - 2014-08-18

    OK, something seems wrong with my notebook then. On my desktop system (same OS! even the bitness!) everything works fine and indeed the current git version is faster. I can see from the console, V4L2CORE displaying the fps (ref-ts-frames). While on my desktop it can even reach 90 fps @ 1280x720, the same settings give only 10 fps on my notebook. This is using the same USB webcam because I need to ensure the similarity of the environment. The only difference between the two are:
    - Core i3 vs Core i5
    - nVidia GeForce GT 220 vs optimus (Intel HD 4400 + nVidia GeForce 740M)
    Do you have any idea how I can debug this?

     
  • Paulo Assis

    Paulo Assis - 2014-08-18

    Hi,
    please check dmesg for driver warnings, if the settings are the same then it's likely the driver is dropping frames (could be a usb core issue).

    There are daily build deb packages in my test ppa from the git repo:
    https://launchpad.net/~pj-assis/+archive/ubuntu/testing

    in any case this is how I build from source:

    (in sourcedir)

    1: mkdir build
    2: ./bootstrap.sh
    3: make distclean
    4: cd build
    5: ../configure --prefix=/usr
    6: make
    7: sudo make install (or make install as root)

    from now on you just need to do steps 2, 3, 6 and 7.

    Regards,
    Paulo

     
  • Mario Ray M.

    Mario Ray M. - 2014-08-19

    No warnings from dmesg. I'm on Manjaro which is an ArchLinux descendant, so I can't use ppa (so is manual download). I'm kinda out of clue now, it could be the compiler / libraries.

     
  • Mario Ray M.

    Mario Ray M. - 2014-08-19

    Using tracing feature from http://www.ideasonboard.org/uvc/faq/, I can catch something from dmesg that only appears from guvcview2. It looks like it fails to set certain properties.

     

    Last edit: Mario Ray M. 2014-08-19
  • Paulo Assis

    Paulo Assis - 2014-08-20

    Ok so it fails to set control 6, but it's also reporting a segfault in guvcview. When does this happen ?

    Also I couldn't see any reference to fps, something like this:

    [ 800.684215] uvcvideo: uvc_v4l2_ioctl(VIDIOC_G_PARM)
    [ 800.684223] uvcvideo: uvc_v4l2_ioctl(VIDIOC_QUERYBUF)
    [ 800.684227] uvcvideo: uvc_v4l2_ioctl(VIDIOC_S_PARM)
    [ 800.684231] uvcvideo: Setting frame interval to 1/25 (400000).

    I guess it doesn't reach this far (or you need to increase the driver verbosity)

    Regards,
    Paulo

     
  • Mario Ray M.

    Mario Ray M. - 2014-08-24

    Sorry for the inconvenience, I finally found the problem. It's the intel HD driver to blame. With an optimus notebook system, I forgot that I have 2 video cards. So I finally tried running guvcview under my nvidia card and it WORKS!

    It's a bit overkill though, so a fix from Intel HD driver maintainer is required.

     

    Last edit: Mario Ray M. 2014-08-25
  • Paulo Assis

    Paulo Assis - 2014-10-10

    Closing this since it looks like is hardware related.

    Thank you

     
  • Paulo Assis

    Paulo Assis - 2014-10-10
    • status: open --> closed
    • assigned_to: Paulo Assis
     
  • Mario Ray M.

    Mario Ray M. - 2014-10-10

    Driver issue to be exact. The fixes seem to be available in kernel 3.17.

     

Log in to post a comment.