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

SOLVED Migrated from x11 grabber to v4l2 - now lights are lagging behind the TV image.

Discussion in 'Software Support' started by cmsimike, 28 October 2020.

  1. cmsimike

    cmsimike New Member

    Messages:
    6
    Hardware:
    RPi3, 32/64bit, +nodeMCU/ESP8266
    Hello,

    I am currently evaluating capturing the HDMI signal directly using an HDMI splitter with an HDMI to USB capture card.

    Some history:
    I'm currently using the x11 capture and the lights sync up perfectly to the tv. So I know the current setup works fine. I'd like to change the x11 capture to capturing the HDMI so that I can get the lights for video games, etc.

    Problem:
    So I've gone through the setup to get the HDMI capture working, and while it does work, there is definitely a delay in when the lights react to the tv, but the delay does seem constant.

    Debugging:
    I've tried disabling both black border detection and smoothing but that did not seem to help. I attached the same USB capture device on another computer and verified that the two HDMI streams are in sync. So at least the data that comes out of USB should be more or less synced with what the TV has. This leads me to believe that it's just the overhead related to v4l2 and at least as far as I know, there's nothing I can do about that.

    Long post short - is anyone else running v4l2 and have experienced a similar delay and if so, is there a fix for this? FWIW I am running this on a relatively low power device (intel compute stick with an m3 proc) so it's not the top of the line device it still is no slouch.
     
  2. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,890
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    config please
     
  3. cmsimike

    cmsimike New Member

    Messages:
    6
    Hardware:
    RPi3, 32/64bit, +nodeMCU/ESP8266
    Happy to. I am using the web interface. Would I just post screen shots or is there a way to get a text-based representation of my config? I think all the config now is stored in a sqlite database?
     
  4. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,890
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    you can make a export
     

    Attached Files:

  5. cmsimike

    cmsimike New Member

    Messages:
    6
    Hardware:
    RPi3, 32/64bit, +nodeMCU/ESP8266
    Thank you! Here's what I have. I'm running two grabbers at the moment - the framegrabber and v4l2. I have two different sets of RGB strips configured here and each one is using one but the lag problem persists even if I'm using only v4l2.

     
  6. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,890
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    did you try to lowest resolution in height and width?
    config looks ok
     
  7. cmsimike

    cmsimike New Member

    Messages:
    6
    Hardware:
    RPi3, 32/64bit, +nodeMCU/ESP8266
    No the device resolution dropdown is the one item I haven't changed. Left it on auto. I'll try that and see if I get a better result. Thank you!
     
  8. cmsimike

    cmsimike New Member

    Messages:
    6
    Hardware:
    RPi3, 32/64bit, +nodeMCU/ESP8266
    Dropping the res seems to have helped. THANK YOU!!!
     
    • Like Like x 1
  9. sirvictory444

    sirvictory444 New Member

    Messages:
    2
    Hardware:
    RPi1/Zero
    Are we talking about the frame size decimation? Or the usb grabber resolution. I haven't messed with the grabber resolution. Those settings sound like the same thing to me so I don't understand. I had a lot of flickering issues at decimation 8, due to poor quality video and noise in the image. I couldn't go lower due to the Pi Zero using 100% cpu. I migrated to a Pi 3 which allowed me to use no frame decimation, which corrected the flickering, but there's a small, maybe 50ms delay. How long is your delay? I suppose it's personal preference on what is acceptable, but my delay is just barely enough to be distracting to other viewers. Note: when troubleshooting I do have smoothing turned off.
     
  10. cmsimike

    cmsimike New Member

    Messages:
    6
    Hardware:
    RPi3, 32/64bit, +nodeMCU/ESP8266
    I changed Device Resolution from auto down to 720x480. There is definitely a light lag still (but much better now) but previous experience with v4l2 makes me think its expected. If there's a way to get a better response time, I'm all ears.

    I have kept decimation the Size decimation the same (8) but have not messed with that much.