How to enable/use the pan-tilt controls?

2010-09-28
2015-05-21
  • Hi I've read on the forum also pan-tilt functions are supported, so I bought a Logitech Orbit AF. I am not sure how to enable, and then use the "controls" for the pan and tilt. What is the command line I have to use and what URL should I open?

     
  • By the way, on my laptop the webcam tilt and pan controls work with a program called "guvcview"

     
  • I compiled mjpg_streamer with DEBUG option and I can see in the log:

    DBG(dynctrl.c, initDynCtrls(), 140): adding control for 0
    DBG(dynctrl.c, initDynCtrls(), 146): control 0 already exists
    DBG(dynctrl.c, initDynCtrls(), 140): adding control for 1
    DBG(dynctrl.c, initDynCtrls(), 146): control 1 already exists
    DBG(dynctrl.c, initDynCtrls(), 140): adding control for 2
    DBG(dynctrl.c, initDynCtrls(), 146): control 2 already exists
    DBG(dynctrl.c, initDynCtrls(), 140): adding control for 3
    DBG(dynctrl.c, initDynCtrls(), 146): control 3 already exists
    DBG(dynctrl.c, initDynCtrls(), 153): mapping controls for Pan (relative)
    DBG(dynctrl.c, initDynCtrls(), 159): mapping 0 already exists
    DBG(dynctrl.c, initDynCtrls(), 153): mapping controls for Tilt (relative)
    DBG(dynctrl.c, initDynCtrls(), 159): mapping 1 already exists
    DBG(dynctrl.c, initDynCtrls(), 153): mapping controls for Pan/Tilt (reset)
    DBG(dynctrl.c, initDynCtrls(), 159): mapping 2 already exists
    DBG(dynctrl.c, initDynCtrls(), 153): mapping controls for Focus (absolute)
    DBG(dynctrl.c, initDynCtrls(), 159): mapping 3 already exists
    DBG(dynctrl.c, initDynCtrls(), 153): mapping controls for LED1 Mode
    DBG(dynctrl.c, initDynCtrls(), 159): mapping 4 already exists
    DBG(dynctrl.c, initDynCtrls(), 153): mapping controls for LED1 Frequency
    DBG(dynctrl.c, initDynCtrls(), 159): mapping 5 already exists

    bye
    as

     
  • Hi,

    The uvc extended controls (PTZ) are cannot be controlled in the current svn rev.
    I will try to make the neccessary http side asap.
    Until then you may try to use an older svn revision =<94. with the old control webpage.

    Regards,
    Miklós

     
  • I will go home and try immediately. Thanks for the suggestion but… a note in the README is probably needed. I've spent several hours between the weekend and last night to try to understand what was the problem :(

     
  • I confirm rev 94 work well.

     
  • Hi,

    I appologize for the inconvinence caused by me.
    I have committed a change to do the V4L2 controls enumerating after the UCV extended controls initialization.
    If the mapping works as I think after reading it: http://simosnet.com/debian/packages/eeepc/src/drivers/linux-uvc/dynctrl.txt
    the  extended controls should be visible in the controls page. Currently I have left the output_uvc plugin in debug mode.
    Please test it and share the result with us.

    Regards,
    Miklós

     
  • If course, I will test at lunch break :)
    I guess you mean "input_uvc" here.

     
  • I checked out the new revision and I compiled it; unfortunately I do not see the commands to move the camera. Have a look at the log, it contains some relevant sections:

    root@valkyrie:~/dload/mjpg-streamer/mjpg-streamer# ./start.sh
    MJPG Streamer Version.: 2.0
    DBG(input_uvc.c, input_init(), 134): argv=UVC webcam grabber
    DBG(input_uvc.c, input_init(), 134): argv=-d
    DBG(input_uvc.c, input_init(), 134): argv=/dev/video1
    DBG(input_uvc.c, input_init(), 189): case 2,3
    i: Using V4L2 device.: /dev/video1
    i: Desired Resolution: 640 x 480
    i: Frames Per Second.: 5
    i: Format…………: MJPEG
    DBG(v4l2uvc.c, init_videoIn(), 72): Current size: 640x480
    DBG(v4l2uvc.c, init_videoIn(), 90): Supported format: MJPEG
    DBG(v4l2uvc.c, init_videoIn(), 109):   Supported size with the current format: 160x120
    DBG(v4l2uvc.c, init_videoIn(), 109):   Supported size with the current format: 176x144
    DBG(v4l2uvc.c, init_videoIn(), 109):   Supported size with the current format: 320x240
    DBG(v4l2uvc.c, init_videoIn(), 109):   Supported size with the current format: 352x288
    DBG(v4l2uvc.c, init_videoIn(), 109):   Supported size with the current format: 640x480
    DBG(v4l2uvc.c, init_videoIn(), 109):   Supported size with the current format: 800x600
    DBG(v4l2uvc.c, init_videoIn(), 109):   Supported size with the current format: 960x720
    DBG(v4l2uvc.c, init_videoIn(), 90): Supported format: YUV 4:2:2 (YUYV)
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 160x120
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 176x144
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 320x240
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 352x288
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 640x480
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 800x600
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 960x720
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 1600x1200
    DBG(v4l2uvc.c, init_videoIn(), 90): Supported format: RGB3
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 160x120
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 176x144
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 320x240
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 352x288
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 640x480
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 800x600
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 960x720
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 1600x1200
    DBG(v4l2uvc.c, init_videoIn(), 90): Supported format: BGR3
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 160x120
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 176x144
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 320x240
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 352x288
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 640x480
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 800x600
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 960x720
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 1600x1200
    DBG(v4l2uvc.c, init_videoIn(), 90): Supported format: YU12
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 160x120
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 176x144
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 320x240
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 352x288
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 640x480
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 800x600
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 960x720
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 1600x1200
    DBG(v4l2uvc.c, init_videoIn(), 90): Supported format: YV12
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 160x120
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 176x144
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 320x240
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 352x288
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 640x480
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 800x600
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 960x720
    DBG(v4l2uvc.c, init_videoIn(), 111):   Supported size: 1600x1200
    DBG(dynctrl.c, initDynCtrls(), 139): adding control for 0
    DBG(dynctrl.c, initDynCtrls(), 145): control 0 already exists
    DBG(dynctrl.c, initDynCtrls(), 139): adding control for 1
    DBG(dynctrl.c, initDynCtrls(), 145): control 1 already exists
    DBG(dynctrl.c, initDynCtrls(), 139): adding control for 2
    DBG(dynctrl.c, initDynCtrls(), 145): control 2 already exists
    DBG(dynctrl.c, initDynCtrls(), 139): adding control for 3
    DBG(dynctrl.c, initDynCtrls(), 145): control 3 already exists
    DBG(dynctrl.c, initDynCtrls(), 152): mapping controls for Pan (relative)
    DBG(dynctrl.c, initDynCtrls(), 158): mapping 0 already exists
    DBG(dynctrl.c, initDynCtrls(), 152): mapping controls for Tilt (relative)
    DBG(dynctrl.c, initDynCtrls(), 158): mapping 1 already exists
    DBG(dynctrl.c, initDynCtrls(), 152): mapping controls for Pan/Tilt (reset)
    DBG(dynctrl.c, initDynCtrls(), 158): mapping 2 already exists
    DBG(dynctrl.c, initDynCtrls(), 152): mapping controls for Focus (absolute)
    DBG(dynctrl.c, initDynCtrls(), 158): mapping 3 already exists
    DBG(dynctrl.c, initDynCtrls(), 152): mapping controls for LED1 Mode
    DBG(dynctrl.c, initDynCtrls(), 158): mapping 4 already exists
    DBG(dynctrl.c, initDynCtrls(), 152): mapping controls for LED1 Frequency
    DBG(dynctrl.c, initDynCtrls(), 158): mapping 5 already exists
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: Brightness value 128
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: Contrast value 32
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: Saturation value 32
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: White Balance Temperature, Auto value 1
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: Gain value 0
    DBG(v4l2uvc.c, control_readed(), 568): Menu item 0: Disabled
    DBG(v4l2uvc.c, control_readed(), 568): Menu item 1: 50 Hz
    DBG(v4l2uvc.c, control_readed(), 568): Menu item 2: 60 Hz
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: Power Line Frequency value 2
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: White Balance Temperature value 5669
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: Sharpness value 224
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: Backlight Compensation value 1
    DBG(v4l2uvc.c, control_readed(), 568): Menu item 0: Auto Mode
    DBG(v4l2uvc.c, control_readed(), 568): Menu item 1: Manual Mode
    DBG(v4l2uvc.c, control_readed(), 568): Menu item 2: Shutter Priority Mode
    DBG(v4l2uvc.c, control_readed(), 568): Menu item 3: Aperture Priority Mode
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: Exposure, Auto value 3
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: Exposure (Absolute) value 166
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: Exposure, Auto Priority value 1
    DBG(v4l2uvc.c, control_readed(), 579): Unable to get the value of Pan (relative) DBG(v4l2uvc.c, control_readed(), 579): Unable to get the value of Tilt (relative) DBG(v4l2uvc.c, control_readed(), 579): Unable to get the value of Pan/Tilt (reset) DBG(v4l2uvc.c, control_readed(), 579): Unable to get the value of Focus (absolute) DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: LED1 Mode value 3
    DBG(v4l2uvc.c, control_readed(), 576): V4L2 parameter found: LED1 Frequency value 0
    o: www-folder-path…: ./www/
    o: HTTP TCP port…..: 8080
    o: username:password.: disabled
    o: commands……….: enabled
    DBG(input_uvc.c, cam_thread(), 724): received frame of size: 38024
    DBG(input_uvc.c, cam_thread(), 752): copying frame
    DBG(input_uvc.c, cam_thread(), 774): waiting for next frame
    DBG(input_uvc.c, cam_thread(), 724): received frame of size: 38924
    DBG(input_uvc.c, cam_thread(), 752): copying frame
    DBG(input_uvc.c, cam_thread(), 774): waiting for next frame
    DBG(input_uvc.c, cam_thread(), 724): received frame of size: 39642
    DBG(input_uvc.c, cam_thread(), 752): copying frame
    DBG(input_uvc.c, cam_thread(), 774): waiting for next frame
    DBG(input_uvc.c, cam_thread(), 724): received frame of size: 39854
    DBG(input_uvc.c, cam_thread(), 752): copying frame
    DBG(input_uvc.c, cam_thread(), 774): waiting for next frame
    DBG(input_uvc.c, cam_thread(), 724): received frame of size: 39896
    DBG(input_uvc.c, cam_thread(), 752): copying frame
    DBG(input_uvc.c, cam_thread(), 774): waiting for next frame
    DBG(input_uvc.c, cam_thread(), 724): received frame of size: 39776
    DBG(input_uvc.c, cam_thread(), 752): copying frame
    DBG(input_uvc.c, cam_thread(), 774): waiting for next frame
    DBG(input_uvc.c, cam_thread(), 724): received frame of size: 39037
    DBG(input_uvc.c, cam_thread(), 752): copying frame
    DBG(input_uvc.c, cam_thread(), 774): waiting for next frame
    DBG(input_uvc.c, cam_thread(), 724): received frame of size: 38042
    DBG(input_uvc.c, cam_thread(), 752): copying frame
    DBG(input_uvc.c, cam_thread(), 774): waiting for next frame
    DBG(input_uvc.c, cam_thread(), 724): received frame of size: 37815

     
  • By the way - are you on any IRC channel? If you want we could meet up and I can do "live" experiments or give you control of the system!

     
  • Well in this case the UVC control mapping to the V4L2 controls does not works as I expected.

    I have not used IRC yet, but if you do not have Skype I will setup an account.
    My skype account is martonmiklos.

     
  • Hi I'm a completely Linux newbie.
    I've installes mjpg-streamer with this tutorial:   http://www.acmesystems.it/foxg20/doku.php?id=tutorial:webcam
    My webcam is a logitech sphera af , I work on the embeded system Foxboard g20.
    The stream works fine but I cant acces the pan/tilt controls.
    I can start the input_control.so plugin but dont know how to find the right url for the website with the pan/tilt controls.
    The only page i can acces includes the brightness, resolution etc contols.
    i hope sombody can help me.
    best regards striker1985

     
  • Hello,

    I have working on heavilly on it with the manoweb's hardware help, but until this time I have not succeded.
    Fortunatelly we have etalon software the guvcview. I have been taken it's UVC control mapping and adding code, but it did not works yet.

    Until then it gets finally fixed, please use svn revs <= 94.

    Regards,
    Miklós

     
  • Yesterday we have got teh Pan tilt working with manoweb.
    If you have any additional hints, recommedations are welcome.

     
  • tmo26
    tmo26
    2013-02-18

    Sorry to bump up this old thread…

    I'm having the same problems with rev 148-1 and the Orbit Sphere AF.
    Since I'm rather new to linux and since I'm using mjpg_streamer  on OpenWRT, I'm a bit limited in regards to compiling and using previous revisions…

    anyway, here's what I get:

    mjpg_streamer -i "input_uvc.so -d /dev/video1 -r 800x600 -f 1 -y" -o "output_http.so -p 8090
    -w /www/webcam/"
    MJPG Streamer Version: svn rev: exported
    i: Using V4L2 device.: /dev/video1
    i: Desired Resolution: 800 x 600
    i: Frames Per Second.: 1
    i: Format…………: YUV
    i: JPEG Quality……: 80
    Adding control for Pan (relative)
    UVCIOC_CTRL_ADD - Error: Invalid argument
    Adding control for Tilt (relative)
    UVCIOC_CTRL_ADD - Error: Invalid argument
    Adding control for Pan Reset
    UVCIOC_CTRL_ADD - Error: Invalid argument
    Adding control for Tilt Reset
    UVCIOC_CTRL_ADD - Error: Invalid argument
    Adding control for Pan/tilt Reset
    UVCIOC_CTRL_ADD - Error: Invalid argument
    Adding control for Focus (absolute)
    UVCIOC_CTRL_ADD - Error: Invalid argument
    mapping control for Pan (relative)
    UVCIOC_CTRL_MAP - Error: Invalid argument
    mapping control for Tilt (relative)
    UVCIOC_CTRL_MAP - Error: Invalid argument
    mapping control for Pan Reset
    UVCIOC_CTRL_MAP - Error: Invalid argument
    mapping control for Tilt Reset
    UVCIOC_CTRL_MAP - Error: Invalid argument
    mapping control for Pan/tilt Reset
    UVCIOC_CTRL_MAP - Error: Invalid argument
    mapping control for Focus (absolute)
    UVCIOC_CTRL_MAP - Error: Invalid argument
    mapping control for LED1 Mode
    UVCIOC_CTRL_MAP - Error: Invalid argument
    mapping control for LED1 Frequency
    UVCIOC_CTRL_MAP - Error: Invalid argument
    mapping control for Disable video processing
    UVCIOC_CTRL_MAP - Error: Invalid argument
    mapping control for Raw bits per pixel
    UVCIOC_CTRL_MAP - Error: Invalid argument
    o: www-folder-path…: /www/webcam/
    o: HTTP TCP port…..: 8090
    o: username:password.: disabled
    o: commands……….: enabled

    I don't see any controls for pan/tilt/focus on the control.htm of the example page.

    Any hints on how to get pan/tilt/focus working on the Orbit Sphere AF mit mjpeg_streamer?

    Thanks in advance!

     
  • tmo26
    tmo26
    2013-02-18

    I forgot to mention some maybe relevant information about my cam:

    lsusb: ID 046d:0994 Logitech, Inc. QuickCam Orbit/Sphere AF

    Tag on webcam's usb-cord:
    M/N V-UCC22
    P/N 860-000110
    PID LZ945BP

     
  • clefranc
    clefranc
    2015-05-21

    Hi,
    Sorry to revive this old thread, but I've revived my old QuickCam Orbit/Sphere AF and wish to use the controls for pan/tilt/focus in my Pi (OctoPrint).

    Please help!

    If it can't be done with this webcam, can you tell me a webcam manufacturer/model that have these control available in MJPG-streamer.

    Thank you!

    Christian