V4L2: Add shutdown detection

  • The V4L2 shuts down properly if the grabber don´t get a signal. Sadly hdmi splitter output often a signal (eg blue)
    Might there a way to "detect" (like blackborder processing) this as a shutdown condition to prevent blue leds in general. And open the possibility for automatically applied effects and static color as a idle state


    @all @penfold42 @redPanther @Paulchen-Panther
    If someone search something to do :)

  • That seems to be a nice way of resolving the issue. The "do something" could then be a constant stream of black to the leds. That way the leds stay off, even when theres interference with other devices. (for example, the first 5 leds light up when i turn off my amp)
    And since hyperion keeps processing incoming data it recognises when the there is new input and "reactivates"

  • Shutting down the grabber definitely saves energy, although not much. But how does it recognise when new input comes in? I for example have my pi always on since it draws only insignificant power. Only the bluescreen prevents me from having hyperion run all the time. A remote control could solve this problem. but that requires user interaction. My perfectionism tells me such things should happen automatically :P

  • The idea behind a shutdown is to prevent the v4l2 keep blocking the priority order. This is just a shutdown on hyperion side, not on device side. This currently works for me with scart, a "blue" detection could kick in here to "shutdown" the hyperion v4l2 grabber. It automatically will be activated if you receive a picture again.


    The send "black" is another part, due to the point we use more than just v4l2 as grabbing source to keep it clean and available to every grabber.
    But we need to figure out first how this should be implemented.

  • why we dont use the signal threshold detection already build in v4l2 grabber?


    "grabber-v4l2" :
    {
    "device" : "/dev/video0",
    "input" : 0,
    "standard" : "no-change",
    "width" : -1,
    "height" : -1,
    "frameDecimation" : 2,
    "sizeDecimation" : 8,
    "priority" : 900,
    "mode" : "2D",
    "cropLeft" : 0,
    "cropRight" : 0,
    "cropTop" : 0,
    "cropBottom" : 0,
    "redSignalThreshold" : 0.0,
    "greenSignalThreshold" : 0.0,
    "blueSignalThreshold" : 0.0
    },

  • Not sure if this really fits. You don´t want to ignore color areas in general by default all time? So if you have a bright blue you kill all blue in general?
    But maybe a modification could be used here.

  • for A/D videograbber this is the only chance you have.
    There is a hardcoded framecounter threshold currently set to 50. This means if 50 frames fullfills the threshold condition, no frames send to hyperion core. After priority timeout the used prio channel in priomuxer will be clean and the next prio channel is visible.


    We can make the threshold counter available in config so you can set it to your needs. Default could be current value(50)


    (when my lightberry arrives I will investigate that :) )

  • sorry for you.


    I can imaginge we extend hyperion-v4l2 with a new function that outputs the settings for the threshold.


    should work like that:


    ./hyperion-v4l2 --getNoSignalThresholds
    > remove signal cable from your grabber and press <enter>
    "redSignalThreshold" : 0.0,
    "greenSignalThreshold" : 0.0,
    "blueSignalThreshold" : 0.8
    > don't forget to reconect your signal cable!


    then you can set the evaluated values in config file. In future we can set the evaluated values directly into config without manual editing.

  • Quote of redPanther to keep the notice.


    good settings for grabber with:


    black no signal picture
    redSignalThreshold" : 0.1,
    "greenSignalThreshold" : 0.1,
    "blueSignalThreshold" : 0.1


    black and/or blue no signal picture
    redSignalThreshold" : 0.1,
    "greenSignalThreshold" : 0.1,
    "blueSignalThreshold" : 1.0


    black and/or green no signal picture
    redSignalThreshold" : 0.1,
    "greenSignalThreshold" : 1.0,
    "blueSignalThreshold" : 0.1



    There is nothing more that could be improved.
    This should result in a "temporary disabled"-state for your v4l2 device and prevent blue or green leds. In case you get a rainbow pattern, there is no chance to get a nice solution

    • Offizieller Beitrag

    Wie wäre es, zum Threshold auch noch eine pixelangabe hinzuzufügen?
    Damit könnte man es eingrenzen welcher Bildschirmbereich überwacht werden soll.
    Wie sieht dieses Rainbow Image eigentlich aus? Kann jemand mal ein Aufnahme von dem Bild machen?

Jetzt mitmachen!

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