ultra-cheap input lag test using a raspberry pi 0

The place for all discussion on gaming hardware
Post Reply
User avatar
xeos
Posts: 167
Joined: Thu Oct 20, 2016 10:38 pm
Location: San Diego, California

ultra-cheap input lag test using a raspberry pi 0

Post by xeos »

For those of you interested in low-lag monitors and/or deinterlacing I've got a cheap solution for measuring the input lag in your setup. It's a raspberry pi (zero). In the US just $5 (plus about that much in shipping, bleh). The idea is to use the Pi to push fames out over HDMI (or composite) and turn on a LED that's built in to the Pi at the same time. Using a camera you can measure the delay between the LED lighting up and the screen responding. The higher speed the camera the better, but 60hz can actually do the job for measuring a 60hz display. And most flagship phones have had higher speed cameras than that for a while - way back on the S7 samsung was offering 240hz, for instance. Meanwhile no soldering or other hardware work is required. This is a pure software solution using the stock raspberry pi zero board that is sold by multiple retailers.

I've validated it against the OSSC's lag testing mod and also against an oscilloscope and the numbers work out to be within 2ms of each other. So if you want to measure the lag of your setup this is a cheap way to do it. Even better, the pi can be powered by a regular microUSB power bank. So you can test any display you can plug HDMI into and record for 1-2 minutes with your camera. I actually think the results are a bit more reliable than the OSSC mod since that uses binary threshold, whereas this is more adaptive to the actual brightness of the measured display. I haven't tested the leo bodnar device or the time sluth, but again I actually think this could be better, if involving a bit more DIY. certainly it's cheaper than any other solution.

you can download the software and read how to use it here:

https://alantechreview.blogspot.com/202 ... berry.html

any questions don't hesitate to contact me. Esp. if it's about lack of clarity in the above link. Also, I'm hoping to start Yet Another Database of Input Lag (tm) to keep track of the results people gather. In particular, this method can measure lag for 480i and 480p, whereas most DBs/review sites just report 1080p.
User avatar
xeos
Posts: 167
Joined: Thu Oct 20, 2016 10:38 pm
Location: San Diego, California

Re: ultra-cheap input lag test using a raspberry pi 0

Post by xeos »

xeos wrote: Also, I'm hoping to start Yet Another Database of Input Lag (tm) to keep track of the results people gather. In particular, this method can measure lag for 480i and 480p, whereas most DBs/review sites just report 1080p.
I just discovered such a db on retrorgb started for the timesleuth (https://www.retrorgb.com/lagtest.html). It's not ideal but has better visibility than starting from scratch. Does anybody have a suggestion of how to contact the admins at retrorgb? email addresses are conspicuously absent.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: ultra-cheap input lag test using a raspberry pi 0

Post by Fudoh »

You can send a PM to Bob here on the board: memberlist.php?mode=viewprofile&u=11629
RGB0b
Posts: 543
Joined: Wed Dec 05, 2012 1:52 pm

Re: ultra-cheap input lag test using a raspberry pi 0

Post by RGB0b »

You should just be able to edit that spreadsheet with a Google account. Also, the wiki will be open soon and that database will be moved over. There's so many community-driven projects that will be moved there and I'm getting excited to see it launch!
User avatar
xeos
Posts: 167
Joined: Thu Oct 20, 2016 10:38 pm
Location: San Diego, California

Re: ultra-cheap input lag test using a raspberry pi 0

Post by xeos »

retrorgb wrote:You should just be able to edit that spreadsheet with a Google account. Also, the wiki will be open soon and that database will be moved over. There's so many community-driven projects that will be moved there and I'm getting excited to see it launch!
Correct! thanks for pointing that out. I wouldn't have guessed that it's even more liberal than wikipedia in accepting edits! I added one of my sets just to make sure I understood. Unfortunately my display tech is all pretty old so it's not of that much use - though - at least for 480i - it actually fairs pretty decently.
User avatar
xeos
Posts: 167
Joined: Thu Oct 20, 2016 10:38 pm
Location: San Diego, California

Re: ultra-cheap input lag test using a raspberry pi 0

Post by xeos »

FYI the PiOS as it's now called keeps on evolving and some of the required libraries are not included any longer. I've fixed this by uploading a complete SD card image you can use to test your display with no additional downloads or configuration. The download link is found on the same page as before: https://alantechreview.blogspot.com/202 ... r-for.html

most of my focus, if you can call it that, is on the custom hardware version of this tool, but if anybody has questions about the free non-hardware version described here let me know and I'll try to help.
Dochartaigh
Posts: 1530
Joined: Thu Mar 02, 2017 6:53 pm

Re: ultra-cheap input lag test using a raspberry pi 0

Post by Dochartaigh »

How does this deal with rolling shutter most digital phones/cameras have? And don't most modern TV's also poll at different rates at different points on the screen? - I guess other testers take the average or something?
User avatar
xeos
Posts: 167
Joined: Thu Oct 20, 2016 10:38 pm
Location: San Diego, California

Re: ultra-cheap input lag test using a raspberry pi 0

Post by xeos »

Dochartaigh wrote:don't most modern TV's also poll at different rates at different points on the screen?
Can you elaborate? There's at least two ways to interpret that statement...
User avatar
SGGG2
Posts: 756
Joined: Thu Dec 31, 2009 1:03 am
Location: East Coast, US

Re: ultra-cheap input lag test using a raspberry pi 0

Post by SGGG2 »

This is great! Prices on Zero’s have gone up, any way this could with work with a Pico?

EDIT: Nevermind, those were W boards I was seeing. Looking forward to trying this! :P
User avatar
xeos
Posts: 167
Joined: Thu Oct 20, 2016 10:38 pm
Location: San Diego, California

Re: ultra-cheap input lag test using a raspberry pi 0

Post by xeos »

SGGG2 wrote:This is great! Prices on Zero’s have gone up, any way this could with work with a Pico?

EDIT: Nevermind, those were W boards I was seeing. Looking forward to trying this! :P
The Pico is an entirely different hardware platform, and although cool and useful for some things, it really shouldn't have the raspberry pi name attached to it, as it's capabilities are much different (lower). In particular, no video out.
User avatar
xeos
Posts: 167
Joined: Thu Oct 20, 2016 10:38 pm
Location: San Diego, California

Re: ultra-cheap input lag test using a raspberry pi 0

Post by xeos »

Dochartaigh wrote:How does this deal with rolling shutter most digital phones/cameras have?
Yes, you need to measure which orientation "rolls", which takes about 5 seconds once you know what's involved. This page walks you through the steps:

https://alantechreview.blogspot.com/202 ... splay.html
Post Reply