APA102 LED Responsiveness

  • So I hate to do this, but I've been messing with software settings for the past day or so and I can't get my LEDs to respond in sync with my TV. No matter what I've tried my LED's will also update about .2 seconds after the TV input changes and especially when scenes change it is noticeable that the LED's are lagging behind.


    One other important thing to mention is my PI never goes above ~50% total CPU utilization even when running the LEDs with some of the lower (better resolution, higher refresh) settings i've tried.


    Running a Pi Zero with ~300 APA102 LEDs via a HDMI to USB Video grabber that is getting split off my PS5 to my TV and to the grabber.


    I made some comments below in the code section about some changes I've made, from what i've googled and read around here and the most important things I think i've found is that smoothing is disabled (currently) or at a very low delay, I've messed with the baudrate, refresh rate of the grabber, resolution and Decimation a ton but the only setting that has any increase was lowering smoothing, disabling it doesn't increase it to a perfect, or near perfect synchronization to the TV.


    If there is anything I missed please let me know or anything more I can try. I removed some of the section below like "LEDs" to make the config smaller on here.


  • do you know which resolutions your grabber can? can see it with "v42l-ctl --all"


    I wasn't able to get that command to work but my HDMI splitter outputs 4k or 1080, I currently have it downscaling my input to 1080 to the PI. I currently, manually have the resolution on the grabber set to 128x72 resolution and that has improved things a little more but still more of a delay than I would like. Also having the resolution so low it can't see smaller things around the edges.

  • I took a video, with 127x72 at 3 Decimation Is about as near perfect as I can seem to get it.. but at this point I've got more LEDs behind my TV then pixles the PI is actually reading.


    There has to be some setting or something I am missing right? With a ton of action its not very noticeable but on the hard scene change you can definitely see the LEDs are lagging enough to be noticeable - I just recorded on my phone so the quality isn't perfect.


    Externer Inhalt www.youtube.com
    Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklären Sie sich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.

  • I boosted it at one point but reconfigured since then and forgot to overclock it again. After overclocking again it seem a little better, more so now that I can't say I even notice unless I'm standing there trying to notice the difference.



    Here are the settings I ended up on, and its been stable for a couple days now like this:


    arm_freq=1095
    gpu_freq=550
    over_voltage=2
    core_freq=515
    sdram_freq=533
    over_voltage_sdram=1


    I am running heatsink not that I can imagine it really getting too hot without one just running hyperion.


    Device Resolution: 256x144 @60fps, 8 decimation for games, 2 for Movies


    I also realized something, I have my TV in game mode as the purpose of this project was to use with my ps5 and primarily Destiny 2. With these settings, the low capture resolution and 8 decimation allows things to look near perfect while gaming without smoothing. If I turn the TV into HDR or Movie mode (which causes a delay with the TV processing and adjusting the output it lags just enough to where the LEDs appear to respond perfectly with smoothing enabled)


    If I was only doing this for movies/TV I would have been done screwing with things weeks ago. Too bad games look fantastic with the LEDs as well.


    I'm sure the capture device is the largest culprit of lag here. I noticed lag when I hooked it up to my gaming PC as well, i'm not sure if the $200 Elgato devices can be essentially played on with 0 latency but the cheap $20 one I got definitely cannot be, and this is fine for this as its close enough at this point I think to not bother me.

  • totally get where your coming from on the USB grabber, they are either dirt cheap or expensive and the ones in the middle are questionable to whether they are just a diff case and overpriced :LOL:


    I noticed major lag yesterday on mine after setting it up to TV again, only way for me to resolve it was to reduce the video capture down to 1280x720p and its near perfect, 1080 would be better so it matches screen 100% but its only slightly larger but bearable for the cost of a good device.


    With you having to overclock the Zero to notice a difference - Surely The Zero is one of the biggest culprits, Single Core CPU, 512mb ram - Is that enough hardware to efficiently handle the video capture plus the operating system and that's the reason you are at 256x144px?


    Never had one or tried one but id of thought that it would run a headless or lightweight distro with not much resources left for other things or have i missed out for all these years? :roflmao:


    Youd think the card would handle something higher or at very least 640x480 - try as @TPmodding suggested and run

    Code
    v4l2-ctl --list-formats-ext


  • i agree completely with Davieboy,


    the hardware seems not be capable fully to the challenge of lighting 300 leds on SPI bus fluently and grabber the same time..
    maybe upgrade to a PI3 or 4 is the better choice here, instead of overclocking CPU which doesnt have really much calculating power to begin with.
    (its the same example than putting a Porsche engine in a volkswagen Beetle, its not a race car over night with that modification :LOL::roflmao:)


    i am running a overclocked and boosted PI3b, when i set size decimation to lower than 4 ( when every setting is highest as possible in Hyperion)
    then i can see a noticable difference in reacting of the leds, rendered image to Hyperion is getting behind.. .


    that means that CPU/GPU is at the top of rendering the image to Hyperion.
    So even with my well balanced setup on the PI3b there is a top setting that can't be topped.


    with other words, you are missing some power in CPU.
    i don't think you can solve this problem only with settings in config.txt and Hyperion or a different grabber for that matter.

  • I'd also like to agree to your first reply, paragraph 2 :roflmao::LOL:


    It probably could handle the LED's perfectly but struggling with both, It reminds me of the encoding/burning DVD days, the better the spec the faster it took, maybe slimming down your o/s may help you get a slightly higher resolution but its a big jump from what your currently getting to what you ideally want, esp if your running the PS5 at full 4k you'd want to get it a bit higher.


    As @jeroen warmerdam suggested a Pi3B or Pi4 would be a massive increase and are around the same price, Pi3A had the older quad core and 512mb ram so for the extra £10 the Pi4 would be the better option as you get more hardware for the cash.


    Good Luck

  • I mainly just got the Zero because it was cheap and I had no idea how far the project would actually get. Now that I know I like it I might upgrade but in all honestly I've yet to have any issues with colors. I mean I have 100 LED's and have the resolution over 100, so technically that would be enough to still be accurate right?

Jetzt mitmachen!

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