@Scale
Eliminating redundant keyframe decoding cuts mobile 4K timeline lag tenfold, while autonomous AI agents take over low-level debugging to shift software engineers into supervisory roles.
AI-assisted summary of Chasing a Moving Target: Going AI-Native on Edits' Video Seek Engine | Boris Baracaldo from Meta — original source. Check the original for full context.
Source published:
Key ideas
- Meta's Edits playback engine achieved a 10x improvement in seek latency, frame rendering rate, and time-to-first-frame across multi-track 4K timelines by decoupling UI touches from decoder execution and eliminating redundant intra-GOP decoding. (12:54)
- Seeking backwards requires specialized convergence handling because decoding advances forward from keyframes while the finger moves backward toward them, risking visual flickering if frames crossing the finger boundary are rendered prematurely. (12:54)
- Meta addresses the combinatorial explosion of timeline editing permutations by using AI agents to generate deterministic test media, automated ADB gesture suites, and pixel-level validators rather than relying on LLMs for subjective code-level decisions. (23:12)
- The long-term development lifecycle transitions human engineers from being 'in the loop' to 'on the loop,' shifting developers into supervisory roles while autonomous agents handle telemetry bisection, patch generation, and experiment rollout cleanup. (27:22)
Detailed notes
## Background Published on YouTube by @Scale on October 30, 2026, this presentation features Meta Android engineer Boris Baracaldo breaking down the video seek engine powering Meta's mobile editing app, Edits. No additional show notes or description were provided on the original video page.
## TL;DR Boris Baracaldo explains the technical challenges of delivering fluid, real-time scrubbing across multi-track 4K timelines on resource-constrained mobile hardware for Meta's Edits app. He walks through architectural solutions to bypass redundant decoding cycles within Groups of Pictures (GOPs) and eliminate visual flickering during backward seeks, unlocking a 10x performance leap. To manage the combinatorial explosion of timeline variables and continuous feature growth, he details Meta's shift toward an AI-native engineering loop. In this setup, autonomous agents leverage deterministic test harnesses and sliced telemetry analysis to build and diagnose features, shifting software engineers from operating directly in the loop to governing supervisory gates on the loop.
## Atmosphere & style The presentation carries the measured, pragmatic cadence of an experienced systems engineer methodically unpacking low-level hardware constraints and decoding mechanics. Baracaldo grounds the discussion in concrete engineering realities rather than speculative AI hype, conveying genuine technical satisfaction when explaining counterintuitive solutions like opposing-direction seek convergence. The pacing feels rigorous and insider-focused, creating an intellectual arc that transitions smoothly from deep codec-level troubleshooting to an architectural vision for autonomous developer tooling.
## Bulletin - [12:54](https://www.youtube.com/watch?v=hAurRPc3A10&t=774s) Meta's Edits playback engine achieved a 10x improvement in seek latency, frame rendering rate, and time-to-first-frame across multi-track 4K timelines by decoupling UI touches from decoder execution and eliminating redundant intra-GOP decoding. - [12:54](https://www.youtube.com/watch?v=hAurRPc3A10&t=774s) Seeking backwards requires specialized convergence handling because decoding advances forward from keyframes while the finger moves backward toward them, risking visual flickering if frames crossing the finger boundary are rendered prematurely. - [23:12](https://www.youtube.com/watch?v=hAurRPc3A10&t=1392s) Meta addresses the combinatorial explosion of timeline editing permutations by using AI agents to generate deterministic test media, automated ADB gesture suites, and pixel-level validators rather than relying on LLMs for subjective code-level decisions. - [27:22](https://www.youtube.com/watch?v=hAurRPc3A10&t=1642s) The long-term development lifecycle transitions human engineers from being 'in the loop' to 'on the loop,' shifting developers into supervisory roles while autonomous agents handle telemetry bisection, patch generation, and experiment rollout cleanup.
## Key takeaways - [00:01](https://www.youtube.com/watch?v=hAurRPc3A10&t=1s) Mobile editing expectations evolved from basic Instagram Stories filters in 2016 to multi-track 4K video manipulation on smartphones with the launch of Meta Edits in 2025. - [01:22](https://www.youtube.com/watch?v=hAurRPc3A10&t=82s) Video scrubbing performance cannot be solved merely by speeding up existing algorithms; the engine must fundamentally eliminate redundant decoding work under mobile hardware constraints. - [03:13](https://www.youtube.com/watch?v=hAurRPc3A10&t=193s) Because delta frames require sequential decoding starting from an I-frame, arbitrary seeking computational cost scales directly with the distance between keyframes (GOP length). - [06:14](https://www.youtube.com/watch?v=hAurRPc3A10&t=374s) Pre-indexing keyframe presentation timestamps during asset import enables the engine to bypass full keyframe resets when a new seek request falls within the active GOP. - [09:25](https://www.youtube.com/watch?v=hAurRPc3A10&t=565s) Decoupling the UI touch event listener from the blocking worker decode thread prevents stale frames from queueing up and degrading perceived responsiveness. - [11:18](https://www.youtube.com/watch?v=hAurRPc3A10&t=678s) Forward seeking maximizes perceived fluidity by interrupting stale decode passes and rendering newly encountered keyframes immediately as intermediate visual progress. - [12:54](https://www.youtube.com/watch?v=hAurRPc3A10&t=774s) Backward scrubbing forces the decoder to fight standard container formats, requiring the engine to wait until forward decoding crosses the finger's backward position to avoid visual flickering. - [12:54](https://www.youtube.com/watch?v=hAurRPc3A10&t=774s) Testing with three overlapping 4K video tracks validated a 10x gain in average seek time, frame rendering rate, and initial frame display latency. - [16:33](https://www.youtube.com/watch?v=hAurRPc3A10&t=993s) The combinatorial explosion of track counts, resolutions, effect stacks, and scrub velocities makes it impossible for human engineers to manually explore the entire optimization problem space. - [18:22](https://www.youtube.com/watch?v=hAurRPc3A10&t=1102s) Global metric averages mask critical performance regressions; observation agents equipped with domain knowledge are required to isolate issues in hyper-specific slices. - [22:29](https://www.youtube.com/watch?v=hAurRPc3A10&t=1349s) Effective agentic workflows require human architectural intent to be translated into rigid, deterministic artifacts and executable tests that return binary pass/fail statuses. - [23:12](https://www.youtube.com/watch?v=hAurRPc3A10&t=1392s) Because LLMs are inherently stochastic, engineering teams should use them to generate deterministic tooling, test assets via FFmpeg, and ADB gesture harnesses rather than making dynamic operational choices. - [26:33](https://www.youtube.com/watch?v=hAurRPc3A10&t=1593s) Removing human-style judgment from deterministic tasks allows LLMs to focus their reasoning power on exploring code diffs to turn red test suites green. - [27:22](https://www.youtube.com/watch?v=hAurRPc3A10&t=1642s) Autonomous engineering workflows shift human developers from being 'in the loop' to 'on the loop,' retaining governance over prioritization while agents manage bisections, PR diffs, and cleanup. - [29:02](https://www.youtube.com/watch?v=hAurRPc3A10&t=1742s) The ultimate engineering benchmark for a mobile video seek engine is complete invisibility to the creator, ensuring the timeline simply reacts instantly to touch.
## Detailed walkthrough ### [00:01](https://www.youtube.com/watch?v=hAurRPc3A10&t=1s) The Evolution of In-App Editing and the Launch of Edits
Back in 2016, Instagram had just released Stories. At that point, editing a video directly inside the app was basic: a user might stitch together a few clips, slap on some text or a simple filter, and finalize everything without ever leaving Instagram. By 2020, short-form video exploded globally with the rollout of Reels, turning daily video recording and editing into a mainstream habit. By 2022, serious creators had outgrown these lightweight, built-in editors and transitioned to specialized third-party desktop and mobile software to produce polished, high-production content.
To meet this creator demand, Meta entered the dedicated mobile editing space in 2025 by announcing Edits, an app tailored for professional-grade video creation directly on mobile hardware. Four months after its announcement, Edits officially launched. The app arrived equipped with support for 4K video playback, overlapping video and audio tracks, splitting, trimming, and an extensive catalog of creative effects. The overarching objective was to package professional video editing capabilities into an interface simple enough to manipulate with just a thumb on a smartphone screen, helping creators translate their artistic vision into content capable of reaching billions.
- In 2016, Instagram Stories offered basic in-app video composition (clips, text, filters). - The 2020 boom driven by Reels made daily short-form video creation ubiquitous. - By 2022, high-end creators migrated toward dedicated external editing suites. - In 2025, Meta announced and subsequently shipped Edits, supporting 4K resolution, multi-track audio/video layering, and non-linear editing tools.
---
[01:22](https://www.youtube.com/watch?v=hAurRPc3A10&t=82s) The Performance Challenge of Video Scrubbing
Boris Baracaldo, an Android engineer working on the shared playback engine behind Instagram Reels, Stories, and the Edits app, spent the prior year laser-focused on optimizing a single core interaction: timeline scrubbing. The goal is keeping frame rendering fast, continuous, and completely synchronized with the user's touch as their finger glides across the composition. While dragging a finger along a timeline feels intuitive and seamless to an end user, the underlying media engine must perform an immense amount of work. Under the hood, scrubbing translates into a rapid cascade of seek requests, each requiring the demuxing, decoding, and pixel rendering of individual video frames onto the mobile display.
The fundamental engineering obstacle is mobile hardware constraints colliding with heavy computational workloads. Decoding costs scale aggressively with resolution: decoding a single 4K frame demands roughly four times the computational power required for a 1080p frame. When a timeline incorporates multiple overlapping tracks, these costs compound multiplicatively, generating an order-of-magnitude increase in required device workloads. When comparing a single 1080p video track side-by-side against three overlapping 4K video tracks, the single track keeps pace smoothly, while the multi-track 4K composition exhibits severe, visible lag as the player struggles to follow the finger. Confronting this challenge requires a fundamental architectural shift. As Baracaldo points out: “Closing a gap of more than 10 times the work. It's not a matter of tuning the algorithm. The algorithm has to do less work, not the same work faster.”
```mermaid flowchart TD accTitle: Video Demuxing and Decoding Pipeline accDescr: Pipeline showing how container metadata and frame data pass through the demuxer and decoder to render pixels.
subgraph Container["MP4 Container"] Meta["Metadata (Resolution, Duration, Keyframe Map)"] RawData["Frame Bitstream Data"] end
subgraph Engine["Playback Engine"] Demux["Demuxer (Extracts Frame Bytes)"] Decode["Decoder (Turns Bytes into Pixels)"] end
Display["Rendered Screen Pixels"]
Meta -.->|"Offsets & GOP structure"| Demux RawData --> Demux Demux --> Decode Decode --> Display ```
---
[03:13](https://www.youtube.com/watch?v=hAurRPc3A10&t=193s) Video Container Architecture and GOP Constraints
To find opportunities to eliminate redundant work, the engine must exploit how video is encoded and stored inside media containers like MP4 files. An MP4 file consists of two primary elements: 1. **Metadata**: Contains fundamental stream properties including display resolution, duration, framerate, and a structural index mapping every keyframe's location throughout the timeline. 2. **Bitstream Data**: Contains the compressed byte payload for every individual frame.
Processing this payload relies on two software components: the demuxer, which unpacks the container to extract raw frame bytes, and the decoder, which converts those compressed bytes into raw displayable pixels.
Visualizing a video track as a traditional physical film strip reveals why seeking is computationally expensive. Video compression algorithms do not store every frame as a standalone image. Instead, they rely on keyframes (I-frames), which store a complete visual representation of an image. The vast majority of remaining frames hold only partial, delta-encoded visual data relative to neighboring frames, a compression strategy designed to drastically lower file sizes. Because delta frames cannot be decoded in isolation, a video decoder can only initiate decoding from a keyframe. Decoding any arbitrary target frame requires sequentially decoding all intermediate delta frames starting from the preceding keyframe, meaning that the computational cost of a single seek operation scales directly with the length of the Group of Pictures (GOP)—the distance between two successive keyframes.
The presentation structure outlines four core stages for addressing this seek engine performance bottleneck: 1. Optimizing an individual seek request by eliminating redundant decoding work within a GOP. 2. Handling a dynamic stream of seek requests while scrubbing to sustain perceived fluidity. 3. Managing the multi-dimensional complexity explosion using integrated AI technology. 4. Leveraging AI to reduce the human maintenance cost of complex video infrastructure.
---
[06:14](https://www.youtube.com/watch?v=hAurRPc3A10&t=374s) Optimizing Single Seek Requests via In-GOP Forward Decoding
In a naive video player architecture, receiving a seek request triggers an automated fallback: the engine inspects the container metadata, jumps back to the nearest keyframe preceding the target timestamp, and sequentially decodes every intermediate frame until reaching the destination. While this guarantees accurate reconstruction, it wastes significant processing cycles. Because intermediate frames decoded along the way are discarded rather than rendered, jumping backward to a keyframe when the playhead is already ahead of it forces the engine to decode the exact same frames twice.
```mermaid flowchart TD accTitle: Single Seek Decision Flow accDescr: Logic to determine whether to skip keyframe jumping if the target lies within the active GOP.
Req["Incoming Seek Request"] --> Check{"Is target in current GOP?"} Check -- "No (Different GOP)" --> Jump["Jump to Preceding Keyframe"] Jump --> DecodeSeq["Decode Linearly Forward to Target"] Check -- "Yes (Same GOP)" --> SkipJump["Skip Keyframe Jump"] SkipJump --> DecodeFromCurrent["Decode Forward from Current Position"] DecodeSeq --> Render["Render Target Frame Pixels"] DecodeFromCurrent --> Render ```
To eliminate this waste, the player must evaluate a specific question on every incoming seek request: *Is the requested timestamp within the same Group of Pictures (GOP) as the player's current position?* If the target timestamp is within the active GOP and lies ahead of the current position, the engine can completely bypass the keyframe jump, continuing forward decoding directly from its current position to the target.
Executing this logic on Android is difficult due to the limitations of platform primitives. The native Android OS `MediaExtractor` API is designed around simple linear media playback: it exposes methods to jump directly to a keyframe, step forward by one frame, and query metadata for that active frame, but it hides the container's underlying keyframe distribution table. As Baracaldo explains: “And this sounds obvious enough but with the primitives exposed by the Android OS and the media extractor APIs this is not so simple because we cannot observe the full structure of the key frames without red coding those that information from the file itself.”
Rather than rewriting a low-level demuxer from scratch, the team built a lightweight indexing mechanism using the existing Android extraction primitives: - At asset import time, the engine traverses the media file once by executing successive keyframe-only jumps. - During this single traversal, the engine logs the exact presentation timestamp (PTS) of every keyframe into an in-memory index table. - When live seek requests arrive during user scrubbing, the engine queries this timestamp map to determine whether the target frame shares the current GOP, bypassing keyframe resets whenever safe.
---
[09:25](https://www.youtube.com/watch?v=hAurRPc3A10&t=565s) Handling Moving Targets and Decoupling UI from Decoder Execution
Optimizing a single isolated seek request is insufficient for dynamic scrubbing because user interaction turns seek targets into moving targets. While the player is busy decoding toward a specific frame, the user's thumb is actively moving across the screen, potentially crossing multiple GOP boundaries. By the time the decoder completes work for a requested frame, that frame may already be completely obsolete.
Android captures timeline touches as a continuous sequence of discrete seek events dispatched along the main UI thread. For instance, an aggressive fling across a timeline from frame 0 to frame 1,000 generates intermediate requests dispatched at intervals such as 100, 300, 500, and beyond. The player architecture decouples this interaction across two distinct threads: 1. **The UI Thread / Request Listener**: Monitors touch input and captures incoming seek targets from UI interactions. 2. **The Worker / Decoder Thread**: Performs blocking, computationally heavy I/O operations—specifically demuxing container data, parsing bitstreams, and running hardware decoder pipelines.
```mermaid flowchart LR accTitle: Dual-Thread Seek Request Architecture accDescr: Architecture showing asynchronous decoupling between UI touch input requests and blocking decode operations.
subgraph UI_Thread["UI Thread"] Touch["User Scrub Gesture"] --> Queue["Dispatched Seek Requests (100, 300, 500...)"] end
subgraph Worker_Thread["Worker Thread (Blocking)"] Worker["Seek Engine Controller"] Pipeline["Demuxing & Hardware Decoding"] Worker <--> Pipeline end
Queue -->|"Async Events"| Worker Worker -.->|"Interrupt & Drop Stale Frames"| Pipeline ```
Because the worker thread performs blocking operations that take tangible time, intermediate UI requests rapidly pile up. If the decoder blindly fulfills every request in sequential order, it wastes CPU and GPU cycles decoding stale frames that the user has already scrubbed past. Furthermore, user scrubbing behavior is unpredictable: a user may rapidly drag forward, pause, fling toward the end of the video, or immediately scrub backward. To maintain low latency and responsive visual feedback, the engine needs active interruption levers, halting decoding operations the moment a newer seek request renders the ongoing decode pass stale.
[11:18](https://www.youtube.com/watch?v=hAurRPc3A10&t=678s) Forward Seeking Logic and the Challenge of Backward Seeking
To optimize seeking, the engine relies on two primary levers: aborting stale work when the seek direction changes so it avoids decoding forward unnecessarily, and rendering as often as possible to refresh pixels on screen whenever progress can be displayed. Outlining the step-by-step logic, Boris Baracaldo explains that when a new seek request arrives, the engine interrupts ongoing work and renders immediately to show visual progress. It then checks whether the new request falls within the same group of pictures (GOP) as the frame just decoded. If it does, the decoder does not jump to a keyframe; if it does not, jumping is unavoidable. However, whenever a keyframe jump occurs, the engine renders that keyframe immediately because it represents the most visual progress achievable per unit of time. From there, it decodes linearly until reaching the target, only rendering at the exact final position if no intervening requests arrive.
```mermaid flowchart TD accTitle: Seek Request Processing Flow accDescr: Flowchart showing decision logic when a seek request arrives, GOP matching, keyframe jumps, and rendering logic. A["Seek request arrives"] --> B["Interrupt & render progress"] B --> C{"Same GOP as last decoded frame?"} C -->|"Yes"| D["Decode linearly forward"] C -->|"No"| E["Jump to GOP keyframe"] E --> F["Render keyframe immediately"] F --> D D --> G{"New request interrupted?"} G -->|"No"| H["Render final target frame"] G -->|"Yes"| A ```
While linear decoding and keyframe jumping work smoothly for forward seeking, backward scrubbing directly clashes with video compression standards. As Baracaldo points out: “Now, this is great for forward seeking. That's what the format is built for. However, if you want to seek backwards and you want to start scrubbing towards the start of the video, then we start fighting the format because we need to jump to the key frame.” Even if the user drags their finger to a timestamp just slightly behind the current frame, the engine must jump all the way back to the keyframe at the start of that GOP and sequentially decode every intervening frame. In media where GOP intervals span up to five seconds, that forces the decoder to process dozens or hundreds of frames just to step backward a tiny fraction of a second.
[12:54](https://www.youtube.com/watch?v=hAurRPc3A10&t=774s) Resolving Backward Seeking Flickering and Results
Handling backward gestures requires treating the scrub as a continuous physical operation rather than isolated seek requests. As the user's finger drags backward, it is actually moving closer to the keyframe that the engine has jumped to. When a second seek request interrupts the first, the target shifts to the finger's new position. This sets up an opposing race: the finger moves backward toward the keyframe while the decoder moves forward from the keyframe toward the finger. Baracaldo cautions that if the decoder has not yet crossed the finger's current position at the time of interruption, rendering that decoded frame would overshoot user intent and introduce flickering—flashing a backward frame followed by a forward jump once the finger's position is reached. The decoder must continue advancing forward until it crosses the boundary of the finger's position. Only then can it safely render and restart the cycle, ensuring monotonic visual progression without visual stutter.
```mermaid flowchart LR accTitle: Opposing Direction Seeking Convergence accDescr: Illustration of keyframe jump decoding moving forward while the finger scrubs backward toward the keyframe. subgraph Stream["GOP Timeline"] KF["Keyframe (Start)"] -->|"Decoding forward"| DF["Decoded Frame"] DF -.->|"Must cross boundary"| FP["Finger Position"] FP -->|"Scrubbing backward"| KF end ```
Combining these optimizations yielded a dramatic performance leap when tested locally on heavy compositions featuring three overlapping 4K video tracks: - **10x improvement** in average seek time. - **10x improvement** in frame rendering rate. - **10x improvement** in time to render the first frame.
Reflecting on these gains, Baracaldo highlights two core takeaways. First, scrubbing is not about hitting an exact seek timestamp instantly; “It's about the perceived performance doing a continuous gesture. So it's physically impossible for us to show every single frame when the user is scrubbing. So the target for us is choosing exactly which frames are actually worth the most to render into the screen.” Second, standard video container formats are engineered for continuous linear playback, not arbitrary scrubbing. To solve this at the root, the team has begun generating proxy media featuring optimized GOP sizes and downscaled resolutions matched to phone screens to streamline previewing and seeking.
[16:33](https://www.youtube.com/watch?v=hAurRPc3A10&t=993s) The Combinatorial Complexity of Video Scrubbing
Despite the performance wins, Baracaldo stresses that video editing engines demand constant upkeep as product teams add layered compositions, multiple video and audio tracks, and real-time AI effects. Shipping an optimization from initial observation to release is costly, prompting the team to investigate agentic workflows to scale development. The difficulty lies in the sheer combinatorial explosion of scrubbing variables:
- **Track resolution & overlap:** Scrubbing over multiple simultaneous 4K or mixed-resolution tracks with varying GOP sizes. - **Effect stacks:** Chains of filters and real-time image processing applied simultaneously. - **Directional asymmetry:** Forward versus backward seeking incurring radically different decoding costs. - **Gesture velocity:** Slow scrubbing signals that the user cares about precise positioning, whereas rapid scrubbing means they only care about rough trajectory rather than individual frames. - **Timeline scale:** Meta Edits allows full frame-level zooming where showing every frame matters, contrasting with zoomed-out views showing 10 minutes of footage where users do not inspect exact landing frames.
Baracaldo explains: “So from this complexity, we cannot realistically explore every combination. So what does it take for us to go AI native on the software building process?”
[18:22](https://www.youtube.com/watch?v=hAurRPc3A10&t=1102s) Going AI-Native: The Software Building Workflow and Observation Agents
To transition to an AI-native engineering model, Meta abstracts the software engineering lifecycle into five discrete stages: 1. **Observing:** Monitoring production telemetry across multidimensional combinations. 2. **Diagnosing:** Isolating bottlenecks, regressions, or decoder warm-up overhead. 3. **Building:** Implementing performance optimizations or bug fixes. 4. **Experimenting:** A/B testing changes so improvements for one cohort do not silently degrade playback for other users across billions of heterogeneous devices. 5. **Cleaning up:** Pruning dead experiment code to prevent crushing technical debt.
To empower agents across these stages, engineers are building a shared domain context layer that encapsulates domain-specific quirks—such as why backward seeks cost more than forward seeks or how GOP boundaries behave. Baracaldo zooms in on the observation stage to illustrate why agents are essential. When production metrics are averaged globally across all users and devices, the resulting numbers look benign and mask deep regressions. The real performance pain clusters in hyper-specific slices, such as a specific scrub velocity over a certain number of overlapping tracks or the latency penalty of warming up a new hardware decoder when switching between clips.
Baracaldo notes: “So it's very hard for one human to actually observe and explore the whole problem space.” By equipping agents with domain knowledge about gesture dynamics, composition shapes, and interaction phases, the agents can automatically slice metric spaces, spin up focused diagnostic dashboards, and formulate technical hypotheses just like a systems engineer. When automated anomaly detectors flag a regression in a specific slice, the observation agent bundles the diagnostics into a structured package that serves as the direct input for the downstream code-building phase.
[21:54](https://www.youtube.com/watch?v=hAurRPc3A10&t=1314s) Building Features with Agents: Human Intent vs. Agent Execution
Baracaldo transitions to the building phase of the workflow, emphasizing the unique challenges of writing and modifying video engine code targeted at resource-constrained mobile hardware like Android devices. Operating an agentic development loop requires a sharp division of labor between engineers and AI models. From humans, the process demands core intent, algorithmic design, architectural foresight, and system design thinking. The agent, in turn, must consume that architectural framing alongside the shared domain knowledge to translate high-level strategies into robust, device-level video processing code.
[22:29](https://www.youtube.com/watch?v=hAurRPc3A10&t=1349s) Defining Deterministic Artifacts and Executable Code
To harness AI agents effectively during development, engineers cannot rely on ambiguous instructions. Instead, they must translate human intent into rigid, deterministic artifacts that an agent can execute and verify autonomously. When an agent is tasked with building or refactoring video playback features, it must know precisely which test cases to run to confirm that the video renders properly without artifacts like flickering or dropped black frames. Achieving this requires formal specifications outlining the expected behavior, structured implementation plans with granular execution steps, and executable code commands that return an unambiguous pass or fail status.
As Boris Baracaldo emphasizes, moving from ambiguous prompts to executable code is critical: “And from this intent we need to create artifacts that are deterministic for an agent to execute.” By giving an agent automated commands to run against the build, the system eliminates subjective guesswork and establishes an objective standard for when the task is genuinely finished.
- **Feature specification**: Explicit document defining the exact functional behavior and performance boundaries expected. - **Implementation plan**: Step-by-step roadmap tailored for the agent to follow sequentially during code generation. - **Executable validation code**: Direct CLI commands or automated test suites that run programmatically to confirm completion.
---
[23:12](https://www.youtube.com/watch?v=hAurRPc3A10&t=1392s) Grounding Stochastic Agents with Deterministic Video Tooling
A major pitfall in building agentic software workflows is treating large language models as general-purpose decision engines for every step of an engineering pipeline. Because LLMs are inherently stochastic, running the same prompt repeatedly yields divergent decisions and inconsistent code paths. To counter this variability, the engineering strategy shifts toward having agents write deterministic tools, harness scripts, and validation harnesses. What once required prohibitive engineering hours for a single human developer to hand-craft—bespoke testing infrastructure, media synthesizers, and platform hooks—is now extremely cheap to generate using AI.
In the context of the mobile video editing engine, this strategy breaks down into generating varied test media, compositing complex edit timelines, driving the UI, and verifying pixel-perfect outputs. Using tools like FFmpeg, agents create expansive test suites with varying resolutions, frame rates, and GOP sizes. They then generate scriptable compositions featuring overlapping video tracks, transitions, text overlays, and animated stickers or GIFs. To drive the application, scripts interface directly with Android testing utilities such as `dumpapp` to inspect the view hierarchy and issue ADB commands to simulate finger gestures. Throughout execution, the screen and system trace logs are captured. Deterministic validator scripts parse these traces and inspect decoded frame pixels to guarantee that playback tracks the user's finger with low latency, with zero flickering or unexpected black frames.
```mermaid flowchart TD accTitle: Deterministic Agent-Driven Video Validation Pipeline accDescr: An agent-driven testing workflow where inputs are generated, executed on a device, and validated at the pixel level.
subgraph Inputs ["1. Deterministic Input Generation"] A["Media Library<br/>(FFmpeg: GOP, FPS, Res)"] B["Composition Scripts<br/>(Tracks, Effects, Overlays)"] end
subgraph DeviceRun ["2. Device Automation & Capture"] C["UI Automation<br/>(dumpapp + ADB Gestures)"] D["Device Under Test<br/>(Record Screen & Traces)"] end
subgraph Evaluation ["3. Verification Loop"] E["Deterministic Pixel & Trace Validators"] F{"Pass or Fail?"} G["Agent Loops on Fixes<br/>(Explores Alternative Diffs)"] H["Validated Green Build"] end
Inputs --> DeviceRun C --> D D --> E E --> F F -->|"Red (Failure)"| G G --> D F -->|"Green (Pass)"| H ```
Boris Baracaldo explains the strategic design principle: “One of the best uses of agents is not necessarily throwing at every single problem you have and then hoping that it knows how to traverse every single decision that it needs to make because LLMs are stochastic and it will provide different versions of the same answer.” When the agent encounters a failing red test case, its strength lies in looping across dozens or hundreds of alternative implementations until the deterministic test harness turns green.
- **Input media generation**: Synthetic asset creation via FFmpeg across various resolutions, frame rates, and GOP structures. - **Complex composition generation**: Automated generation of test projects containing multi-track video, overlay effects, text, and GIFs. - **Device manipulation**: Android UI state inspection via `dumpapp` combined with ADB commands to execute repeatable scrubbing and tap gestures. - **Trace and pixel inspection**: Programmatic validation of trace logs and screen recordings to verify latency, gesture tracking, and frame consistency.
---
[26:33](https://www.youtube.com/watch?v=hAurRPc3A10&t=1593s) Core Principles for AI-Native Engineering Workflows
Reflecting on the evolution toward an AI-native development model, Baracaldo outlines two primary takeaways for engineering teams. The first principle is establishing an executable definition of "done." Providing an AI agent with qualitative guidelines or text-only descriptions invites ambiguity; success requires a concrete command that executes against the codebase and returns a binary determination of pass or fail.
The second principle is using LLMs to build deterministic tools rather than relying on them to make judgment calls during execution. By leveraging models to write verification scripts, test generators, and run-time harnesses, teams eliminate stochastic judgment from tasks that can be mathematically or procedurally verified. This leaves the model's creative reasoning focused exclusively on resolving edge cases and bridging the remaining engineering gaps.
As Boris Baracaldo emphasizes: “By removing the judgment from things that can be done deterministically, you're actually using LLMs what they're best and that is covering those gaps of judgment that are still remaining.”
---
[27:22](https://www.youtube.com/watch?v=hAurRPc3A10&t=1642s) Moving from Humans in the Loop to Humans on the Loop
The broader future of AI-native engineering extends far beyond isolated code-generation scripts. It connects production observability, bug reproduction, code generation, and live experimentation into a continuous automated lifecycle. In this operational model, telemetry-monitoring agents continuously inspect production performance, slicing across hardware tiers and operating system versions to pinpoint bottlenecks where user friction concentrates. Once an issue is identified, analysis agents inspect the repository, bisect git revisions across app releases, review code diffs, and recreate specific user compositions on physical or emulated devices.
Rather than forcing humans to handle every step of this triage, agents produce comprehensive review packages outlining the problem and proposed remedies. Human engineers retain high-level governance, deciding which technical problems are worth solving. Once approved, coding agents build the fix using the automated test-and-validation loop, package review diffs, and configure rollout experiments. The agents monitor metric telemetry over several days of deployment, draft release summaries for human sign-off, and subsequently perform dead-code cleanup and technical debt reduction.
```mermaid flowchart LR accTitle: Humans On the Loop Development Lifecycle accDescr: End-to-end autonomous engineering loop showing the shift of humans to supervisory review gates.
subgraph Triage ["Automated Triage"] A["Production Telemetry Analysis"] --> B["Bisect Diffs & Reproduce Issues"] end
subgraph BuildAndTest ["Implementation Loop"] C["Agent Code Generation"] --> D["Deterministic Validation Harness"] end
subgraph Operations ["Deployment & Telemetry"] E["Experiment Setup & Ramp"] --> F["Telemetry Readout & Cleanup"] end
subgraph Governance ["Human Supervisory Gates"] H1{{"Decision: Prioritize & Direct"}} H2{{"Decision: Approve Diff"}} H3{{"Decision: Approve Ship"}} end
B --> H1 H1 --> C D --> H2 H2 --> E E --> F F --> H3 ```
This model fundamentally alters the role of the software developer. Boris Baracaldo captures this organizational evolution directly: “Essentially, we're taking humans from being in the loop to on the loop.” Instead of manually shepherding a pull request through compilation, local verification, and canary monitoring, engineers act as supervisors guiding autonomous systems.
- **Production monitoring agents**: Autonomous background workers slicing operational telemetry across dimensions to locate performance bottlenecks. - **Automated bisection & reproduction**: Systems that isolate regression-inducing commits and recreate timeline states on target devices. - **Experiment orchestration**: Automated rollout management, metric tracking over release cycles, and synthesis of decision readouts. - **Codebase hygiene**: Autonomous cleanup of experiment flags, deprecated code paths, and architectural complexity after rollout.
---
[29:02](https://www.youtube.com/watch?v=hAurRPc3A10&t=1742s) Mobile Video Evolution and the Seamless User Experience
The video editing landscape has undergone a dramatic transformation over the past decade. Desktop environments with dedicated expansion cards and specialized hardware acceleration once represented the only viable way to edit complex video compositions. Today, mobile creators expect to manipulate multi-track timelines effortlessly on handheld smartphones using only a thumb. Maintaining high performance in a video seek engine remains a moving target because hardware profiles, operating system updates, and editing features are continuously shifting.
While the engineering and agentic automation behind video playback grow increasingly sophisticated, the ultimate measure of success is complete invisibility to the end user. Creators should never need to understand video codecs, decoder thread allocation, or the autonomous agent loops ensuring frame accuracy. The software must simply react instantly to human touch.
Boris Baracaldo concludes with this core product philosophy: “Their experience should be as simple as putting their finger down and observing how the product just works.”
## Notable quotes > [01:22](https://www.youtube.com/watch?v=hAurRPc3A10&t=82s) It's not a matter of tuning the algorithm. The algorithm has to do less work, not the same work faster. — Boris Baracaldo
> [27:22](https://www.youtube.com/watch?v=hAurRPc3A10&t=1642s) Essentially, we're taking humans from being in the loop to on the loop. — Boris Baracaldo
## Mentioned Boris Baracaldo, Meta, Edits, Instagram, Instagram Stories, Instagram Reels, Android, MediaExtractor, FFmpeg, ADB, dumpapp
[Source](https://www.youtube.com/watch?v=hAurRPc3A10)