1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PiCam as Source for V4l2

Discussion in 'Hyperion Hardware' started by schnuller, 14 February 2018.

  1. schnuller

    schnuller New Member

    Messages:
    27
    Hardware:
    RPi1/Zero, +nodeMCU/ESP8266
    Hello

    is it posible to use a PiCam directly connected with a pi Zero as hyperion Video Source
    i tried it, but become always this Error:

    V4L2GRABBER INFO: width=640 height=480
    terminate called after throwing an instance of 'std::runtime_error'
    what(): V4L2GRABBER ERROR: Only pixel formats UYVY, YUYV, and RGB32 are supported ERROR

    the PiCam Works fine with: raspistill -o /home/pi/testbild.jpg or with raspivid

    i tried to change the output format with
    --pixel-format

    but the Version of hyperion 1.03 dont know this parameter!
     
  2. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    I’ve had this work before

    What does this command give you ?
    (Assuming your picam is video0)
    # v4l2-ctl -d /dev/video0 --list-formats-ext
     
    • Thank you Thank you x 1
  3. schnuller

    schnuller New Member

    Messages:
    27
    Hardware:
    RPi1/Zero, +nodeMCU/ESP8266
    Hello

    the same like User GIOVANNE



    but I found my First Problem:

    I use the Parameter --pixel-format false

    i used -pixel-YUYV and not --pixel-format -YUYV

    sorry, i am not so good with Linux!
    i have to Check it at home
     
    Last edited: 15 February 2018
  4. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    this works for me:
    ./hyperion-v4l2 --pixel-format YUYV --width 256 --height 144 -a 10.0.0.72:19445
     
  5. schnuller

    schnuller New Member

    Messages:
    27
    Hardware:
    RPi1/Zero, +nodeMCU/ESP8266
    sudo hyperion-v4l2 -d /dev/video0 --video-standard "no-change" --pixel-format "uyvy" --screenshot

    hyperion-v4l2:
    version : V1.03.3 (brindosch-2fbbcff/2f01dfa-1495880388
    build time: Jun 3 2017 02:06:37
    V4L2GRABBER INFO: width=1024 height=768
    V4L2GRABBER INFO: pixel format=UYVY
    V4L2GRABBER INFO: signal threshold set to: {0,0,0}
    V4L2GRABBER INFO: started
    V4L2GRABBER INFO: stopped

    all OK, but not in HyperCon
    how looks your config for the Grabber in Hyperion direkt

    i have:

    // V4L2 GRABBER CONFIG
    "grabber-v4l2" :
    {
    "device" : "/dev/video0",
    "input" : 0,
    "standard" : "no-change",
    "width" : -1,
    "height" : -1,
    "frameDecimation" : 1,
    "sizeDecimation" : 4,
    "priority" : 900,
    "mode" : "2D",
    "cropLeft" : 0,
    "cropRight" : 0,
    "cropTop" : 0,
    "cropBottom" : 0,
    "redSignalThreshold" : 0.0,
    "greenSignalThreshold" : 0.0,
    "blueSignalThreshold" : 0.0
     
  6. giovanne

    giovanne Member

    Messages:
    59
    Hardware:
    RPi2, RPi3, +nodeMCU/ESP8266
    Hi, have you new findings on the config for the grabber in hyperion.config.json?
    I think that for hyperion itself somthing like:
    // V4L2 GRABBER CONFIG
    "grabber-v4l2" :
    {
    "pixel-format" : "YUYV"
    ...
    will be necessary :confused:
    But currently not supported...

    My hyperion with PiCam currently also throwing error. (raspistill is working fine):
    terminate called after throwing an instance of 'std::runtime_error'
    what(): V4L2GRABBER ERROR: Only pixel formats UYVY, YUYV, and RGB32 are supported ERROR

    Edit: my PiCam isn't stable, after some Screenshots with hyperion-v4l2 my PiCam freezes with the following and also a reboot of the Pi isn't possible without power off :(
    ...
    [email protected]:/home/pi/screenshots# hyperion-v4l2 --video-standard "no-change" --pixel-format YUYV --crop-top 0 --crop-bottom 0 --crop-left 0 --crop-right 0 --size-decimator 1 --frame-decimator 1 --red-threshold 0.0 --green-threshold 0.0 --blue-threshold 0.0 --screenshot
    hyperion-v4l2:
    version : V1.03.3 (brindosch-2fbbcff/2f01dfa-1495880388
    build time: Jun 3 2017 02:06:37
    V4L2GRABBER INFO: width=1024 height=768
    V4L2GRABBER INFO: pixel format=YUYV
    V4L2GRABBER INFO: signal threshold set to: {0,0,0}
    V4L2GRABBER INFO: started
    V4L2GRABBER INFO: stopped
    [email protected]:/home/pi/screenshots# hyperion-v4l2 --video-standard "no-change" --pixel-format YUYV --crop-top 0 --crop-bottom 0 --crop-left 0 --crop-right 0 --size-decimator 1 --frame-decimator 1 --red-threshold 0.0 --green-threshold 0.0 --blue-threshold 0.0 --screenshot
    hyperion-v4l2:
    version : V1.03.3 (brindosch-2fbbcff/2f01dfa-1495880388
    build time: Jun 3 2017 02:06:37
    VIDIOC_S_FMT ERROR 22, Invalid argument

    Tried it before in my running environment and also now when setting up a new Pi with OSMC/hyperion/... from scratch...
    Maybe a bad PiCam ;)
     
    Last edited: 19 February 2018