Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Invalid input plugin number error

Irena Kos
2012-08-15
2013-05-30
  • Irena Kos
    Irena Kos
    2012-08-15

    Dear all,
    I've been using mjpg_streamer for some years now on a ubuntu server with my logitech sphere camera, and it's been working like a charm.
    Recently, I needed to upgrade the server version to 12.04, and then pan/tilt controls stopped working.
    I tried to recompile the old version of mjpg_streamer, but I got an error saying that videodev.h is missing.
    Then I downloaded the latest distribution of mjpg_streamer and the compilation succeeded with some warnings.
    I've copied the recompiled program to /usr/local/bin and plugins to /usr/local/lib where old mjpg_streamer files were set (so all my other scripts don't change)
    I started the mjpg_streamer from one of my scripts with

                    LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/mjpg_streamer -o "output_http.so -w /var/www/mjpg-www" &
          
    and it's running, but when I browse to http://server_address:8080/ i get the following error:

    404: Not Found!
    Invalid input plugin number

    My camera is connected

    (dmesg output)

    uvcvideo: Found UVC 1.00 device <unnamed> (046d:0994)
    input: UVC Camera (046d:0994) as /devices/pci0000:00/0000:00:03.3/usb1/1-1/1-1:1.0/input/input9

    (lsusb output)

    Bus 001 Device 013: ID 046d:0994 Logitech, Inc. QuickCam Orbit/Sphere AF

    What am I missing?
    Thank you very much for the help!

    Best regards,
    Irene

     
  • Irena Kos
    Irena Kos
    2012-08-15

    OK, now I successfully started the camera with calling inut_uvc.so

    LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/mjpg_streamer -i "input_uvc.so"-o "output_http.so -w /var/www/mjpg-www

    but when I run it, I get errors:

    MJPG Streamer Version: svn rev:
    i: Using V4L2 device.: /dev/video0
    i: Desired Resolution: 640 x 480
    i: Frames Per Second.: 5
    i: Format…………: MJPEG
    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…: /var/www/mjpg-www/
    o: HTTP TCP port…..: 8080
    o: username:password.: disabled
    o: commands……….: enabled

    The site is visible now, but no controls:
    Are there some other config parameters I need to set?

    Thank you,
    Irene

     
  • Hello,

    The errors what you have seen are normal, mapping the extended UVC controls causing them.
    I will try to suppress it because they are confusing.

    Could you please send the the http://<mjpg_streamer_addr>:<port>/program.json and inpput_0.json and output_0.json

    Thanks, Miklós

     
  • Irena Kos
    Irena Kos
    2012-08-16

    Hi, thank you for the quick response!
    Here are the outputs:
    program.json
    {
    "inputs":[
    {
    "id": "0",
    "name": "input_uvc.so",
    "args": "(null)"
    }
    ],
    "outputs":[
    {
    "id": "0",
    "name": "output_http.so",
    "args": " -w /home/irene/applications/mjpg-streamer/www"
    }
    ]}
    input_0.json
    {
    "controls": [
    {
    "name": "Brightness",
    "id": "9963776",
    "type": "1",
    "min": "0",
    "max": "255",
    "step": "1",
    "default": "128",
    "value": "128",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Contrast",
    "id": "9963777",
    "type": "1",
    "min": "0",
    "max": "255",
    "step": "1",
    "default": "32",
    "value": "32",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Saturation",
    "id": "9963778",
    "type": "1",
    "min": "0",
    "max": "255",
    "step": "1",
    "default": "32",
    "value": "32",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "White Balance Temperature, Auto",
    "id": "9963788",
    "type": "2",
    "min": "0",
    "max": "1",
    "step": "1",
    "default": "1",
    "value": "1",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Gain",
    "id": "9963795",
    "type": "1",
    "min": "0",
    "max": "255",
    "step": "1",
    "default": "0",
    "value": "0",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Power Line Frequency",
    "id": "9963800",
    "type": "3",
    "min": "0",
    "max": "2",
    "step": "1",
    "default": "2",
    "value": "2",
    "dest": "0",
    "flags": "0",
    "group": "1",
    "menu": {"0": "Disabled", "1": "50 Hz", "2": "60 Hz"}
    },
    {
    "name": "White Balance Temperature",
    "id": "9963802",
    "type": "1",
    "min": "0",
    "max": "10000",
    "step": "10",
    "default": "4000",
    "value": "4000",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Sharpness",
    "id": "9963803",
    "type": "1",
    "min": "0",
    "max": "255",
    "step": "1",
    "default": "224",
    "value": "224",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Backlight Compensation",
    "id": "9963804",
    "type": "1",
    "min": "0",
    "max": "2",
    "step": "1",
    "default": "1",
    "value": "1",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Exposure, Auto",
    "id": "10094849",
    "type": "3",
    "min": "0",
    "max": "3",
    "step": "1",
    "default": "3",
    "value": "3",
    "dest": "0",
    "flags": "0",
    "group": "1",
    "menu": {"0": "ø§V ø§V ss", "1": "Manual Mode", "2": "rast", "3": "Aperture Priority Mode"}
    },
    {
    "name": "Exposure (Absolute)",
    "id": "10094850",
    "type": "1",
    "min": "1",
    "max": "10000",
    "step": "1",
    "default": "166",
    "value": "166",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Exposure, Auto Priority",
    "id": "10094851",
    "type": "2",
    "min": "0",
    "max": "1",
    "step": "1",
    "default": "0",
    "value": "1",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Pan (relative)",
    "id": "10094852",
    "type": "1",
    "min": "-4480",
    "max": "4480",
    "step": "0",
    "default": "0",
    "value": "0",
    "dest": "0",
    "flags": "64",
    "group": "1"
    },
    {
    "name": "Tilt (relative)",
    "id": "10094853",
    "type": "1",
    "min": "-1920",
    "max": "1920",
    "step": "0",
    "default": "0",
    "value": "0",
    "dest": "0",
    "flags": "64",
    "group": "1"
    },
    {
    "name": "Pan Reset",
    "id": "10094854",
    "type": "1",
    "min": "0",
    "max": "1",
    "step": "1",
    "default": "0",
    "value": "0",
    "dest": "0",
    "flags": "64",
    "group": "1"
    },
    {
    "name": "Tilt Reset",
    "id": "10094855",
    "type": "1",
    "min": "0",
    "max": "1",
    "step": "0",
    "default": "0",
    "value": "0",
    "dest": "0",
    "flags": "64",
    "group": "1"
    },
    {
    "name": "Pan/tilt Reset",
    "id": "168062211",
    "type": "1",
    "min": "0",
    "max": "3",
    "step": "1",
    "default": "0",
    "value": "0",
    "dest": "0",
    "flags": "64",
    "group": "1"
    },
    {
    "name": "Focus",
    "id": "168062212",
    "type": "1",
    "min": "0",
    "max": "255",
    "step": "1",
    "default": "0",
    "value": "0",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "LED1 Mode",
    "id": "168062213",
    "type": "1",
    "min": "0",
    "max": "132",
    "step": "1",
    "default": "3",
    "value": "3",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "LED1 Frequency",
    "id": "168062214",
    "type": "1",
    "min": "0",
    "max": "255",
    "step": "1",
    "default": "0",
    "value": "0",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Disable video processing",
    "id": "168062321",
    "type": "2",
    "min": "0",
    "max": "1",
    "step": "1",
    "default": "0",
    "value": "0",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Raw bits per pixel",
    "id": "168062322",
    "type": "1",
    "min": "0",
    "max": "1",
    "step": "1",
    "default": "0",
    "value": "0",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "JPEG quality",
    "id": "1",
    "type": "1",
    "min": "0",
    "max": "100",
    "step": "1",
    "default": "50",
    "value": "0",
    "dest": "0",
    "flags": "0",
    "group": "3"
    }
    ]
    }
    output_0.json
    {
    "controls": [

    ]
    }

    Let me just note that this version that is running now is compiled without  USE_LIBV4L2=true. If I compile it with libv4l2, it compiles successfully, but refuses to start, notifying that it cannot access video device.

    Thank you!
    Irene

     
  • Hello,

    Thank you for providing the feedack.
    There is a strange menu at the Exposure menu.
    I do not know that this is the problem of the forum, or it exists at the json also.
    Could you please pull the json files with wget for e.g. and put it to somewhere where I can access them?
    It seems to be that the server produces right JSON files, but something goes wrong at the client side at the browser. What kind of browser do you use.

    Regards,
    Miklós

     
  • Irena Kos
    Irena Kos
    2012-08-16

    Hi,
    You can download the files from http://ubuntuone.com/4Esb7QCAmNTx5c78Bm88a2.
    I've tried to open the mjpg_streamer site with latest browsers: Firefox 14.0.1, Chrome 21.0.1180.79 and IE 9.0.8;
    all with the same results - control page is empty.
    Firebug throws some errors about missing images (I see in CSS that you're referencing images from images/ subfolder, but that is not included with the distribution files), and this:

    "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in the document or in the transfer protocol."

    Best regards,
    Irene

     
  • Which repo do you user the ewxperimental or the non one?
    I am sorry about the left out files, I will upload them asap.

     
  • Please try out the experimental branch.

    I will bee on vacation next week, but after it I I wll fix and merge the new stuffs to the stable branch.

     
  • Irena Kos
    Irena Kos
    2012-08-18

    Hi,

    The experimental version is working, all controls are visible and operative! :)
    Thank you! :*

    I.

     
  • Hello,

    I have a similare problem, since I updated my unbuntu from 10.04 to 12.04 I have the streaming working whell
    but I lost the pan and tilt control of my shpere AF ?

    wifibot@wifibot-lab:~/Downloads/mjpg-streamer-experimental$ sudo ./mjpg_streamer -input "/home/wifibot/Downloads/mjpg-streamer-experimental/input_uvc.so -device /dev/video0 -fps 10 -resolution 320x240" -output "/home/wifibot/Downloads/mjpg-streamer-experimental/output_http.so -p 8080 -w /home/wifibot/Downloads/mjpg-streamer-experimental/www"
    password for wifibot:
    MJPG Streamer Version: svn rev: exported
    i: Using V4L2 device.: /dev/video0
    i: Desired Resolution: 320 x 240
    i: Frames Per Second.: 10
    i: Format…………: JPEG
    i: TV-Norm………..: DEFAULT
    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…: /home/wifibot/Downloads/mjpg-streamer-experimental/www/
    o: HTTP TCP port…..: 8080
    o: username:password.: disabled
    o: commands……….: enabled
    UVCIOC_CTRL_ADD - Error: Invalid argumentmapping control for Tilt (relative)
    UVCIOC_CTRL_MAP - Error: Invalid argument

    program.json:

    {
    "inputs":[
    {
    "id": "0",
    "name": "Camera 1",
    "plugin": "/home/wifibot/Downloads/mjpg-streamer-experimental/input_uvc.so",
    "args": " -device /dev/video0 -fps 10 -resolution 320x240"
    }
    ],
    "outputs":[
    {
    "id": "0",
    "name": "HTTP output plugin",
    "plugin": "/home/wifibot/Downloads/mjpg-streamer-experimental/output_http.so",
    "args": " -p 8080 -w /home/wifibot/Downloads/mjpg-streamer-experimental/www"
    }
    ]}

    input.json:

    {
    "controls": [
    {
    "name": "Brightness",
    "id": "9963776",
    "type": "1",
    "min": "0",
    "max": "255",
    "step": "1",
    "default": "128",
    "value": "0",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Contrast",
    "id": "9963777",
    "type": "1",
    "min": "0",
    "max": "255",
    "step": "1",
    "default": "32",
    "value": "32",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Saturation",
    "id": "9963778",
    "type": "1",
    "min": "0",
    "max": "255",
    "step": "1",
    "default": "32",
    "value": "32",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "White Balance Temperature, Auto",
    "id": "9963788",
    "type": "2",
    "min": "0",
    "max": "1",
    "step": "1",
    "default": "1",
    "value": "1",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Gain",
    "id": "9963795",
    "type": "1",
    "min": "0",
    "max": "255",
    "step": "1",
    "default": "0",
    "value": "0",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Power Line Frequency",
    "id": "9963800",
    "type": "3",
    "min": "0",
    "max": "2",
    "step": "1",
    "default": "2",
    "value": "0",
    "dest": "0",
    "flags": "0",
    "group": "1",
    "menu": {"0": "Disabled", "1": "50 Hz", "2": "60 Hz"}
    },
    {
    "name": "White Balance Temperature",
    "id": "9963802",
    "type": "1",
    "min": "0",
    "max": "10000",
    "step": "10",
    "default": "4000",
    "value": "4000",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Sharpness",
    "id": "9963803",
    "type": "1",
    "min": "0",
    "max": "255",
    "step": "1",
    "default": "224",
    "value": "224",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Backlight Compensation",
    "id": "9963804",
    "type": "1",
    "min": "0",
    "max": "2",
    "step": "1",
    "default": "1",
    "value": "1",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Exposure, Auto",
    "id": "10094849",
    "type": "3",
    "min": "0",
    "max": "3",
    "step": "1",
    "default": "3",
    "value": "3",
    "dest": "0",
    "flags": "0",
    "group": "1",
    "menu": {"0": "", "1": "Manual Mode", "2": "", "3": "Aperture Priority Mode"}
    },
    {
    "name": "Exposure (Absolute)",
    "id": "10094850",
    "type": "1",
    "min": "1",
    "max": "10000",
    "step": "1",
    "default": "166",
    "value": "166",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "Exposure, Auto Priority",
    "id": "10094851",
    "type": "2",
    "min": "0",
    "max": "1",
    "step": "1",
    "default": "0",
    "value": "1",
    "dest": "0",
    "flags": "0",
    "group": "1"
    },
    {
    "name": "JPEG quality",
    "id": "1",
    "type": "1",
    "min": "0",
    "max": "100",
    "step": "1",
    "default": "50",
    "value": "0",
    "dest": "0",
    "flags": "0",
    "group": "3"
    }
    ],
    "formats": [
    {
    "id": "0",
    "name": "MJPEG",
    "compressed": "true",
    "emulated": "false",
    "current": "true",
    "resolutions": {"0": "160x120", "1": "176x144", "2": "320x240", "3": "352x288", "4": "640x480", "5": "800x600", "6": "960x720"}
    ,
    "currentResolution": "6"
    },
    {
    "id": "1",
    "name": "YUV 4:2:2 (YUYV)",
    "compressed": "false",
    "emulated": "false",
    "current": "false",
    "resolutions": {"0": "160x120", "1": "176x144", "2": "320x240", "3": "352x288", "4": "640x480", "5": "800x600", "6": "960x720", "7": "1600x1200"}
    }

    ]
    }

    output.json:

    {
    "controls": [

    ]
    }

     
  • I want just to add that I tested the stable nd the experimental version, the problem is the same.

    Best,

    Laurent

     
  • Hello,

    Fnaly it was the uvc driver of ubuntu 12.04, It was a bug that was identifyed and corected on the last update.
    Now all is ok but only with the experimental branch.

    Best,

    Laurent