News · New this week
Bat Speed: cricket bat speed from one phone video
Day 14 of the build series. Film one swing, enter your bat's length, tap four points, and get a speed estimate in km/h.
Everyone in your gully claims they hit the hardest. Bat Speed puts a number on it. It estimates how fast a cricket bat moves from a single side-on phone video, and the swing in the reel read 32 km/h.
It's Day 14 of a series where a spinner picks an app each week and I get one hour to build it with Claude. This week's pick was a bat speed meter.
The bat is the ruler
A phone video has no sense of scale. The app needs something in the frame with a known size, and the bat is the obvious candidate. You film one swing from the side and tell the app how long your bat is. In the reel I used a kids' bat, 72 cm.
From there you tap the top of the handle and the tip of the bat on one frame. Then you skip ahead two frames and tap them again. Those four taps give the app the bat's apparent length in pixels, and how far it moved between the two frames.
From taps to km/h
The app finds the sweet spot, the part of the bat that hits the ball. It works out how far that point travelled, using the bat's known length to convert pixels into centimetres. Then it divides by the time between the two frames.
In the reel, the sweet spot moved 30 cm in 1/30 of a second. That's 9 m/s, which is 32 km/h.
The whole method is a distance and a time. Once the bat gives you the distance and the video gives you the time, the rest is division.
The bug that read 130
The first run of the same swing said 130. That's four times too high, and the cause was the time side of the division.
The app assumed every video was 240 fps slow-mo. This clip was 60 fps. With the frame rate wrong, the time between frames came out four times too short, so the speed came out four times too big.
The fix was to stop assuming. The app now reads the frame rate from the video file.
If you build anything that turns video frames into a physical measurement, check where the frame rate comes from. A hardcoded default will look fine until you feed it a clip from a different camera mode.
Where the estimate falls short
The test clip isn't fully side-on. It was filmed a bit from the front, so the bat's movement across the frame is smaller than its real movement, and the real speed is slightly higher than 32 km/h.
So treat the output as an estimate from one phone video. Camera angle matters, and the closer you get to a true side-on view, the better the number should be.
What to try
Film a swing from directly side-on, at a frame rate you can confirm, and use the bat's real length. If you want the app, comment BAT on the reel and I'll DM it to you. Then send it to the friend who swears he bats like Pandya.



