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

Hdmi grabber?

Discussion in 'Hyperion General' started by pigbait, 30 December 2018.

  1. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    196
    How did you install the official branch of hyperion.ng?
    Which device and which os do you use?
     
  2. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    196
    Short instructions:
    sudo apt-get update
    sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev
    git clone --recursive https://github.com/Paulchen-Panther/hyperion.ng.git hyperion
    cd hyperion
    git checkout MJPEG
    mkdir build
    cd build
    git submodule update --init
    cmake -DCMAKE_BUILD_TYPE=Debug ..
    make -j $(nproc)
    cd bin
    ./hyperiond -d

    WebUI is located on http://localhost:8090
     
    Last edited: 3 March 2019
    • Thank you Thank you x 1
  3. pigbait

    pigbait New Member

    Messages:
    28
    Hardware:
    RPi1/Zero, RPi2
    I used hypercon to install hyperion, I will do this command when I get home.. i will keep you posted and thanks allot for helping me out.
     
    • Thank you Thank you x 1
  4. pigbait

    pigbait New Member

    Messages:
    28
    Hardware:
    RPi1/Zero, RPi2
    I have hyperion installed on my pi this is the OS i'm running....

    [email protected]:~ $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Raspbian
    Description: Raspbian GNU/Linux 8.0 (jessie)
    Release: 8.0
    Codename: jessie

    When I try to run the command "cd hyperion" I get this

    [email protected]:~ $ cd hyperion
    -bash: cd: hyperion: No such file or directory


    sorry not sure what to do.
     
  5. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    196
  6. pigbait

    pigbait New Member

    Messages:
    28
    Hardware:
    RPi1/Zero, RPi2
    Your right i missed that line.... i now get this error..

    [email protected]:~/hyperion/build $ cmake -DCMAKE_BUILD_TYPE=Debug ..
    -- PLATFORM is not defined, evaluated platform: rpi
    -- PLATFORM: rpi
    -- ENABLE_AMLOGIC = OFF
    -- ENABLE_DISPMANX = ON
    -- ENABLE_FB = ON
    -- ENABLE_OSX = OFF
    -- ENABLE_SPIDEV = ON
    -- ENABLE_TINKERFORGE = ON
    -- ENABLE_V4L2 = ON
    -- ENABLE_WS281XPWM = ON
    -- ENABLE_USB_HID = ON
    -- ENABLE_X11 = OFF
    -- ENABLE_QT = ON
    -- ENABLE_TESTS = OFF
    -- ENABLE_PROFILER = OFF
    -- validate json files
    checked files: 76 success: 76 errors: 0
    -- validate json effect files
    checked effect files: 36 success: 36 errors: 0
    -- validate json file
    -- Current Version: MJPEG (GitHub-d3a0fd0/b1b5bc4-1551636880) Git Remote: https://github.com/Paulchen-Panther/hyperion.ng.git
    -- Found Qt Version: 5.3.2
    CMake Error at CMakeLists.txt:262 (message):
    Your Qt version is to old! Minimum required 5.5.0


    -- Configuring incomplete, errors occurred!
    See also "/home/pi/hyperion/build/CMakeFiles/CMakeOutput.log".


    then i get this when i try the next command

    [email protected]:~/hyperion/build $ make -j $(nproc)
    make: *** No targets specified and no makefile found. Stop.


    sorry if im not that crazy advanced at linux stuff


    *** I figured it out.. I updated my distro to the newest one now just waiting for building to complete***
     
    Last edited: 5 March 2019
    • Like Like x 1
  7. pigbait

    pigbait New Member

    Messages:
    28
    Hardware:
    RPi1/Zero, RPi2
    ok so the build is complete, what a run the last command ./hyperiond -d i get this and i dont think i can use hypercon anymore?

    [hyperiond V4L2:auto] <ERROR> Frame too small: 42236 != 4147200
    [hyperiond V4L2:auto] <ERROR> Frame too small: 42236 != 4147200
    [hyperiond V4L2:auto] <ERROR> Frame too small: 42236 != 4147200
    [hyperiond V4L2:auto] <ERROR> Frame too small: 42236 != 4147200

    I see i need to use the webGUI now ..but how do i setup hyperion to auto start
     
    Last edited: 5 March 2019
  8. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,280
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    yes, try it with the webgui, there you can also see "live" the input
     
  9. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    196
    OK. I think I have the frame size calculated incorrectly. I will fix it as soon as possible.

    autostart scripts can be found in the directory /bin/service
     
    Last edited: 5 March 2019
  10. pigbait

    pigbait New Member

    Messages:
    28
    Hardware:
    RPi1/Zero, RPi2
    do I need to move autostart script or run it?
     
  11. pigbait

    pigbait New Member

    Messages:
    28
    Hardware:
    RPi1/Zero, RPi2
    doing a fresh install of raspbian stretch will see if that fixes things
     
  12. pigbait

    pigbait New Member

    Messages:
    28
    Hardware:
    RPi1/Zero, RPi2
    So last night i did a fresh install, Hyperion will work when I run the command ./hyperiond -d in my Putty terminal... but the minute i close the terminal it kills hyperion? anyone have an idea what i did wrong?
     
  13. b1rdhous3

    b1rdhous3 Member Developer

    Messages:
    81
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +PhilipsHue
    You did nothing wrong. When you start hyperion with ./hyperion -d it will start in your shell. If you close the shell, you close the program which is running in it.

    So you'll have to run it at a service. You can take the service which @Paulchen-Panther mentioned in his post und install it to the system. You have to copy the build files which were created by compiling in your build/bin directory to the directory which is used in the service. (/usr/bin)
    You can either use the normal initd script or the systemd script. Please check google how to handle with services and init.d scripts and how to install.
    If you have specific questions to that I am willing to help.
     
  14. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    196
    @pigbait
    I made a few changes in the MJPEG branch. Can you please post the complete console output this time? Thank you
     
    • Like Like x 2
  15. d00mw01f

    d00mw01f New Member

    Messages:
    5
    Hardware:
    RPi3, +Arduino
    Hello.

    I was unlucky and got grabber with only supported mjpeg pixel format.
    Is there any updates to adding support of mjpeg to hyperion?

    Right now I'm using workaround, created virtual device via v4l2loopback and converting mjpeg to uyvy, but it eats 15-20% of cpu.
     
  16. b1rdhous3

    b1rdhous3 Member Developer

    Messages:
    81
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +PhilipsHue
    You could try to test @Paulchen-Panther MJPEG Branch which he made available for tests.
    Would be great if you can test it so we can move on merging it to master.
     
  17. d00mw01f

    d00mw01f New Member

    Messages:
    5
    Hardware:
    RPi3, +Arduino
    This branch doesn't exist anymore.
     
  18. pigbait

    pigbait New Member

    Messages:
    28
    Hardware:
    RPi1/Zero, RPi2
    I need to apologize to @Paulchen-Panther I've been so busy with work I haven't had a chance to help him with logs and progress on this.

    I will try and make time soon

    Thanks and sorry
     
  19. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    196
  20. d00mw01f

    d00mw01f New Member

    Messages:
    5
    Hardware:
    RPi3, +Arduino
    I compiled branch and tried to get screenshot:

    Code:
    [email protected]:~/hyperion-mjpeg/hyperion.ng/build/bin $ ./hyperion-v4l2 -d /dev/video0 --screenshot
    hyperion-v4l2:
            Version   : 2.0.0 (V4L2 (Paulchen-Panther-f932e71a/54c7b5bb-1556474025) Git Remote: https://github.com/Paulchen-Panther/hyperion.ng.git)
            build time: Apr 28 2019 21:24:47
    
    Signal detection informations
    =============================
    dimension after decimation: 26 x 20
    signal detection area  : 6,5 x 19,15
    
    WARNING no red, green or blue "no signal area" detected, signal detection might have problems.
    
    suggested config values for signal detection:
            "redSignalThreshold"   : 0.1,
            "greenSignalThreshold" : 0.1,
            "blueSignalThreshold"  : 0.1,
            "signalDetectionHorizontalOffsetMin" : 0.23,
            "signalDetectionVerticalOffsetMin"   : 0.25,
            "signalDetectionHorizontalOffsetMax" : 0.73,
            "signalDetectionVerticalOffsetMax"   : 0.75
    

    Seems I missed some additional parameters for mjpeg, but for uyvy I got screenshot without any additional parameters.

    Then I launched hyperion, enabled usb capture and live video began working without problems:
    Code:
    [email protected]:~/hyperion-mjpeg/hyperion.ng/build/bin $ ./hyperiond -d
    [hyperiond DAEMON] <DEBUG> <PythonInit.cpp:20:PythonInit()> Initializing Python interpreter
    [hyperiond SettingsManager] <INFO> Selected configuration file: /home/pi/.hyperion/config/hyperion_main.json
    [hyperiond SettingsManager] <DEBUG> <SettingsManager.cpp:129:SettingsManager()> Settings database initialized
    [hyperiond EFFECTFILES] <INFO> 36 effects loaded from directory :/effects/
    [hyperiond EFFECTFILES] <INFO> 19 effect schemas loaded from directory :/effects/schema/
    [hyperiond EFFECTFILES] <INFO> 0 effects loaded from directory /home/pi/.hyperion/custom-effects
    [hyperiond SettingsManager] <INFO> Selected configuration file: /home/pi/.hyperion/config/hyperion_main.json
    [hyperiond SettingsManager] <DEBUG> <SettingsManager.cpp:73:SettingsManager()> Settings database initialized
    [hyperiond BLACKBORDER] <DEBUG> <BlackBorderProcessor.cpp:65:handleSettingsUpdate()> Set mode to: default
    [hyperiond ComponentRegister] <DEBUG> <ComponentRegister.cpp:67:componentStateChanged()> Blackborder detector: enabled
    [hyperiond FLATBUFCONNECTION] <INFO> Connecting to Hyperion: 127.0.0.1:19401
    [hyperiond ComponentRegister] <DEBUG> <ComponentRegister.cpp:67:componentStateChanged()> LED device: enabled
    [hyperiond LEDDEVICE] <INFO> LedDevice 'file' configured.
    [hyperiond ComponentRegister] <DEBUG> <ComponentRegister.cpp:67:componentStateChanged()> Smoothing: enabled
    [hyperiond EFFECTENGINE] <INFO> run effect Rainbow swirl fast on channel 0
    [hyperiond HYPERION] <DEBUG> <PriorityMuxer.cpp:153:registerInput()> Register new input 'System/EFFECT' with priority 0 as inactive
    [hyperiond HYPERION] <INFO> Inital foreground effect 'Rainbow swirl fast' started
    [hyperiond EFFECTENGINE] <INFO> run effect Warm mood blobs on channel 254
    [hyperiond HYPERION] <DEBUG> <PriorityMuxer.cpp:153:registerInput()> Register new input 'System/EFFECT' with priority 254 as inactive
    [hyperiond HYPERION] <INFO> Inital background effect 'Warm mood blobs' started
    [hyperiond HYPERION] <DEBUG> <PriorityMuxer.cpp:153:registerInput()> Register new input 'System/V4L' with priority 240 as inactive
    [hyperiond ComponentRegister] <DEBUG> <ComponentRegister.cpp:67:componentStateChanged()> V4L capture device: enabled
    [hyperiond BOBLIGHT] <DEBUG> <BoblightServer.cpp:24:BoblightServer()> Instance created
    [hyperiond DAEMON] <INFO> Hyperion initialized
    [hyperiond DAEMON] <INFO> set screen capture device to 'dispmanx'
    [hyperiond DISPMANXGRABBER] <DEBUG> <Grabber.cpp:33:setVideoMode()> Set videomode to 0
    [hyperiond DISPMANXGRABBER] <INFO> Display opened with resolution: 1920x1080
    [hyperiond DISPMANXGRABBER] <DEBUG> <Grabber.cpp:82:setWidthHeight()> Set new width: 80, height: 45 for capture
    [hyperiond DAEMON] <INFO> DISPMANX frame grabber created
    [hyperiond V4L2:/dev/video0] <DEBUG> <Grabber.cpp:33:setVideoMode()> Set videomode to 0
    [hyperiond V4L2:/dev/video0] <INFO> configured v4l device: /dev/video0
    [hyperiond V4L2:/dev/video0] <DEBUG> <V4L2Grabber.cpp:566:init_device()> width=160 height=120
    [hyperiond V4L2:/dev/video0] <DEBUG> <V4L2Grabber.cpp:625:init_device()> Pixel format=MJPEG
    [hyperiond V4L2:/dev/video0] <INFO> Started
    [hyperiond V4L2:/dev/video0] <INFO> Signal threshold set to: {12, 12, 12}
    [hyperiond V4L2:/dev/video0] <INFO> Signal detection is now disabled
    [hyperiond V4L2:/dev/video0] <INFO> Signal detection area set to: 0.250000,0.250000 x 0.750000,0.750000
    [hyperiond DAEMON] <DEBUG> <hyperiond.cpp:409:handleSettingsUpdate()> V4L2 grabber created
    [hyperiond JSONSERVER] <DEBUG> <JsonServer.cpp:23:JsonServer()> Created instance
    [hyperiond JSONSERVER] <ERROR> Could not bind to port '19444', please use an available port
    [hyperiond FLATBUFSERVER] <INFO> Started on port 19400
    [hyperiond PROTOSERVER] <ERROR> Failed to bind port 19445
    [hyperiond WEBSERVER] <DEBUG> <WebServer.cpp:96:handleSettingsUpdate()> Set document root to: :/webconfig
    [hyperiond WEBSERVER] <INFO> Started on port 8090 name 'Hyperion Webserver'
    [hyperiond HYPERION] <DEBUG> <PriorityMuxer.cpp:231:setInputImage()> Priority 0 is now active
    [hyperiond HYPERION] <DEBUG> <PriorityMuxer.cpp:330:setCurrentTime()> Set visible priority to 0
    [hyperiond HYPERION] <DEBUG> <PriorityMuxer.cpp:192:setInput()> Priority 254 is now active
    [hyperiond HYPERION] <DEBUG> <PriorityMuxer.cpp:231:setInputImage()> Priority 240 is now active
    [hyperiond WEBSOCKET] <DEBUG> <WebSocketClient.cpp:32:WebSocketClient()> New connection from ::ffff:192.168.0.3
    [hyperiond EFFECTENGINE] <INFO> effect finished
    [hyperiond HYPERION] <DEBUG> <PriorityMuxer.cpp:290:setCurrentTime()> Timeout clear for priority 0
    [hyperiond HYPERION] <DEBUG> <PriorityMuxer.cpp:330:setCurrentTime()> Set visible priority to 240
    
    

    But if I will make some changes to USB capturing configuration I'm getting alot of errors in output until restart of hyperion (in this case I just changed /dev/video0 to auto. Live video still working).
    Code:
    [hyperiond V4L2:auto] <ERROR> Throws error nr: VIDIOC_DQBUF error code 16, Device or resource busy
    Also if I will change Video standard to something different than auto, I'm getting black screen in live video, regardless what setting I chose and what video standard is set on grabber.
     
    • Like Like x 1