Shivam Jha created a two-minute video for his app, Orbit OS, entirely using code. No editing software was used. The entire film is built from a single HTML page and a set of functions that define every visual element over time.
How the Film Was Built
The video is one HTML file. It contains all visual elements—TV screen, phone displays, captions, and setup guide—as plain DOM structures. The core function is seek(t), which applies a state to the DOM at a given time t.
The compute(t) function builds a state object for time t. This includes the TV’s position, which screen layer is visible, where the home row’s focus is, which phone screenshot is shown, and how far each caption has risen. The apply() function then writes this state to the DOM.
No CSS transitions or requestAnimationFrame are used. Each frame is determined solely by time. The same input t always produces the same output. This consistency simplifies development and debugging.
Scene Logic and Visual Design
Each scene is defined by a time range.
- At 31.75 seconds, a live TV card appears, as defined by the condition
t >= 31.75. - Between 31.75 and 32.3 seconds, the card opens into the screen, triggered by a linear interpolation of the open state.
- From 33.0 to 36.5 seconds, a setup guide slides in and out, with a defined duration and fade effect.
- After 35.4 seconds, the app name ‘Aastha’ and a zap counter begin to appear, with the zap counter starting at zero and increasing over time.
The launcher interface is a recreation of the real app’s design. Cards are arranged in a cylindrical layout using CSS transforms—specifically, translate3d and rotateY—with each card positioned based on its distance from the focus point. A glow effect uses the focused app’s color, and a streak of light highlights the active card, creating a dynamic visual cue.
Rendering Process
Real app screenshots are captured using Playwright in demo mode. The rendering loop runs through each frame:
- It sets a time value t for each frame.
- It executes
window.seek(t)in the browser context. - It captures a screenshot and saves it as a JPEG file.
At 1080p and 30 fps, the video requires 4,050 frames—about 45 seconds to render on a laptop. At 4K resolution and 60 fps, it expands to 8,100 frames.
The final video is assembled using ffmpeg, with the audio track added separately.
Audio Generation from Code
The soundtrack is not pre-recorded. It is generated by a Python script called score.py, using the numpy library.
Plucked notes use the Karplus-Strong algorithm. Bells use frequency modulation (FM) synthesis. Pads are created from detuned saw waves filtered with a low-pass spectral filter.

Each UI interaction in the film is matched with a precise audio tick at the same timestamp. A noise burst with reverb ties the elements together. A sidechain makes the pad respond to the kick drum. The final mix is normalized to -14 LUFS, meeting YouTube and X platform standards.
Why This Approach Matters
Changes to the film are one-line fixes. For instance, when the developer noticed that in step 3, the phone screen covered the toast, the issue was resolved by adjusting a single CSS left property.
The film stays tightly aligned with the actual app. Screenshots are taken directly from the real app in demo mode. Captions are stored in arrays with precise timing, allowing the film to be reviewed just like a UI design—using still frames and contact sheets at key moments.
The source code for Orbit OS is open-source under GPL-3.0 on GitHub. The app is available for free on Google Play.
Shivam wrote this with the help of an AI pair programmer. The full code is available at the original source.
If you’ve created video from code in a different way, you’re invited to share your experience.
For more on AI-powered app development, see AI Coding Agent Builds Duolingo-Like App in Minutes.
For how user feedback shapes app design, see Offline Blackjack Trainer App Released with Real User Feedback Request.
Sources & further reading
Featured image: original publisher image. Via original publisher. Image source

