frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

We Built a Video Rendering Engine by Lying to the Browser About What Time It Is

https://blog.replit.com/browsers-dont-want-to-be-cameras
43•darshkpatel•2d ago

Comments

d--b•1h ago
This is super smart but doesn't seem very future-proof...
amelius•1h ago
> The core issue is that browsers are real-time systems. They render frames when they can, skip frames under load, and tie animations to wall-clock time. If your screenshot takes 200ms but your animation expects 16ms frames, you get a stuttery, unwatchable mess.

But by faking the performance of your webpage, maybe you are lying to your potential users too?

ErroneousBosh•1h ago
> But by faking the performance of your webpage, maybe you are lying to your potential users too?

I think you're missing the point of it a little. The "user" is someone who wants to watch a rendered video of the brower's display, but if it takes longer than one frame (where you read the word frame in this comment, think of a frame of video or film, not a browser "frame" like people used to make broken menus with) to actually draw the visual the browser will skip it.

Instead this appears to just tell the browser it's got plenty of time, keep drawing, and then capture the output when it's done.

It's not too different to how you'd do for example stop motion animation - you'd take a few minutes to pose each figure and set up the scene, trip the shutter, take a few more minutes to pose each figure for the next part of each movement, trip the shutter again, and so on. Say it took five minutes to set up and shoot each frame then one second of film would take an hour of solid work (assuming 12 frames per second, or "shooting on twos").

It's just saying "take all the time you want, show me it when it's done" and then worrying about making it into smooth video after the work is done.

SiempreViernes•33m ago
> The "user" is someone who wants to watch a rendered video of the brower's display

While such a person might indeed exist, I think the more common situation is a vendor showing a demo of how a website might work. In that situation the consumer wants a realistic depiction of someone interacting with the site. Though of course for the user of the video service it might be very useful if the video hides all manner of performance issues.

chmod775•1h ago
I've done similar shenanigans before. That main loop is probably simplified? It won't work well with anything that uses timing primitives for debouncing (massively slowing such code down, only progressing with each frame). Also a setInterval with, say 5ms may not "look" the same when it's always 1000/fps milliseconds later instead (if you're capturing at 24fps/30fps, that would be a huge difference).

What you should do is put everything that was scheduled on a timeline (every setTimeout, setInterval, requestAnimationFrame), then "play" through it until you arrive at the next frame, rather than calling each setTimeout/setInterval callback only for each frame.

Also their main loop will let async code "escape" their control. You want to make sure the microtask queue is drained before actually capturing anything. If you don't care about performance, you can use something like await new Promise(resolve => setTimeout(resolve, 0)) for this (using the real setTimeout) before you capture your frame. Use the MessageChannel trick if you want to avoid the delay this causes.

For correctness you should also make sure to drain the queue before calling each of the setTimeout/setInterval callbacks.

I'm leaning towards that code being simplified, since they'd probably have noticed the breakage this causes. Or maybe, given that this is their business, their whole solution is vibe-coded and they have no idea why it's sometimes acting strange. Anyone taking bets?

echoangle•1h ago
Crazy that this approach seems to be the preferred way to do it. How hard would it be to implement the recording in the browser engine? There you could do it perfectly, right?
medi8r•35m ago
You can screen share from browser so surely that API?
SiempreViernes•32m ago
The purpose seems to be flashy demo videos to sell web-based tools, so rendering unrealistically smooth interactions is sort of the point.
xnx•1h ago
Mentioned at the very end that this is based on https://github.com/Vinlic/WebVideoCreator
soulofmischief•28m ago
This post smells of LLM throughout. Not just the structure (many headings, bullet lists), but the phrasing as well. A few obvious examples:

- no special framework. No library buy-in. Just a URL

- Advance clock. Fire callbacks. Capture. Repeat. Every frame is deterministic, every time.

- We render dozens of frames that nobody will ever see, just to keep Chrome's compositor from going stale.

- The fundamental insight that you could monkey-patch browser time APIs and combine that with Chrome's deterministic rendering mode to capture arbitrary web pages frame-by-frame is genuinely clever

- Where we diverged

The whole post is like this, but these examples stand out immediately. We haven't quite collectively put a name on this style of writing yet, but anyone who uses these tools daily knows how to spot it immediately.

I'm okay with using LLMs as editors and even drafters, but it's a sign of laziness and carelessness when your entire post feels written by an LLM and the voice isn't your own.

It feels inauthentic and companies like replit should consider the impact on their brand before just letting people write these kind of phoned-in blog posts. Especially after the catastrophe that was the Cloudflare Matrix incident (which they later "edited" and never owned up to).

And the lede is buried at the very end: This is just a vibe-coded modification of https://github.com/Vinlic/WebVideoCreator, and instead of making their changes open source since they're "standing on the shoulders of giants", the modifications are now proprietary.

In the end, being an AI company is no excuse for bad writing.

lccerina•10m ago
Their whole product is about vibe-coding unmaintainable "apps", not surprised they put the same level of (dis)attention in their blog too.

Also yikes for the proprietary modifications. AI companies: "what's yours is mine, and what's mine is mine only"

andrewstuart•25m ago
I did this a few years ago. The approach these guys are taking is kinda hacky compared to other better ways - and I've tried most of them.

It works but only in a limited way there's lots of problems and caveats that come up.

I dropped it in the end partly because of all the problems and edge cases, partly because its a solution looking for a problem an AI essentially wipes out any demand for generating video in browsers.

I ended up writing code that modified chromium and grabbed the frames directly from deep in the heartof the rendering system.

It was a big technical challenge and a lot of fun but as I say, fairly pointless.

And there are other solutions that are arguably better - like recording video with OBS / the GPU nvenc engine / with a hardware video capture dongle and there's other ways too that are purely software in Linux that work extremely well.

You can see some of the results I got from my work here:

https://www.youtube.com/watch?v=1Tac2EvogjE

https://www.youtube.com/watch?v=ZwqMdi-oMoo

https://www.youtube.com/watch?v=6GXts_yNl6s

https://www.youtube.com/watch?v=KzFngReJ4ZI

https://www.youtube.com/watch?v=LA6VWZcDANk

In the end if you want to capture browser video - use OBS or ffmpeg with nvenc or something - all the fancy footwork isn’t needed.

andrewstuart•9m ago
Here you go, capture browser video for $100……

https://www.amazon.com.au/AVerMedia-Streaming-Passthrough-Re...

Or use ffmpeg with nvenc it allows simultaneous capture of 12 sessions.

Toss away all the hard work futzing with the browser just put in one ffmpeg command.

pjc50•4m ago
"Use OBS" is one approach that definitely works. If you run the browser inside OBS it also disables hardware acceleration, which may cause some issues but has the advantage of turning DRM support off.
andrewstuart•2m ago
No it doesn’t.

Meta’s AI smart glasses and data privacy concerns

https://www.svd.se/a/K8nrV4/metas-ai-smart-glasses-and-data-privacy-concerns-workers-say-we-see-e...
1112•sandbach•12h ago•637 comments

Arm's Cortex X925: Reaching Desktop Performance

https://chipsandcheese.com/p/arms-cortex-x925-reaching-desktop
89•ingve•3h ago•27 comments

British Columbia is permanently adopting daylight time

https://www.cbc.ca/news/canada/british-columbia/b-c-adopting-year-round-daylight-time-9.7111657
846•ireflect•14h ago•420 comments

Ars Technica fires reporter after AI controversy involving fabricated quotes

https://futurism.com/artificial-intelligence/ars-technica-fires-reporter-ai-quotes
307•danso•9h ago•181 comments

We Built a Video Rendering Engine by Lying to the Browser About What Time It Is

https://blog.replit.com/browsers-dont-want-to-be-cameras
43•darshkpatel•2d ago•17 comments

Simple screw counter

https://mitxela.com/projects/screwcounter
148•jk_tech•2d ago•38 comments

Show HN: I built a sub-500ms latency voice agent from scratch

https://www.ntik.me/posts/voice-agent
425•nicktikhonov•13h ago•124 comments

I built a pint-sized Macintosh

https://www.jeffgeerling.com/blog/2026/pint-sized-macintosh-pico-micro-mac/
38•ingve•3h ago•10 comments

Buckle Up for Bumpier Skies

https://www.newyorker.com/magazine/2026/03/09/buckle-up-for-bumpier-skies
42•littlexsparkee•5h ago•16 comments

DOS Memory Management

https://www.os2museum.com/wp/dos-memory-management/
51•ingve•2d ago•7 comments

Physicists developing a quantum computer that’s entirely open source

https://physics.aps.org/articles/v19/24
120•tzury•11h ago•24 comments

First in-utero stem cell therapy for fetal spina bifida repair is safe: study

https://health.ucdavis.edu/news/headlines/first-ever-in-utero-stem-cell-therapy-for-fetal-spina-b...
306•gmays•20h ago•55 comments

New iPad Air, powered by M4

https://www.apple.com/newsroom/2026/03/apple-introduces-the-new-ipad-air-powered-by-m4/
402•Garbage•20h ago•629 comments

Guilty Displeasures

https://www.hopefulmons.com/p/what-are-your-guilty-displeasures
80•aregue•2d ago•80 comments

Guido van Rossum Interviews Thomas Wouters (Python Core Dev)

https://gvanrossum.github.io/interviews/Thomas.html
46•azhenley•1d ago•3 comments

Launch HN: OctaPulse (YC W26) – Robotics and computer vision for fish farming

101•rohxnsxngh•18h ago•34 comments

Motorola announces a partnership with GrapheneOS

https://motorolanews.com/motorola-three-new-b2b-solutions-at-mwc-2026/
2210•km•1d ago•807 comments

Seed of Might Color Correction Process (2023) [pdf]

https://andrewvanner.github.io/som/SoM_CC_Process_Day.pdf
91•haunter•12h ago•23 comments

iPhone 17e

https://www.apple.com/newsroom/2026/03/apple-introduces-iphone-17e/
287•meetpateltech•20h ago•416 comments

Privacy-preserving age and identity verification via anonymous credentials

https://blog.cryptographyengineering.com/2026/03/02/anonymous-credentials-an-illustrated-primer/
4•FrasiertheLion•1h ago•2 comments

Inside the M4 Apple Neural Engine, Part 1: Reverse Engineering

https://maderix.substack.com/p/inside-the-m4-apple-neural-engine
346•zdw•1d ago•96 comments

The Cathode Ray Tube site

https://www.crtsite.com/didactic-crt.html
51•joebig•2d ago•9 comments

Elevated Errors in Claude.ai

https://status.claude.com/incidents/yf48hzysrvl5
155•LostMyLogin•7h ago•131 comments

Show HN: Govbase – Follow a bill from source text to news bias to social posts

https://govbase.com
194•foxfoxx•17h ago•76 comments

Ask HN: Who is hiring? (March 2026)

217•whoishiring•18h ago•261 comments

Programmable Cryptography (2024)

https://0xparc.org/writings/programmable-cryptography-1
74•fi-le•2d ago•41 comments

Plugtest

https://en.wikipedia.org/wiki/Plugtest
11•dhorthy•2d ago•3 comments

AWS outage due to drone attacks in UAE

https://www.bbc.com/news/articles/cgk28nj0lrjo
3•stellastah•2h ago•0 comments

Against Query Based Compilers

https://matklad.github.io/2026/02/25/against-query-based-compilers.html
69•surprisetalk•1d ago•37 comments

RCade: Building a Community Arcade Cabinet

https://www.frankchiarulli.com/blog/building-the-rcade/
84•evakhoury•4d ago•14 comments