# AI use cases for Cdaf (UditAkhourii/cdaf)

Repo: [UditAkhourii/cdaf](https://github.com/UditAkhourii/cdaf) | Use cases: 4 | Page: https://dedupedai.com/use-cases/uditakhourii-cdaf/

CDAF is an open sidecar format and toolkit that stores a timestamped text description of a video next to the file, so AI agents can read that text instead of re-analyzing the footage.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Stop coding agents from re-watching the same footage: https://dedupedai.com/use-cases/uditakhourii-cdaf/stop-agents-rewatching-footage/
- Find b-roll clips in a library by plain-text search: https://dedupedai.com/use-cases/uditakhourii-cdaf/find-b-roll-clips-by-description/
- Gate a build or pipeline on fresh video sidecars: https://dedupedai.com/use-cases/uditakhourii-cdaf/gate-video-pipelines-on-fresh-sidecars/
- Reproduce the sidecar vs direct video benchmark: https://dedupedai.com/use-cases/uditakhourii-cdaf/reproduce-sidecar-vs-direct-benchmark/

## How to stop coding agents from re-watching the same footage with Cdaf

Repo: [UditAkhourii/cdaf](https://github.com/UditAkhourii/cdaf) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Install the CDAF skill and generate sidecars so Claude Code reads text instead of video.

**Who it is for:** A developer using Claude Code on a video project who sees the agent re-analyze the same clips every session.

**The problem:** Each time an agent touches a video, it runs a full video-understanding pass, which costs tokens and time.

**The outcome:** Each clip gets one .cdaf sidecar, and later agent sessions check its hash and read the text description first.

### Steps

1. Run `npx cdaf-skill` to install the agent skill for all your projects.
2. Run `pip install "cdaf[generate] @ git+https://github.com/UditAkhourii/cdaf.git#subdirectory=cli"` to install the CLI with the generator.
3. Run `export GEMINI_API_KEY=your-key` (PowerShell: `$env:GEMINI_API_KEY="your-key"`).
4. Run `cdaf generate ./footage` to describe every video and skip fresh sidecars.
5. Run `cdaf status ./footage` to confirm each video reports FRESH.

### Prompt to paste into your agent

```text
Using the CDAF skill in the repo UditAkhourii/cdaf, check <footage-folder> for a .cdaf sidecar next to each video, verify the bytes and sha256 header against the video, and read the sidecar instead of watching any fresh video. Report the list of videos with their status (FRESH, STALE, or MISSING) and confirm that you did not run a video analysis on any FRESH file.
```

### Caveat

The skill and CLI only reduce repeat analysis after a sidecar exists, so the first pass over each video still costs a full generation.

Risk, credentials: Your Gemini API key is read from the GEMINI_API_KEY environment variable, so keep it out of shared shell history and committed files.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/uditakhourii-cdaf/stop-agents-rewatching-footage/

## How to find b-roll clips in a library by plain-text search with Cdaf

Repo: [UditAkhourii/cdaf](https://github.com/UditAkhourii/cdaf) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Generate sidecars once, then grep .cdaf files to pick cut candidates by description.

**Who it is for:** A video editor or agentic editing tool team choosing clips from a large footage library for a new edit.

**The problem:** Finding the right shots means multimodal sweeps over every video, which is slow and expensive at library scale.

**The outcome:** A text search over sidecar files returns candidate clips, and their segment timestamps map to cut points.

### Steps

1. Run `cdaf generate ./footage` to create sidecars for the library.
2. Run `cdaf status ./footage` to confirm every clip is FRESH before searching.
3. Search the sidecars with grep for the shot you need, for example a grep for "coastal highway" across the .cdaf files.
4. Open the matching .cdaf file and copy the segment lines such as [00:05.2-00:12.8] into your cut list.

### Prompt to paste into your agent

```text
Using the CDAF format from the repo UditAkhourii/cdaf, search every .cdaf file in <footage-folder> for the description <shot-description>, and return each matching clip path with its matching segment timestamps. Verify that each returned sidecar reports FRESH before you use it.
```

### Caveat

Search quality depends on what the generator wrote into each sidecar, so check the matching segment text before you cut.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/uditakhourii-cdaf/find-b-roll-clips-by-description/

## How to gate a build or pipeline on fresh video sidecars with Cdaf

Repo: [UditAkhourii/cdaf](https://github.com/UditAkhourii/cdaf) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Use Cdaf validate as an exit-code check so stale descriptions never reach downstream steps.

**Who it is for:** A DevOps or CI engineer whose pipeline feeds video files to AI agents and needs to reject outdated descriptions.

**The problem:** A video edited after its description was written can silently feed wrong content to downstream agents.

**The outcome:** The pipeline stops on any video whose sidecar is missing or stale, and continues only when all sidecars are fresh.

### Steps

1. Run `pip install "cdaf[generate] @ git+https://github.com/UditAkhourii/cdaf.git#subdirectory=cli"` on the build runner, or install the CLI from a clone with `pip install ./cli[generate]`.
2. Run `cdaf validate ./footage/clip.mp4` for each video in the pipeline.
3. Fail the job when the command exits with a nonzero code, and regenerate with `cdaf generate ./footage` for any stale clip.
4. Run `cdaf read ./footage/clip.mp4` in downstream steps to get the description after the hash check passes. (inferred, check the README)

### Prompt to paste into your agent

```text
Using the CDAF CLI from the repo UditAkhourii/cdaf, run `cdaf validate` on each video path in <video-list> and report the exit code for each. Stop and list any video whose sidecar is missing or stale, and verify that validate exits 0 for every video that passes.
```

### Caveat

The validate and read commands need no API key, but sidecars must already exist, so generation still needs a Gemini key or the local provider.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/uditakhourii-cdaf/gate-video-pipelines-on-fresh-sidecars/

## How to reproduce the sidecar vs direct video benchmark with Cdaf

Repo: [UditAkhourii/cdaf](https://github.com/UditAkhourii/cdaf) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Run the repo's synthetic benchmark to check the token and accuracy numbers yourself.

**Who it is for:** A researcher or engineer who wants to verify the accuracy and token claims before adopting the format.

**The problem:** Published token savings are hard to trust without seeing the same measurement run on your own machine.

**The outcome:** You get a RESULTS.md report comparing direct video answers with sidecar answers on the same questions.

### Steps

1. Install ffmpeg so the benchmark can synthesize test videos.
2. Run `python benchmarks/bench.py make` to synthesize the testset.
3. Run `python benchmarks/bench.py run` with GEMINI_API_KEY set to query both conditions through Gemini.
4. Run `python benchmarks/bench.py report` to write benchmarks/RESULTS.md.

### Prompt to paste into your agent

```text
In the repo UditAkhourii/cdaf, run the benchmark steps `python benchmarks/bench.py make`, `run`, and `report` in order, and write the results to benchmarks/RESULTS.md. Verify that the report lists accuracy and mean prompt tokens for both the direct video condition and the CDAF sidecar condition.
```

### Caveat

The benchmark uses synthesized videos with known colors, hard cuts, and word overlays, so its results do not yet show performance on natural footage.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/uditakhourii-cdaf/reproduce-sidecar-vs-direct-benchmark/
