# How the Packed Transcript Format (`takes_packed.md`) Enhances LLM Reasoning

> Discover how the packed transcript format drastically cuts token usage by 90% enabling LLMs to focus reasoning on editorial decisions, not audio parsing.

- Repository: [Browser Use/video-use](https://github.com/browser-use/video-use)
- Tags: deep-dive
- Published: 2026-07-08

---

**The packed transcript format compresses verbose word-level JSON into a phrase-level markdown representation that cuts token usage by roughly 90%, providing the LLM with precise time anchors and narrative boundaries to focus reasoning on editorial decisions rather than low-level audio parsing.**

The `browser-use/video-use` repository implements a video editing pipeline where raw speech-to-text output from ElevenLabs Scribe is transformed into the **packed transcript format** stored as [`takes_packed.md`](https://github.com/browser-use/video-use/blob/main/takes_packed.md). This compact, read-only artifact serves as the LLM's primary knowledge source, enabling efficient reasoning about take selection, cut placement, and visual alignment by presenting high-signal, time-annotated phrases instead of dense linguistic data.

## Token Efficiency and Context Window Optimization

Raw transcription JSON from ElevenLabs Scribe contains thousands of individual word objects with nested metadata. The [`helpers/pack_transcripts.py`](https://github.com/browser-use/video-use/blob/main/helpers/pack_transcripts.py) module collapses this verbosity into a single line per phrase, reducing the token count to approximately one-tenth of the original payload.

According to the documentation in [`SKILL.md`](https://github.com/browser-use/video-use/blob/main/SKILL.md) (lines 112-115), this compression leaves significantly more room in the LLM's context window for reasoning about cuts, beats, and visual embellishments. Rather than wasting tokens parsing individual word timestamps, the model processes concise entries like:

```markdown
[002.52-005.36] S0 Ninety percent of what a web agent does is completely wasted.

```

## Phrase-Level Time Anchors for Precise Editing

Each line in [`takes_packed.md`](https://github.com/browser-use/video-use/blob/main/takes_packed.md) is prefixed with a `[start-end]` range marking exact audio timestamps in seconds. As documented in [`SKILL.md`](https://github.com/browser-use/video-use/blob/main/SKILL.md) (lines 116-122), this format allows the LLM to reference precise moments without parsing dense timestamp structures, enabling reliable cut placement on word boundaries.

The uniform structure ensures that when the model decides to trim a take or align a visual element, it can output clean millisecond-accurate timestamps directly from the text it reads, eliminating the need for additional post-processing or fuzzy matching against raw audio data.

## Silence and Speaker Aware Segmentation

The packing algorithm segments phrases based on audio cues rather than arbitrary word counts. Specifically, [`takes_packed.md`](https://github.com/browser-use/video-use/blob/main/takes_packed.md) breaks lines on silences greater than or equal to 0.5 seconds or on speaker changes, as specified in [`SKILL.md`](https://github.com/browser-use/video-use/blob/main/SKILL.md) (lines 76-79).

This boundary detection naturally groups related content into "beats" that correspond to narrative arcs. The LLM can reason about these semantic chunks as units of meaning rather than isolated words, making it easier to identify the best take for a specific beat or to detect when a speaker transition occurs.

## Single Source of Truth for Consistent Reasoning

All derived data—including filler word tags, retake detection flags, and emphasis scores—are computed on-the-fly from the packed view rather than stored in separate files. Following the principle outlined in [`SKILL.md`](https://github.com/browser-use/video-use/blob/main/SKILL.md) (lines 10-13), this guarantees a single source of truth that remains consistent across multiple LLM passes.

Because the LLM reads only [`takes_packed.md`](https://github.com/browser-use/video-use/blob/main/takes_packed.md) to decide which takes to keep and where to cut, the pipeline avoids synchronization drift between different data representations. The file lives in the project's `edit/` folder alongside other session artifacts, enabling quick manual inspection and prompt engineering without extra tooling.

## Generating and Consuming the Packed Transcript

### Generating [`takes_packed.md`](https://github.com/browser-use/video-use/blob/main/takes_packed.md) from Raw Transcripts

The [`pack_transcripts.py`](https://github.com/browser-use/video-use/blob/main/pack_transcripts.py) helper reads every `transcripts/*.json` file (generated by [`helpers/transcribe.py`](https://github.com/browser-use/video-use/blob/main/helpers/transcribe.py)) and outputs the compact markdown format. From the project root or any `<edit>` directory, run:

```bash
python -m video_use.helpers.pack_transcripts \
    --edit-dir path/to/edit

```

This produces a file formatted as:

```markdown

## C0103  (duration: 43.0s, 8 phrases)

  [002.52-005.36] S0 Ninety percent of what a web agent does is completely wasted.
  [006.08-006.74] S0 We fixed this.

```

### Parsing the Format in Python

When feeding the transcript into custom preprocessing scripts, parse the markdown using regex to extract structured timing data:

```python
from pathlib import Path
import re

def load_packed(file_path: Path):
    """Parse takes_packed.md into a list of (source, start, end, speaker, text)."""
    pattern = re.compile(r'\[(?P<start>\d+\.\d+)-(?P<end>\d+\.\d+)\]\s+(?P<speaker>S\d+)\s+(?P<text>.+)')
    entries = []
    for line in file_path.read_text().splitlines():
        m = pattern.search(line)
        if m:
            entries.append({
                "source": line.split()[1],          # e.g. C0103

                "start": float(m["start"]),
                "end": float(m["end"]),
                "speaker": m["speaker"],
                "text": m["text"]
            })
    return entries

```

### Integration in LLM Prompts

The packed transcript integrates directly into prompts as a readable context block:

```text
You are editing a tech‑launch video. Below is the packed transcript (phrase‑level, time‑annotated).  
Select the best take for each beat and output JSON with start/end times.

--- takes_packed.md ---

## C0103  (duration: 43.0s, 8 phrases)

  [002.52-005.36] S0 Ninety percent of what a web agent does is completely wasted.
  [006.08-006.74] S0 We fixed this.
...

```

Because the segmentation reflects natural speech boundaries, the model outputs clean timestamps without additional computation.

## Summary

- **Token efficiency**: The packed transcript format reduces context usage by ~90% compared to raw JSON, maximizing available reasoning capacity.
- **Precise anchors**: Phrase-level `[start-end]` timestamps enable millisecond-accurate cut placement without parsing overhead.
- **Semantic boundaries**: Lines break on ≥0.5s silences or speaker changes, grouping content into narrative beats.
- **Unified source**: All derived metadata computes from [`takes_packed.md`](https://github.com/browser-use/video-use/blob/main/takes_packed.md), ensuring consistent LLM decisions across pipeline stages.
- **Human-readable**: Markdown format in [`edit/takes_packed.md`](https://github.com/browser-use/video-use/blob/main/edit/takes_packed.md) allows manual debugging and prompt engineering without specialized tools.

## Frequently Asked Questions

### How does the packed transcript format reduce token usage compared to raw JSON?

The format collapses thousands of word-level JSON objects into single-line phrase entries, cutting the token count to approximately one-tenth of the raw ElevenLabs Scribe output. This reduction leaves more context window available for high-level reasoning about video structure and editing decisions.

### What triggers a new phrase boundary in the packed transcript format?

The packing algorithm creates new lines when it detects silences lasting 0.5 seconds or longer, or when the speaker changes. These rules naturally segment speech into coherent beats that align with narrative structure, helping the LLM reason about content flow rather than isolated words.

### How does the LLM use [`takes_packed.md`](https://github.com/browser-use/video-use/blob/main/takes_packed.md) to make editing decisions?

The LLM reads [`takes_packed.md`](https://github.com/browser-use/video-use/blob/main/takes_packed.md) as its primary view of the video project, using the phrase-level timestamps and speaker annotations to select the best takes, identify cut points, and align visual elements. The compact format allows the model to process entire sessions within its context window while maintaining access to precise timing data.

### Where is the packed transcript file located in the project structure?

The generated file resides in the `edit/` directory alongside other session artifacts, as specified in [`SKILL.md`](https://github.com/browser-use/video-use/blob/main/SKILL.md) (lines 44-48). This location ensures the file remains accessible for both automated LLM processing and human inspection during the editing workflow.