V4L2 grabber not working

  • Hello everybody,


    I was using hyperion for more then 2 years on my RaspberryPi 2 with an STK1160 grabber and 2015-09-24-raspbian-jessie installed.
    It worked completely stable and with no issues during this period.


    As I had to update some packages and stuff I wiped my system completely and started with a new 2017-03-02-raspbian-jessie-lite a couple of days ago.


    Sadly I cant get hyperion working.
    I can use the android app or HyperCon to send the right colors to my ambilight (so hyperion and my config is right), but the grabbing doesnt work at all.


    I set the HDMI2CVBS Konverter to NTSC (because PAL gave me back in the days allways the "frame too small" error).
    When I set the V4L2 grabber to PAL and do this after reboot:
    sudo service hyperion status


    it gives me:
    hyperion.service - Hyperion Systemd service
    Loaded: loaded (/etc/systemd/system/hyperion.service; enabled)
    Active: active (running) since Fri 2017-03-10 12:55:09 UTC; 1min 8s ago
    Main PID: 410 (hyperiond)
    CGroup: /system.slice/hyperion.service
    └─410 /usr/bin/hyperiond /etc/hyperion/hyperion.config.json
    Mar 10 12:55:10 raspberrypi hyperiond[410]: INFO: Hyperion started and initialised
    Mar 10 12:55:10 raspberrypi hyperiond[410]: INFO: Json server created and started on port 19444
    Mar 10 12:55:10 raspberrypi hyperiond[410]: INFO: Proto server created and started on port 19445
    Mar 10 12:55:10 raspberrypi hyperiond[410]: V4L2GRABBER INFO: width=640 height=480
    Mar 10 12:55:10 raspberrypi hyperiond[410]: V4L2GRABBER INFO: pixel format=UYVY
    Mar 10 12:55:10 raspberrypi hyperiond[410]: BLACKBORDER INFO: threshold set to 0.1 (26)
    Mar 10 12:55:10 raspberrypi hyperiond[410]: BLACKBORDER INFO: mode:default
    Mar 10 12:55:10 raspberrypi hyperiond[410]: V4L2GRABBER INFO: signal threshold set to: {0,0,0}
    Mar 10 12:55:10 raspberrypi hyperiond[410]: V4L2GRABBER INFO: started
    Mar 10 12:55:10 raspberrypi hyperiond[410]: INFO: V4L2 grabber created and started



    Taking a screenshot with
    sudo hyperion-v4l2 -d /dev/video0 –v NTSC -f 2 -s 1 --screenshot


    is not possible.
    It gives me:
    sudo hyperion-v4l2 -d /dev/video0 –v NTSC -f 2 -s 1 --screenshot
    hyperion-v4l2:
    version : V1.03.2 (brindosch-99d9396/d3713a8-1469452981
    build time: Jul 25 2016 06:54:40
    VIDIOC_S_FMT ERROR 16, Device or resource busy


    I remember that I have to stop hyperion first to do this, but the command:
    sudo /etc/init.d/hyperion stop


    is not found.
    Also the process "hyperion" is not found when trying to:
    sudo killall hyperiond


    but :
    sudo service hyperion stop


    seems to work.
    If I then again try to take a screenshot
    sudo hyperion-v4l2 -d /dev/video0 –v NTSC -f 2 -s 1 --screenshot



    The terminal freezes at:
    hyperion-v4l2:
    version : V1.03.2 (brindosch-99d9396/d3713a8-1469452981
    build time: Jul 25 2016 06:54:40
    V4L2GRABBER INFO: width=640 height=480
    V4L2GRABBER INFO: pixel format=UYVY
    V4L2GRABBER INFO: signal threshold set to: {0,0,0}
    V4L2GRABBER INFO: started


    The log via the HyperCon gives me:
    ssh in: Mar 10 13:01:36 raspberrypi systemd[1]: Stopping Hyperion Systemd service...
    ssh in: Mar 10 13:01:36 raspberrypi hyperiond[410]: INFO: Application closed with code 0
    ssh in: Mar 10 13:01:36 raspberrypi hyperiond[410]: V4L2GRABBER INFO: stopped
    ssh in: Mar 10 13:01:36 raspberrypi hyperiond[410]: EFFECTENGINE INFO: Cleaning up Python interpreter
    ssh in: Mar 10 13:01:36 raspberrypi systemd[1]: Stopped Hyperion Systemd service.


    On trying to take the picture from HyperCon (right click on the TVscreen and get picture) also HyperCon freezes.


    I hope you guys can help me out and get the V4L2 grabber working with my STK1160 (because fushicai s**ks on grabbing regarding to the colors)

  • The last days I was test everything I could.
    Your post didnt help me.


    The frame too small error still appears but it looks like hyperions working with "no big problems" (no freezes, flicker or unsmooth).
    The problem above could be solved by setting the HDMI->AV converter to "PAL" and also set the V4L2 grabber to PAL.


    But you will get a new problem:
    On PAL the FullHD screen is croped 30px from the bottom and 20px from the top. (this is about 5% missing of the source image area)
    I dont know if it is a driver issue, the HDMI->AV converter has a problem on converting in PAL or what exactly cause this issue, but I know that I used "back in the days" the HDMI->AV converter in NTSC mode because then the screen is fully grabbed and I get no "frame too small" errors.


    Do you have any hints how I could get hyperion to work with NTSC?
    If I set the converter to NTSC the ambilight is just showing for ~1sec. and then turns off the LEDs.
    I can say that hyperion is still running and sending data (probably black/off colors) to the LEDs because my Arduino is blinking (which indicates data incoming from the Raspberry).


    This might be the same problem that appears when I try to take a screenshot:
    sudo hyperion-v4l2 --width 720 --height 576 --screenshot


    Output:
    hyperion-v4l2:
    version : V1.03.2 (brindosch-99d9396/d3713a8-1469452981
    build time: Jul 25 2016 06:54:40
    VIDIOC_S_FMT ERROR 16, Device or resource busy



    The "VIDIOC_S_FMT ERROR 16, Device or resource busy"- message is weird because hyperion is stopped an nothing is using the STK1160 device.
    I think that if I can find a solution for this, then the ambilight will be great again.

    • Offizieller Beitrag

    VIDIOC_S_FMT ERROR 16, Device or resource busy, this occurs sometimes...only solution is to restart...


    the easiest and fastest solution is to buy an fushicai utv007 grabber...but the "frame to small" is not an error, its just a warning message...and the frame will only rejeceted...

  • The problem with the fushicai grabber is, that it produces an over saturated image by hardware.
    So you will irreversible lose colors and therefore get a worse ambilight because you will have sand color or skin as "orange" so the ambilight is really way off.


    So fushicai is no real option if you want a good ambilight (I own this one and tested it completely on a PC to see what image it produces "out of the box" and then checked the result on hyperion/ambilight).


    The only really usable option is to use the STK1160 and get it working.
    You are right, that the "frame too small" message is just "annoying" for me on the terminal as long as the rejeceted frames are not that often.
    But I have to get the real image of the TV with un-croped top and bottom.


    As far as I know (and tested) the PAL image (HDMI converter to PAL) is always croped.
    The NTSC (HDMI converter to NTSC) seems not to work anymore...


    To restart is not really a solution because we all want stable ambilights right?
    I dont want to pause a film on a movie night and go to my computer to restart the raspberry.
    It must be possible somehow - either to get rid of the "VIDIOC_S_FMT ERROR 16, Device or resource busy" error
    or to make the grabber get the whole image on PAL.


    I am grateful for any hints and help!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!