frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Reversing YouTube’s “Most Replayed” Graph

https://priyavr.at/blog/reversing-most-replayed/
27•prvt•3h ago
Hi HN,

I recently noticed a recurring visual artifact in the "Most Replayed" heatmap on the YouTube player. The highest peaks were always surrounded by two dips. I got curious about why they were there, so I decided to reverse engineer the feature to find out.

This post documents the deep dive. It starts with a system design recreation, reverse engineering the rendering code, and ends with the mathematics.

This is also my first attempt at writing an interactive article. I would love to hear your thoughts on the investigation and the format.

Comments

plastic041•3h ago
Great article! I've always wondered how youtube implemented it. Love the interactive canvases too. But maybe it's just me, the canvases look blurry?

Rendering bezier curves on the client side seems reasonable. Calculating ~400 points and rendering 100 curves would not impact performance, but I wonder if these little interactions would impact performance if added up.

About YouTube's comment about Gangnam Style, it wasn't a tweet. You can't find the original post because it was google+, which is dead. Google said it was a joke shortly afterwards: https://www.cnet.com/tech/services-and-software/gangnam-styl...

prvt•2h ago
Thanks for reading and for the kind words!

Re: Blurry canvases: You are spotting the classic HTML5 Canvas high-DPI issue. It happens because the canvas backing store pixels don't map 1:1 to CSS pixels on high-density displays (like Retina screens). I likely need to scale the canvas drawing context by window.devicePixelRatio to fix that sharpness. Good catch. EDIT: Made the change.

Re: Performance: That is an interesting thought. Since the calculation only triggers when you visit (or resize) the video player, there is definitely a CPU spike. My guess is they chose this approach to have a "plug and play" rendering logic that adapts perfectly to the client's specific device width and pixel density, rather than generating thousands of static image variations on the server.

Re: Gangnam Style: Ah, Google+! That explains why I couldn't find the original source. Thanks for the correction. EDIT: Added the correction.

albert_e•1h ago
> We are living in the era of the “Bouba” effect.

Is this an invented bit of humor ... or an existing usage applied to the prevalence of rounded corners we see (once again) in User Interfaces of today?

(The original term has nothing to do with web design or UI per se)

https://en.wikipedia.org/wiki/Bouba/kiki_effect

Edit: i see the article goes on to explain the term in context.

But I feel the sharp corners versus round corners is a design/fad cycle that will keep repeating.

We will see sharp corners once again in vogue within the next decade if not sooner.

It will start small with one or two players wanting to distinguish their offering from the crowd, and one of them seeing success, and others copying them slowly at first and then it catches on.

prvt•1h ago
It was definitely a bit of invented humor! I wanted a sticky way to describe that universal drift toward "friendliness" and safety in modern UI.

You are spot on about the cycle, though. I suspect that once everything is perfectly round and polished, the only way to stand out will be to go sharp again.

internetter•19m ago
I found this article pretty interesting because ultimately it didn't cover a lot of ground, but instead examined the ground with a microscope. I was expecting it to be some really complex system youtube was using—and an even more complex attempt to r/e—but really it was mostly intuitive solutions. YET with that being said it was a really enjoyable read because of how in depth everything was covered. I think this article presents a very strong teaching tool, as the best lessons are taught with a strong motivating example to ground in. Kudos to the author. Reminds me a bit of Josh Comeau though arguably better in some regards.

Show HN: Gambit, an open-source agent harness for building reliable AI agents

https://github.com/bolt-foundry/gambit
62•randall•5h ago•11 comments

Show HN: OpenWork – An open-source alternative to Claude Cowork

https://github.com/different-ai/openwork
161•ben_talent•2d ago•30 comments

Show HN: Reversing YouTube’s “Most Replayed” Graph

https://priyavr.at/blog/reversing-most-replayed/
27•prvt•3h ago•5 comments

Show HN: TinyCity – A tiny city SIM for MicroPython (Thumby micro console)

https://github.com/chrisdiana/TinyCity
125•inflam52•15h ago•22 comments

Show HN: Tabstack – Browser infrastructure for AI agents (by Mozilla)

107•MrTravisB•1d ago•20 comments

Show HN: Control Claude permissions using a cloud-based decision table UI

https://github.com/rulebricks/claude-code-guardrails
12•sidgarimella•11h ago•8 comments

Show HN: Sparrow-1 – Audio-native model for human-level turn-taking without ASR

https://www.tavus.io/post/sparrow-1-human-level-conversational-timing-in-real-time-voice
115•code_brian•1d ago•47 comments

Show HN: Tusk Drift – Turn production traffic into API tests

https://github.com/Use-Tusk/tusk-drift-cli
20•jy-tan•10h ago•0 comments

Show HN: The Hessian of tall-skinny networks is easy to invert

https://github.com/a-rahimi/hessian
23•rahimiali•9h ago•21 comments

Show HN: Munimet.ro – ML-based status page for the local subways in SF

https://munimet.ro/
9•MrEricSir•10h ago•0 comments

Show HN: Webctl – Browser automation for agents based on CLI instead of MCP

https://github.com/cosinusalpha/webctl
124•cosinusalpha•1d ago•35 comments

Show HN: An open-source form builder that outputs tailwind components

https://tailwind-form-builder.sheetmonkey.io/
2•a_band•3h ago•0 comments

Show HN: ContextFort – Visibility and controls for browser agents

https://contextfort.ai/
12•ashwinr2002•1d ago•1 comments

Show HN: Voice Composer – Browser-based pitch detection to MIDI/strudel/tidal

https://dioptre.github.io/tidal/
29•dioptre•4d ago•6 comments

Show HN: Tiny FOSS Compass and Navigation App (<2MB)

https://github.com/CompassMB/MBCompass
131•nativeforks•1d ago•45 comments

Show HN: Ghostty Ambient – Terminal theme switcher that learns your preferences

https://github.com/gezibash/ghostty-ambient
2•zimzima•7h ago•1 comments

Show HN: HyTags – HTML as a Programming Language

https://hytags.org
67•lassejansen•2d ago•32 comments

Show HN: Beni AI – Real-time face-to-face AI companion

https://thebeni.ai/
5•chaeeunlee9611•1d ago•0 comments

Show HN: A 10KiB kernel for cloud apps

https://github.com/ReturnInfinity/BareMetal-Cloud
66•ianseyler•1d ago•11 comments

Show HN: GoGen – A simple template-based file generator written in Go

https://github.com/zaheershaikh936/gogen
2•zaheer9360•9h ago•1 comments

Show HN: Xoscript

https://xoscript.com/history.xo
53•gabordemooij•1d ago•43 comments

Show HN: Digital Carrot – Block social media with programmable rules and goals

https://www.digitalcarrot.app/
38•newswangerd•1d ago•11 comments

Show HN: I spent 10k hours building the perfect language learning app

https://phrasing.app/
4•barrell•14h ago•2 comments

Show HN: OSS AI agent that indexes and searches the Epstein files

https://epstein.trynia.ai/
205•jellyotsiro•2d ago•95 comments

Show HN: Nogic – VS Code extension that visualizes your codebase as a graph

https://marketplace.visualstudio.com/items?itemName=Nogic.nogic
128•davelradindra•2d ago•50 comments

Show HN: An iOS budget app I've been maintaining since 2011

https://primoco.me/en/
158•Priotecs•2d ago•59 comments

Show HN: 1D-Pong Game at 39C3

https://github.com/ogermer/1d-pong
67•oger•4d ago•13 comments

Show HN: A fast CLI and MCP server for managing Lambda cloud GPU instances

https://github.com/Strand-AI/lambda-cli
23•odedfalik•1d ago•2 comments

Show HN: The Tsonic Programming Language

https://tsonic.org
60•jeswin•2d ago•9 comments

Show HN: I built an 11MB offline PDF editor because mobile Acrobat is 500MB

https://revpdf.com/
7•pawandeepsingh•10h ago•1 comments