<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Performing Conflict Zone Investigation

## yt-dlp

| Command | Description |
|---|---|
| `yt-dlp <url>` | Download video from URL |
| `yt-dlp --write-info-json <url>` | Download with metadata JSON |
| `yt-dlp --write-thumbnail <url>` | Download with thumbnail |
| `yt-dlp --list-formats <url>` | List available formats |
| `yt-dlp -f best <url>` | Download best quality |

## ffmpeg

| Command | Description |
|---|---|
| `ffmpeg -i video.mp4 -vf 'fps=1/5' frame_%04d.jpg` | Extract frame every 5s |
| `ffmpeg -i video.mp4 -ss 00:01:30 -frames:v 1 screenshot.jpg` | Extract single frame |
| `ffmpeg -i video.mp4 -vf 'drawtext=text=%{pts\\:hms}' annotated.mp4` | Overlay timestamps |

## Evidence Hashing

```bash
# SHA-256 hash for evidence integrity
sha256sum evidence_file.mp4 > evidence_file.mp4.sha256

# Verify hash
sha256sum -c evidence_file.mp4.sha256
```

## Wayback Machine API

| Endpoint | Description |
|---|---|
| `GET https://web.archive.org/save/<url>` | Save page to Wayback Machine |
| `GET https://archive.org/wayback/available?url=<url>` | Check if page archived |

## Agent Script

```bash
node agent.js archive-post --url "https://twitter.com/user/status/123"
node agent.js extract-frames --video evidence.mp4 --interval 5
node agent.js weapon-id --image munition.jpg
node agent.js timeline --incident-dir ./incident_001/
node agent.js verify-report --sources sources.json
node agent.js --self-test
```
