AI Forensics· Todak Academy
01 / 00
← → navigateO overviewF fullscreenP narration
Two-day course · Visual & video forensics

AI for
forensic eyes.

Use AI and the terminal to triage photos, search hours of CCTV, transcribe, redact and report, while the evidence stays on your machine and stays exactly as you found it.

The map

Two days, one case.

You already know the AI basics and Claude Code. Now we point them at real forensic work: one practice case runs through both days, and you finish with a verified report.

DAY 1

Foundations & images

  1. 01
    AI meets evidenceWhat AI may and may not do, and the rules that keep you court-safe.
  2. 02
    The workstationTools, a standard case folder, hashing and the command log.
  3. LAB
    Lab 1 · Open a caseFolder, copy, fingerprint, lock.
  4. 03
    ImagesMetadata, timelines, duplicates, edits and AI-made pictures.
  5. LAB
    Lab 2 · Photo triage200 photos into one timeline and map.
DAY 2

Video, audio & the report

  1. 04
    Video & CCTVKnow the file, stamp the frames, find the events, clip safely.
  2. LAB
    Lab 3 · Three hours of CCTVFrom footage to a short event list.
  3. 05
    Audio, privacy & fakesOffline transcripts, redaction and deepfake awareness.
  4. 06
    The full caseRun it end to end, write the report, prove nothing changed.
  5. LAB
    Lab 4 · CapstoneYour own case file, start to finish.
If you remember one thing

AI writes the tool.
Your machine touches the evidence.

You will not upload evidence to an AI and ask it what it sees. You will ask the AI to write, explain and check small programs, and those programs run locally on copies of the evidence, with every step logged.

AI does

Writes commands and scripts, explains every flag, fixes errors, organises output, drafts the report from your log.

Your machine does

Reads the evidence, hashes it, extracts frames, metadata and audio. Nothing evidential needs to leave the building.

You do

Decide, look, verify and sign. Every finding in the report is yours, checked with your own eyes.

DAY 1 · MORNING
01

AI meets evidence.

Where AI earns its place in a forensic lab, where it must never go, and the habits that keep your work admissible.

Help vs harmEnhancementData stays localChain of custodyForensic prompts
1.1Ground rules

Where AI helps, where it must not.

AI is brilliant at the boring, high-volume parts of visual forensics. It has no place in the parts that need a sworn human judgement.

Let AI speed this up

  • Triage: sort 2,000 photos by time, camera and place.
  • Search: turn 3 hours of CCTV into 5 moments worth watching.
  • Scripting: write and explain ffmpeg, exiftool and Python commands.
  • Transcripts: a first draft of what was said, with timestamps.
  • Paperwork: logs, exhibit lists and a first draft of the report.

Keep AI out of this

  • Identifying a person, face or vehicle. That is an examiner's call.
  • "Enhancing" an image so a detail appears that wasn't recorded.
  • Deciding whether footage is genuine on one tool's score.
  • Holding original evidence in a chat window or cloud upload.
  • Signing anything. The report's conclusions are a human's.
Rule of thumbAI may find and prepare. Only a person may conclude.
1.2Ground rules

“Enhance!” is not evidence.

Generative AI doesn't recover detail. It invents the most likely detail and draws it sharply. Feed one blurry plate to three AI upscalers and you get three confident, different answers.

WXY 4821
CAM02 · 14:36:05 · 46 × 14 px plate region
AI upscaler AWXY 482197%
AI upscaler BWKY 482794%
AI upscaler CVXY 4B2196%
Not evidence Three "facts" from the same 46 pixels.
Courts have already refused AI-enhanced video because nobody can explain how the new pixels were made (Washington State, USA, 2024). Allowed enhancement is global, reversible and documented: brightness, contrast, crop, rotate, sharpen. We cover it in Chapter 3.
1.3Data protection

The evidence never leaves the machine.

Claude Code runs in your terminal, but the thinking happens in the cloud. Whatever it reads or whatever a command prints is sent there. So you choose what it is allowed to see.

Your workstation

  • Original evidence on read-only storage
  • Working copies and every output file
  • The tools: ffmpeg, exiftool, Python, Whisper
  • The log and the report
Your request
Script + explanation
Evidence: blocked

The AI model

  • Your description of the task (no names, no case details)
  • File names and counts, if your policy allows
  • Photos, frames, video, audio of a real case
  • Personal data: names, IC numbers, addresses, plates
RememberA command's output also goes to the AI. If the output is sensitive, you run the script, not Claude.
1.4Data protection

Three levels of trust.

Your agency's SOP picks the level, not convenience. When in doubt, go one level stricter.

Level 1

Practice data

Training files, public samples, test footage. Claude may read and run everything. This is how we work in the labs.

Level 2

Case, text only

Claude runs the commands, but originals are locked from it and only text output comes back: hashes, durations, counts. No images, no transcripts.

Level 3

Sensitive case

Claude only writes and explains the script. You run it yourself in a separate terminal it can't see. Nothing about the case reaches the AI.

Level 2 · lock the originals away from Claude: .claude/settings.json

{ "permissions": { "deny": [ "Read(./00_original/**)", "Edit(./00_original/**)" ] } }

With this file in the case folder, Claude's file tools cannot open or change anything in 00_original. Any shell command still needs your Yes first, so read it.
1.5Chain of custody

A fingerprint for every file.

A SHA-256 hash is a 64-character fingerprint. Change one pixel and it changes completely. Hash the original first, work only on copies, and you can prove the original never changed.

Terminal · case PC-001
  • Hash the original the moment it arrives.
  • Copy it to a working folder and check the copy's hash matches.
  • Work only on copies. Their hashes will change; that's expected.
  • Re-hash the original at the end. Same fingerprint = untouched.
Windows: certutil -hashfile file SHA256 or Get-FileHash. Same idea, same 64 characters.
1.6Prompting

The forensic prompt formula.

Four parts, every time. Describe the job and the rules, never the case.

1 · Context

Where the files are and what kind they are. "200 JPEGs in 01_working/photos".

2 · Task

One clear job. "List each photo's capture time, camera and GPS."

3 · Rules

"Never write to 00_original. Log every command. Explain before you run."

4 · Output

Exactly what you want back. "A CSV in 02_exports, sorted by time."

Type into Claude Code

The case folder is PC-001. Photos are in 01_working/photos (JPEG). Make a CSV of every photo's capture time, camera make and model, software and GPS. Never write to 00_original, log every command to logs/commands.md, and explain the command before you run it. Save the CSV to 02_exports/photo_timeline.csv sorted by capture time.

1.7Safe habits

Read it before you run it.

Keep Claude in its default mode: it asks before every command. That pause is your quality control, and it's what lets you say in court that you understood each step.

claude
● Bash(ffmpeg -ss 00:36:00 -to 00:38:00 -i 01_working/CAM02.mp4 -c copy 02_exports/clip_1436.mp4)

  Do you want to run this command?
  ❯ 1. Yes
    2. Yes, and don't ask again for ffmpeg
    3. No, and tell Claude what to do differently
  • Check the paths. Input from 01_working, output to 02_exports. Never 00_original.
  • Don't understand a flag? Answer 3 and ask: "explain every part of that command".
  • Never use the skip-permissions mode on case work.
  • Approved commands go into logs/commands.md with time and output.
Ask yourselfCould I explain this command to a judge? If not, don't press Yes yet.
1.8Safe habits

Trust, but verify.

AI is fast and usually right, which is exactly why its rare mistakes slip through. Build the check into the job.

What AI might doWhat it looks likeYour check
Summarise wrongly"The car arrives at 14:36" when the clip says 14:63 on a bad DVR clockOpen the frame yourself at every time you quote
Miss somethingMotion detection skips a person in shadowSpot-watch the gaps between events at 4× speed
Invent a detailA transcript fills an unclear word with a likely oneMark unclear audio as [inaudible], never guess
Use the wrong fileRuns on a re-encoded copy instead of the remuxEvery output lists its input file and hash
Sound certain"This image is definitely AI-generated"Treat any single detector as a lead, not a finding
01Recap

The ground rules.

AI finds and prepares. Only a person concludes and signs.
No generative enhancement of evidence. It invents detail.
Evidence stays local. AI writes the tool, the tool runs on your machine.
Three levels of trust. Your SOP picks; go stricter when unsure.
Hash, copy, work, re-hash. The fingerprint proves nothing changed.
Context, task, rules, output. Describe the job, never the case.
Read before you run. Default permission mode on every case.
Verify every quoted fact against the source yourself.
Up next · Chapter 02
Rules set. Let's build the workstation.
DAY 1 · LATE MORNING
02

The workstation.

Free, court-proven tools installed by one sentence, a case folder everyone in the unit recognises, and a log that writes itself.

The toolkitInstallCase folderLock originalsHash manifestCommand log
2.1Toolkit

Six free tools, decades of trust.

You don't need expensive software to start. These open tools are used in labs worldwide, run fully offline, and Claude knows every one of them well.

Video

ffmpeg · ffprobe

Inspect, convert, cut, extract frames and audio from almost any video, including many DVR exports.

Metadata

ExifTool

Reads the hidden data inside photos and videos: capture time, camera, GPS, editing software.

Images

ImageMagick

Batch crops, contact sheets, comparisons and documented adjustments on thousands of images.

Vision

Python + OpenCV

Motion detection, face and plate blurring, duplicate finding. Claude writes the scripts.

Audio

Whisper (local)

Speech to text with timestamps, English and Malay, running on your own machine.

Built in

Hashing

shasum on Mac, certutil or Get-FileHash on Windows. Already installed, nothing to add.

2.2Toolkit

Install with one sentence.

No hunting for downloads. Ask Claude to install the toolkit, check each tool runs and record the versions.

Claude Code · Terminal
Type into Claude Code

Install ffmpeg, exiftool, ImageMagick and Python with OpenCV on this computer. Check each one runs, then write every tool's name and exact version into tools.md with today's date.

Install needs internet once. After that every tool works offline, so a lab workstation can be disconnected.
On an agency machine, IT may need to approve installs. Bring them this list.
2.3Toolkit

“Which software, which version?”

Expect that question under cross-examination. A results file is only repeatable if someone can run the same version of the same tool. Keep a tools.md in every case.

# tools.md · case PC-001 · 30/10/2026 | Tool | Version | Used for | |-------------|---------|-----------------------| | ffmpeg | 7.1 | probe, remux, stills | | exiftool | 13.10 | photo metadata | | ImageMagick | 7.1.1 | contact sheets | | Python | 3.12.4 | scripts | | OpenCV | 4.10.0 | motion, redaction | | whisper | 20240930| transcript (offline) | | Claude Code | 2.x | wrote + ran commands |
  • Write it before you start, not from memory afterwards.
  • Include the AI. Say honestly that Claude Code wrote and ran commands.
  • Keep scripts in the case folder, so the exact code is part of the record.
Type into Claude Code

Update tools.md with the version of every tool you used today, and copy every script you wrote into the scripts folder.

2.4Organise

One folder shape, every case.

When every case looks the same, anyone in the unit (and Claude) knows where the originals are, where the work is, and where the results go.

PC-001/ ├── 00_original/exactly as received · read-only │ ├── photos/ cctv/ audio/ ├── 01_working/verified copies you may process ├── 02_exports/stills, clips, CSVs, contact sheets ├── scripts/every script that touched the case ├── logs/ │ ├── manifest.txthashes of every original │ └── commands.mdevery command, time, result ├── tools.mdsoftware and versions ├── CLAUDE.mdthe rules Claude must follow here └── report.md
Type into Claude Code

Create a case folder called PC-001 with this structure: 00_original with photos, cctv and audio inside, 01_working, 02_exports, scripts, logs, plus empty tools.md and report.md. Write a CLAUDE.md that says: never read or write 00_original, log every command to logs/commands.md, explain before running.

CLAUDE.md is read at the start of every session, so the rules are never forgotten, even tomorrow.
2.5Organise

Lock the originals, three ways.

Belt, braces and a second belt. Each lock catches a different kind of mistake.

1 · At the source

Copy from the seized drive through a write blocker or as read-only media, as your SOP already requires. Nothing new here.

2 · On the disk

Make the folder read-only so no program can change it.

# Mac chmod -R a-w 00_original # Windows attrib +R 00_original\* /S

3 · From the AI

The deny rule in .claude/settings.json from 1.4 stops Claude from opening or editing anything inside, even if asked.

Test itAsk Claude to open a file in 00_original. It should be blocked, or stop and ask you, and you answer No.
2.6Chain of custody

One manifest, every file.

Hashing one file by hand is fine. A real case has hundreds. Claude writes the command that fingerprints everything at once and saves the list.

Claude Code
  • manifest.txt holds one line per file: fingerprint and path.
  • Make it first, before any processing, and note the time in the log.
  • Check it last. One command compares every file to its line. Chapter 6.
  • Keep a copy of the manifest with the exhibit paperwork.
2.7Chain of custody

If it isn't logged, it didn't happen.

Your notes are part of the evidence. Let Claude keep a running log of every command: when, what, on which file, and what came out. Your report is built from it.

## 30/10/2026 · logs/commands.md 10:42 Hash all originals cmd: find 00_original -type f -exec shasum -a 256 {} + out: 214 files → logs/manifest.txt 10:47 Verified working copy of CAM02 cmd: shasum -a 256 01_working/cctv/CAM02.mp4 out: 5a11…f902 (matches original) 11:05 Photo timeline cmd: exiftool -csv -n … 01_working/photos out: 02_exports/photo_timeline.csv (200 rows)
Type into Claude Code

For the rest of this case, after every command you run, append to logs/commands.md: the time, a one-line purpose, the exact command and a short summary of the result.

Commands you run yourself (Level 3)? Paste them into the log too, or ask Claude to add them from your notes.
LAB 1Hands-on · 45 min

Lab 1: open a case.

1 · Get the practice kit

Practice data only (Level 1). It holds photos, a 3-hour CCTV recording and an audio clip, all made for this course.

practice-case-PC-001.zip
Your trainer shares it on a USB drive or shared folder before the lab.
Type into Claude Code

Unzip practice-case-PC-001.zip from my Downloads into a folder called evidence-in on my Desktop and tell me what's inside: how many files of each type and their total size.

2 · Build the case folder

Use the standard shape from 2.4. Claude also writes the rules file it must obey.

Type into Claude Code

Create a case folder Cases/PC-001 with 00_original (photos, cctv, audio), 01_working, 02_exports, scripts, logs, tools.md, report.md, and a CLAUDE.md with our forensic rules. Add .claude/settings.json that denies Read and Edit on 00_original.

3 · Bring the evidence in

Copy, never move. The source stays where it was, so you can re-check against it.

Type into Claude Code

Copy everything from Desktop/evidence-in into Cases/PC-001/00_original, sorted into photos, cctv and audio by file type. Copy, don't move. Log it.

4 · Fingerprint everything

The manifest is your day-one proof. Make it before anything else touches the files.

Type into Claude Code

Make a SHA-256 manifest of every file in 00_original and save it to logs/manifest.txt. Then hash the files in Desktop/evidence-in and confirm every hash matches.

5 · Lock it and test the lock

Make the folder read-only, then try to break your own rule.

Type into Claude Code

Make 00_original read-only. Then try to open 00_original/photos/IMG_0001.jpg and tell me what happened.

Success: Claude is blocked from reading it. If it asks to use a shell command instead, answer No. That pause is the lock working.

6 · Make verified working copies

Everything from here on happens on these copies.

Type into Claude Code

Copy 00_original into 01_working with the same sub-folders using the shell, verify every copy against logs/manifest.txt, and record the result in logs/commands.md.

Case opened. You now have locked originals, a manifest, verified copies and a log.
02Recap

The workstation is ready.

Six free tools, all offline after install.
One sentence installs them and records the versions.
tools.md answers "which software, which version?"
Same folder shape for every case; CLAUDE.md holds the rules.
Three locks: write blocker, read-only folder, deny rule.
manifest.txt fingerprints every original on day one.
commands.md logs every step as you go.
Lab 1 done: PC-001 is open and verified.
Up next · Chapter 03
Let's see what the photos are hiding.
DAY 1 · AFTERNOON
03

What the photos are hiding.

Every digital photo carries a second story in its metadata. Read it at scale, build timelines and maps, find duplicates, and spot editing and AI-made images.

MetadataTimeTimeline & mapDuplicatesEdited?AI-made?Allowed enhancement
3.1Metadata

What's inside a photo.

EXIF metadata is written by the camera or phone at the moment of capture. ExifTool reads hundreds of fields; these are the ones that matter most in a case.

IMG_0412.jpg
DateTimeOriginal
2026:10:30 14:36:11
OffsetTimeOriginal
+08:00
Make / Model
Apple · iPhone 15
GPSLatitude / Longitude
3.1478, 101.6953
Software
17.6.1
ModifyDate
2026:10:30 14:36:11
ImageSize
4032 × 3024
IMG_0413 · Software
Adobe Photoshop 25.0 edited
IMG_0420 · DateTimeOriginal
(missing) stripped?
Metadata is easy to change and easy to lose. WhatsApp, Facebook and most chat apps strip it. Treat it as a strong lead, then confirm with other sources.
3.2Metadata

Time is tricky.

The capture time is only as good as the device clock. Before you build any timeline, work out each device's offset from real time.

Wrong clock

A DVR set 7 minutes fast, or never set since a power cut. Common in CCTV.

Time zone

Some fields are local time, some UTC. A "Z" means UTC, +08:00 is Malaysia.

Copies and edits

File dates change on copy. Trust DateTimeOriginal, not the file's "modified" date.

Type into Claude Code

CAM02's on-screen clock shows 14:43:10 in the frame where the reference phone shows 14:36:05 (+08:00). Work out CAM02's offset, write it in logs/clock_offsets.md, and apply it in a new "corrected_time" column, keeping the original time too.

AlwaysKeep the original time and the corrected time, side by side.
3.3At scale

2,000 photos, one timeline.

What used to take a day of right-click → Properties now takes one command. ExifTool reads every file; Claude turns it into a sorted, readable table.

Time (+08)FileDeviceGPS
14:02:44IMG_0398iPhone 153.1471, 101.6949
14:11:09DSC_2210Nikon D7500none
14:36:11IMG_0412iPhone 153.1478, 101.6953
14:36:40IMG_0413Photoshopnone
15:42:03IMG_0431iPhone 153.1480, 101.6960
(no time)IMG_0420unknownnone
Type into Claude Code

Use exiftool to read capture time, time offset, make, model, software and GPS from every photo in 01_working/photos. Save it as 02_exports/photo_timeline.csv sorted by time, and list separately any photo with no capture time or with editing software.

# what Claude will run (roughly) exiftool -csv -n -r -DateTimeOriginal -OffsetTimeOriginal \ -Make -Model -Software -GPSLatitude -GPSLongitude \ 01_working/photos > 02_exports/photo_timeline.csv
3.4At scale

GPS points, on a map.

Ask for a single HTML page that plots every photo with GPS, colour-coded by time, with the file name and time on each pin. Open it in a browser, no installs.

Type into Claude Code

From 02_exports/photo_timeline.csv make 02_exports/photo_map.html: one pin per photo with GPS, coloured from early (blue) to late (red), each pin showing file name and time, and a line joining them in time order.

Map tiles normally load from the internet, which sends the area you're viewing to the map provider. For a sensitive case, ask for a plain plot without map tiles, or use your agency's offline GIS.
Phone GPS can drift 10 to 50 metres, more indoors. A pin shows where the phone thought it was.
3.5At scale

Same photo, different file.

Seized devices are full of copies: forwarded, resized, screenshotted. Two kinds of fingerprint find them.

Exact

SHA-256

Finds files that are bit-for-bit identical, whatever their names. Instant, and certain.

Look-alike

Perceptual hash

Finds pictures that look the same after resizing, recompressing or a small crop. Gives a similarity score; you confirm by eye.

Type into Claude Code

Write a Python script in scripts/ that groups the photos in 01_working/photos into exact duplicates (same SHA-256) and look-alikes (perceptual hash distance 8 or less). Save the groups to 02_exports/duplicates.csv and make a contact sheet image for each look-alike group so I can check them by eye.

3.6Authenticity

Has it been edited?

No single test proves a photo is genuine. You collect signals, and several pointing the same way justify a closer, expert look.

SignalWhat it suggestsTool
Editing software in metadataOpened and saved by an editor (could be a harmless crop)exiftool -Software
Capture time missing or after file timeMetadata stripped or rewrittenexiftool -time:all
Thumbnail doesn't match the imageMain image changed, embedded preview not updatedexiftool -b -ThumbnailImage
Uneven compression (ELA)One area saved a different number of timesImageMagick compare
Wrong quantisation table for the cameraSaved by software, not straight from the cameraexiftool -JPEG*
WordingWrite "consistent with editing", never "this photo is fake", unless an expert examination proves it.
3.7Authenticity

Was it made by AI?

AI images are now realistic enough to fool people and detectors. Check where it came from before you judge what it looks like.

Check first

Provenance

Content Credentials (C2PA) are signed records some cameras and AI tools attach. Read them with c2patool. Present = strong clue; absent proves nothing.

Visual tells

Hands, text, reflections, shadows that disagree, ear and jewellery details, repeating textures. Fewer every year, so never rely on them alone.

Detectors

Give a probability, not an answer. They miss new generators and flag real photos. Use two or more, and only as a lead.

Most online "AI detectors" mean uploading the image. That breaks rule 1.3 for real case material. Use offline tools or your forensic lab's process.
3.8Enhancement

Enhance the right way.

You may make a picture easier to see. You may not make it show something new. The test: is the change global, repeatable and written down?

Allowed, with a log entry

  • Brightness, contrast, levels, gamma on the whole image
  • Crop, rotate, enlarge with a stated, simple method (nearest or bicubic)
  • Mild sharpening or noise reduction with recorded settings
  • Frame averaging of a still object across CCTV frames

Not for evidence

  • AI upscaling or "super resolution" that adds detail
  • Face restoration or "unblur" apps
  • Generative fill, object removal, background replacement
  • Any filter you can't name, set and repeat
Type into Claude Code

Make an enhanced copy of 01_working/photos/IMG_0412.jpg: crop to the doorway, raise brightness 15% and contrast 10% on the whole image, enlarge 2× with bicubic. Save it to 02_exports with the settings in the file name and log the exact command.

3.9Presentation

Exhibits that explain themselves.

A contact sheet puts many photos on one page, each labelled with its file name, capture time and short hash, so anyone can match a printout back to the file.

Type into Claude Code

Make an A4 contact sheet PDF of the 12 photos taken between 14:00 and 15:00, four per row, each captioned with file name, corrected capture time and the first 8 characters of its SHA-256. Title it "PC-001 · Exhibit P1" and save it to 02_exports.

  • Number exhibits the way your unit already does. Claude follows your scheme.
  • Short hash on every image links paper to file without ambiguity.
  • Use the original for the sheet, never an enhanced copy, unless clearly labelled.
LAB 2Hands-on · 75 min

Lab 2: photo triage.

1 · Build the timeline

Start the session the same way every time, then ask for the table.

Type into Claude Code

We're working on case PC-001. Read CLAUDE.md first. Then make 02_exports/photo_timeline.csv from every photo in 01_working/photos: capture time, offset, make, model, software, GPS, sorted by time.

2 · Check the clocks

The kit has a photo of a wall clock taken on each device. Use them to find the offsets.

Type into Claude Code

List the photos whose names start with CLOCK_. For each one show me its capture time and camera, and I'll tell you what the clock in the picture shows. Then work out each device's offset and add a corrected_time column.

You read the clock in the picture. That's an examiner's observation, so you make it, not the AI.

3 · Put it on a map

Practice data, so map tiles are fine here (Level 1).

Type into Claude Code

Make 02_exports/photo_map.html from the timeline: pins coloured by corrected time, a line in time order, and a popup with file name and time. Open it.

4 · Find the duplicates

The kit hides 3 exact copies and 4 resized look-alikes. Can you find them all?

Type into Claude Code

Group the photos into exact duplicates and look-alikes with a script in scripts/, save 02_exports/duplicates.csv and show me a contact sheet per look-alike group.

5 · Raise the red flags

Some photos were edited, one had its metadata stripped. List the signals, don't conclude.

Type into Claude Code

List every photo showing a sign of editing or metadata removal: editing software, missing capture time, thumbnail mismatch. For each, say which signal and how strong it is. Use "consistent with" wording.

6 · Produce exhibit P1

Finish with something you could hand to an investigating officer.

Type into Claude Code

Make Exhibit P1: an A4 contact sheet PDF of the photos between 14:00 and 15:00 (corrected time), captioned with file name, corrected time and short hash. Log everything we did in this lab.

Day 1 complete. Save the session so tomorrow starts where you stopped.
DAY 1Recap

Day one, done.

AI finds and prepares; people conclude.
Evidence stays local; trust level set by your SOP.
Case folder, locks, manifest, log: every case, same way.
Metadata is a strong lead, never the only proof.
Fix the clocks before trusting any timeline.
Two fingerprints find exact and look-alike copies.
Signals, not verdicts, for edited and AI-made images.
Enhance to see, never to add. Log every setting.
Before you go home · type into Claude Code

Save today's session for case PC-001: update report.md with what we did and found today, list what's left for tomorrow, and make sure logs/commands.md is complete.

DAY 2 · MORNING
04

Hours of footage, minutes of review.

Know exactly what a video file is, pull stills that stand up in court, let the machine find the moments that matter, and cut clips without changing a pixel.

ffprobeDVR exportsStamped stillsMotion searchClean clipsMulti-camera
4.1Inspect

Know the file before you play it.

ffprobe tells you what a video really is: format, resolution, frame rate, length, and when the recorder says it started. Read it before anything else.

Terminal
  • Duration should match what the DVR says was exported. Gaps mean missing footage.
  • Variable frame rate is normal for CCTV. It means frame numbers don't map evenly to seconds.
  • creation_time is usually UTC (the Z). Malaysia is +8 hours.
Type into Claude Code

Run ffprobe on every video in 01_working/cctv and give me one table: file, codec, resolution, frame rate (and whether it varies), duration and creation time in Malaysia time.

4.2Convert

Change the box, not the picture.

DVRs export odd formats (.dav, .h264, .264, .exe players). Often the video inside is ordinary H.264. Remuxing moves it into a normal .mp4 box without re-compressing a single frame.

Preferred

Remux (copy)

Same frames, new container. Quality and timing untouched.

ffmpeg -i CAM02.dav -c copy CAM02.mp4
Only if needed

Re-encode

Decodes and compresses again. Some loss, new file. Use for viewing copies, label it, and keep the remux as the working master.

ffmpeg -i CAM02.dav -c:v libx264 -crf 12 CAM02_view.mp4
Some formats need the maker's own player. If ffmpeg can't read it, say so in the log and use the vendor tool. Ask Claude to compare the frame count of the remux and the original to prove nothing was lost.
4.3Stills

Stills that stand up in court.

A still should say where it came from: which file, which frame, which moment. Burn that into the image, save as lossless PNG, and the exhibit explains itself.

CAM02.mp4 · frame 26 43714:36:05.2 (+08)sha256 5a11…f902
Type into Claude Code

From 01_working/cctv/CAM02.mp4 export PNG stills every 0.5 seconds between 00:36:00 and 00:36:10. Burn in the file name, frame number and timestamp in Malaysia time (apply the clock offset), plus the first 8 characters of the file's SHA-256. Save to 02_exports/stills/.

Keep a clean copy of each still without the burn-in too. The stamp mustn't hide any detail.
4.4Search

Three hours in, five moments out.

A short Python + OpenCV script compares each frame to the background and lists when something moves in the area you care about. You watch those moments, not the whole recording.

14:0014:4515:3016:1517:00
Type into Claude Code

Write scripts/motion.py: find motion in CAM02.mp4 inside the box x 600-1300, y 400-900 (the car park), ignore anything under 2 seconds, and save 02_exports/cam02_events.csv with start, end and a thumbnail per event.

Motion search finds candidates. It misses slow, dark or tiny movement. Spot-check the quiet stretches at speed, and log that you did.
4.5Clips

Clip it cleanly.

A clip for the investigating officer should start a little before and end a little after the event, keep the original quality, and be traceable to its source.

NeedCommand ideaNote
Exact copy of a sectionffmpeg -ss 00:35:50 -to 00:37:30 -i in.mp4 -c copy out.mp4No quality loss; may start at the nearest keyframe, a second or two early
Frame-accurate startffmpeg -ss … -to … -i in.mp4 -c:v libx264 -crf 10 out.mp4Re-encoded at very high quality; label it as such
Slow motion for viewing-vf "setpts=4*PTS"Presentation copy only, never the master
Zoom on an area-vf "crop=640:360:900:420,scale=1280:720:flags=neighbor"Nearest-neighbour shows real pixels; no invented detail
Type into Claude Code

For each event in 02_exports/cam02_events.csv make a clip from 10 seconds before to 10 seconds after, using stream copy. Name each clip with the camera and corrected start time, and add every clip with its SHA-256 to logs/commands.md.

4.6Multi-camera

Several cameras, one clock.

Each recorder has its own wrong clock. Find one shared moment visible on two cameras (a car passing a gate, a light switching on) and line them up from there.

CameraShowsReal timeOffset
CAM01 gate14:31:5214:36:05+4 m 13 s
CAM02 car park14:43:1014:36:05−7 m 05 s
CAM03 lobby06:36:0414:36:05+8 h (UTC)
Type into Claude Code

Using the offsets in logs/clock_offsets.md, make a side-by-side video of CAM01 and CAM02 from 14:35 to 14:38 real time, synced, with each camera's name and corrected time burned in. This is a presentation copy; say so in the file name.

Clocks also drift during long recordings. For hours of footage, check a second shared moment near the end.
LAB 3Hands-on · 90 min

Lab 3: three hours of CCTV.

1 · Inspect every video

Open the session, then let ffprobe tell you what you have.

Type into Claude Code

We're continuing case PC-001; read CLAUDE.md and report.md first. Then give me the ffprobe table for every file in 01_working/cctv.

2 · Make the working master

The kit's recording is a DVR-style .h264 stream. Remux it and prove nothing was lost.

Type into Claude Code

Remux 01_working/cctv/CAM02.h264 to CAM02.mp4 with stream copy, then compare the frame counts of both files and log the result.

3 · Fix the clock

At the start of the recording a phone screen showing the real time is held up to the camera.

Type into Claude Code

Export a still every second for the first 30 seconds of CAM02.mp4 with the frame number and file time burned in. I'll read the phone in the picture and give you the real time.

4 · Let the machine search

Draw the box around the car park, then run the motion script.

Type into Claude Code

Show me one frame from CAM02 with a grid every 100 pixels so I can pick the car park area. Then run scripts/motion.py on that area and list the events in corrected time.

5 · Review it yourself

Watch every event, then spot-check the gaps. Note what you see.

Type into Claude Code

Make a review sheet 02_exports/cam02_review.md with one row per event: corrected time, thumbnail, and an empty "examiner notes" column for me to fill in. Also list the three longest gaps between events so I can spot-check them.

The notes column is yours. Claude doesn't describe people or vehicles.

6 · Export the evidence

Stamped stills and clean clips for the events you marked as relevant.

Type into Claude Code

For the events I marked relevant in cam02_review.md, export stamped PNG stills and stream-copy clips with 10 seconds either side, hash every export and log it all.

Three hours reviewed in well under an hour of your attention, every step on record.
04Recap

Video, under control.

ffprobe first: format, frame rate, length, start time.
Remux, don't re-encode, for the working master.
Stills say where they came from: file, frame, time, hash.
Motion search finds candidates; you review and spot-check.
Stream-copy clips keep quality; label any re-encode.
One shared moment syncs cameras with wrong clocks.
Up next · Chapter 05
Sound, privacy and fakes.
DAY 2 · MIDDAY
05

Words, faces and fakes.

Transcribe speech without it leaving the building, protect bystanders before footage is shared, and know what deepfakes can and can't be caught by.

Offline transcriptsRedactionDeepfakesAI summaries
5.1Audio

Transcripts that stay offline.

Whisper turns speech into text with timestamps, in English, Malay and mixed speech, and it runs entirely on your computer. Slower than the cloud, but nothing leaves.

# 02_exports/audio_0031.srt (draft · not verified) 00:00:04,120 --> 00:00:07,800 Saya dah tunggu kat depan pintu pagar. 00:00:08,300 --> 00:00:11,050 Okay, I'm coming down now, five minutes. 00:00:12,900 --> 00:00:14,400 [inaudible] … bawa kunci.
Type into Claude Code

Install Whisper so it runs offline. Extract the audio from 01_working/audio/REC_0031.m4a to a WAV, transcribe it with the medium model, language auto-detect, and save an .srt and a .txt in 02_exports marked DRAFT. Where the model is unsure, write [inaudible] instead of guessing.

A machine transcript is a draft. A person listens to the whole recording, corrects it, and signs the final version.
5.2Privacy

Redact before you share.

Footage released to the public, the media or another agency should hide bystanders' faces and unrelated plates. AI finds most of them fast; a person checks every frame.

1 · Detect

An OpenCV face detector marks faces in every frame. Plates: a plate detector or boxes you draw.

2 · Cover solidly

Use solid boxes or very heavy pixelation. Light blur can sometimes be partly reversed.

3 · Check every frame

Detectors miss faces turned sideways, small or dark. Review the result frame by frame before release.

Type into Claude Code

Write scripts/redact.py: detect faces in a video with OpenCV, cover each with a solid black box padded 20%, carry boxes across frames so short misses stay covered, and write a contact sheet of every 25th frame so I can check it. Run it on a copy of the clip, never the master.

5.3Synthetic media

Deepfakes: doubt, then check.

Face swaps, cloned voices and fully generated video are now cheap. Expect defendants to claim real footage is fake, and fakes to be presented as real.

Questions to ask

  • Where did it come from? Original device and file beat a social media download.
  • Content Credentials? Check with c2patool. Presence is meaningful; absence isn't.
  • Does the file fit the claimed device? Codec, resolution and metadata as expected?
  • Does physics hold? Lighting, shadows, lip sync, blinking, edges of hair and glasses.

What to do

  • Preserve the original file and its source, hashed, before anyone re-saves it.
  • Detector scores are leads, not findings. Use more than one, offline where possible.
  • Escalate to your specialist lab for a formal authenticity examination.
  • Write what you checked, with "consistent with" wording.
5.4Reporting

When AI writes the summary.

Claude is excellent at turning your log into readable prose. It can also smooth over uncertainty and fill gaps. Give it rules, then check every sentence.

Type into Claude Code

Draft the findings section of report.md using only logs/commands.md, the review sheets and my examiner notes. Every factual sentence must cite the file and time it comes from. Use "consistent with" for anything not certain. Don't describe people or vehicles beyond my own notes. Mark it DRAFT.

  • Only your sources. No outside knowledge, no assumptions.
  • A citation per fact, so you can check each one in seconds.
  • Your observations stay yours. AI may tidy the wording, not add to it.
  • You read it all against the sources before removing DRAFT.
05Recap

Sound, privacy, truth.

Whisper runs offline; its transcript is a draft.
[inaudible], never a guess.
Redact with solid boxes; check every frame.
Deepfakes: provenance first, detectors as leads, escalate.
AI summaries cite sources; you check every sentence.
Release copies are made from copies, never the master.
Up next · Chapter 06
Put it all together: the full case.
DAY 2 · AFTERNOON
06

The full case.

Everything at once: open, process, review, report and prove the originals never changed. Then a checklist to take back to your unit.

CapstoneThe reportFinal verificationTroubleshootingChecklist
LAB 4Capstone · 2 h

Lab 4: your case, start to finish.

1 · The brief

A second practice case, PC-002: a phone's photos, two CCTV cameras with different clock errors and one voice note. Question from the investigating officer: "Was the white van at the loading bay between 21:00 and 22:00, and who else was there?"

Work in pairs. One drives the keyboard, one checks every command before Yes. Swap at each step.

2 · Open the case

Same as Lab 1, faster. You know the steps now.

Type into Claude Code

Open case PC-002 the standard way: folder structure, CLAUDE.md, deny rule, copy evidence in, manifest, read-only, verified working copies, tools.md. Log every step.

3 · Photos

Timeline with corrected clocks, map, duplicates and red flags.

Type into Claude Code

Build the photo timeline for PC-002 with corrected time, list duplicates and editing signals, and show me only the photos between 20:45 and 22:15.

4 · Video

Sync both cameras, search the loading bay, review, export.

Type into Claude Code

Inspect both cameras, work out their offsets from the shared moment I give you, run motion search on the loading bay area between 21:00 and 22:00 real time, and make a review sheet for me.

5 · Audio

Offline draft transcript of the voice note, then you correct it.

Type into Claude Code

Transcribe the voice note offline with timestamps, mark unclear parts [inaudible], and save it as a DRAFT .srt and .txt.

6 · Report and verify

Draft from the log, check every sentence, then prove the originals never changed.

Type into Claude Code

Draft report.md for PC-002 from the logs and my notes using our report template, then re-hash 00_original against logs/manifest.txt and add the verification result to the report.

Present your answer to the officer's question in two minutes, citing your exhibits.
6.1Report

A report anyone can repeat.

Another examiner, given your report and the originals, should reach the same results. Claude drafts each section from your log; you own every word.

# report.md · PC-002 1. Requestwho asked what, when 2. Items receivedexhibits, hashes from manifest.txt 3. Toolsfrom tools.md, incl. Claude Code 4. Methodsteps in order, from commands.md 5. Clock correctionsoffsets and how found 6. Findingsyour observations, cited 7. Limitationswhat couldn't be determined 8. Exhibits producedstills, clips, sheets + hashes 9. Verificationfinal re-hash result 10. Examinername, date, signature
  • State AI use plainly: "Commands were written and run with Claude Code under the examiner's supervision. All findings were verified by the examiner."
  • Limitations matter: resolution too low to read a plate is a finding, not a failure.
  • Follow your agency's format and the rules on computer-produced documents (in Malaysia, Evidence Act 1950, s.90A).
6.2Verification

Prove nothing changed.

The last step of every case. One command re-fingerprints every original and compares it with the manifest from day one. Every line must say OK.

Claude Code
Windows: ask Claude for the PowerShell version. It compares Get-FileHash results with the manifest the same way.
Anything not OK? Stop. Don't fix it quietly. Record it, find out why from the log, and report it.
6.3Troubleshooting

When things go wrong.

They will. Almost every problem has a one-sentence fix: describe what you see and paste the error.

You seeLikely causeSay to Claude
"command not found: ffmpeg"Not installed, or not on PATH"Install ffmpeg and make sure the terminal can find it."
"Invalid data found when processing input"Proprietary DVR format"Identify this file's real format. If ffmpeg can't read it, tell me which player I need."
"Permission denied" in 00_originalYour lock is workingNothing. Work in 01_working.
Times are 8 hours outUTC vs Malaysia time"Convert all times to +08:00 and show both."
Motion script finds hundreds of eventsTrees, rain, headlights"Raise the threshold, shrink the area, ignore events under 3 seconds."
Whisper is very slowBig model on a laptop"Use the small model for a first pass, then medium on the parts that matter."
6.4Take it home

Your forensic AI checklist.

Ten ticks for every case. Click them here to practise; print it for the unit.

Course complete
Faster, and
still certain.

You can now let AI do the hours of sorting, searching and paperwork, while you keep what matters: the evidence untouched, every step on record, and every conclusion your own.

Click anywhere to celebrate

The end · back to the unit

Thank you.

Start small. Take one real, routine task back with you, maybe the photo timeline or the CCTV event list, and do it this way on your next case.

Share your prompts and scripts with your team, agree on one case-folder shape, and keep improving the checklist together. Good habits spread faster than tools.

The technology will keep changing. The principles won't: preserve, document, verify, and let people decide.

AI for Visual & Video Forensics · Todak Academy