A GAN-inspired adversarial analysis pipeline for any video content — CCTV footage, news broadcasts, home videos, short films, anything. Uses multiple AI models in a Proposer–Critic–Judge architecture to produce detailed forensic reports.
This is the Julia implementation, on the trunk branch. The original Python implementation is preserved and still fully supported on the python-legacy branch:
fossil update python-legacy
How It Works
Video → ffmpeg → Frames + Audio
↓ ↓
Proposer Voxtral
(vision model) (audio model)
↓ ↓
Critic Translate
(text model) (text model)
↓ ↓
Judge ←───┘
(synthesis)
↓
Final Report (.md)
- Preprocess:
ffmpegextracts frames at N-second intervals + audio as MP3 - Proposer: Vision model (Gemma-4-31b) analyzes each frame exhaustively
- Critic: Text model cross-references frames, flags hallucinations, identifies scene boundaries, builds color timeline, reconstructs narrative
- Transcribe: Audio model (Voxtral-24b) transcribes speech and notable audio
- Translate: Text model (DeepSeek-V4-Pro) cleans + translates to
result_language - Report: Everything assembled into a single markdown report
Requirements
- Julia 1.11+ — on AlmaLinux 10 this comes from the locally built
juliaRPM (rpm -q julia); no juliaup, no tarball installs ffmpeg/ffprobeon PATH- An OpenAI-compatible API with vision + audio models (tested with Oryxen)
Quick Start
fossil clone https://code.lewman.com/video-forensics/home video-forensics.fossil
mkdir video-forensics && cd video-forensics
fossil open ../video-forensics.fossil
# Fetch the pinned Julia dependencies (HTTP, JSON3, ArgParse)
julia --project=. -e 'using Pkg; Pkg.instantiate()'
# Copy config and add your API key
cp config.toml.example config.toml
# edit config.toml
# Run
./bin/video-forensics cctv_footage.mp4 --context "Front entrance, 2024-03-15"
# Or with a label for the analysis
./bin/video-forensics news.mp4 --label "Channel 5 Broadcast" --interval 3
bin/video-forensics puts the repo root on LOAD_PATH, so there is no install step — clone and run. Dependencies are pinned in Manifest.toml.
Configuration
All configuration is via config.toml. Copy config.toml.example to config.toml and adjust.
[api]
base_url = "https://api.oryxen.ai/v1"
api_key = "your-key-here"
[models]
frame = "Oryx_Secundus/gemma4-31b"
critic = "Oryx_Secundus/llama3-3-70b"
audio = "Oryx_Secundus/voxtral-small-24b"
translate = "Oryx_Sextus/deepseek-ai/DeepSeek-V4-Pro"
[defaults]
interval = 5
result_language = "English"
critic_chunk_size = 10
timeout_vision = 60
timeout_text = 300
timeout_audio = 180
Both the nested sections above and flat keys (api_key, frame_model, …) are accepted.
Config Discovery
The pipeline auto-discovers config.toml in the current working directory. You can also specify a path explicitly:
./bin/video-forensics cctv.mp4 --config /path/to/config.toml
Language Handling
- Source language: Auto-detected by the audio model. Optionally override with
--language-hint. - Result language: Configured via
result_languageinconfig.toml(default: English). - Example: A Mandarin speaker analyzing French news footage sets
result_language = "Mandarin"— output will be in Mandarin.
Usage
# CCTV footage
./bin/video-forensics cctv.mp4 --context "Front entrance, 2024-03-15"
# News broadcast with tighter frame interval
./bin/video-forensics news.mp4 --label "Channel 5" --interval 3 --context "Evening broadcast"
# Home video — skip audio (just visual analysis)
./bin/video-forensics birthday.mp4 --skip-audio
# Foreign language footage
./bin/video-forensics footage.mp4 --language-hint Spanish
# Use cached results (skip re-extraction if already done)
./bin/video-forensics cctv.mp4 --skip-frames
# Custom config file
./bin/video-forensics cctv.mp4 --config config.toml
If --label is omitted, the video filename is used (e.g. cctv_footage.mp4 → label "cctv_footage").
Output
forensic_<label>/
├── frames/ # Extracted JPEG frames
│ ├── frame_0001.jpg
│ ├── frame_0002.jpg
│ └── ...
├── audio.mp3 # Extracted audio
├── proposer_results.json # Raw frame analyses (cached)
├── critic_report.txt # Critic analysis (cached)
├── transcription_raw.txt # Raw audio transcription (cached)
├── transcription_translated.txt # Cleaned + translated transcription (cached)
└── forensic_report_<label>.md # Final report
All intermediate results are cached. Re-running the pipeline with the same workdir will skip completed steps.
Model Roles
| Role | Default Model | Purpose |
|---|---|---|
| Proposer | Oryx_Secundus/gemma4-31b |
Vision: exhaustive frame analysis |
| Critic | Oryx_Secundus/llama3-3-70b |
Text: cross-reference, find flaws |
| Audio | Oryx_Secundus/voxtral-small-24b |
Audio: speech/audio transcription |
| Translate | Oryx_Sextus/deepseek-ai/DeepSeek-V4-Pro |
Text: clean + translate |
Development
# Fetch the pinned dependencies
julia --project=. -e 'using Pkg; Pkg.instantiate()'
# Run the test suite
julia --project=. test/runtests.jl
# Or through Pkg
julia --project=. -e 'using Pkg; Pkg.test()'
The suite covers config mapping, API retry/error handling, the JSON cache format, report assembly (byte-identical to the Python implementation), CLI flag parsing, and a real end-to-end pipeline run over an ffmpeg-generated video.
License
BSD 3-Clause — see LICENSE.md.