Open Source Intelligence Techniques

OSINT Techniques: Chapter 15 - Video Analysis & Forensics

An exhaustive breakdown of Chapter 15 of Michael Bazzell's 'Open Source Intelligence Techniques', analyzing video container forensics, FFmpeg keyframe extraction, yt-dlp metadata mining, and Electrical Network Frequency (ENF) chronolocation.

8 min read
views
visits
OSINT Techniques Chapter 15 Summary - Video Analysis & Forensics
OSINT Techniques Chapter 15 Summary - Video Analysis & Forensics

Welcome to our fifteenth chapter analysis covering “Open Source Intelligence Techniques: Resources for Searching and Analyzing Online Information” (Sixth Edition) by Michael Bazzell.

Video content has become the predominant medium of the internet. From TikTok clips and YouTube documentaries to surveillance camera feeds, combat bodycam recordings, and corporate livestream announcements, video delivers a high-density stream of audio-visual evidence. However, analyzing video is technically complex: video is not a single file, but a time-synchronized container multiplexing compressed video streams, multi-channel audio tracks, subtitles, and internal telemetry metadata.

In Chapter 15: Video Analysis & Forensics, Bazzell establishes the engineering discipline of video intelligence. An investigator does not merely watch a video at 1x speed; they dissect container atoms, extract scene-change keyframes via FFmpeg, mine raw streaming server JSON headers via yt-dlp, and calculate exact recording timestamps using audio Electrical Network Frequency (ENF) grid forensics. In this comprehensive guide, we dissect video forensic toolchains and chronolocation tradecraft.


Key Takeaways

  • The Architecture of Video Containers: Video files (.mp4, .mkv, .mov) are structured containers. In MP4 files, metadata resides within the moov atom (Movie Box), while raw compressed audio/video frames reside within the mdat atom (Media Data Box).
  • Automated Keyframe Extraction via FFmpeg: Rather than manually scrubbing through hours of footage, analysts use FFmpeg to automatically detect scene changes (I-frames) and output high-resolution still images for automated reverse image search pipelines.
  • Streaming Server Metadata Exfiltration (yt-dlp): Web video portals (YouTube, Vimeo, TikTok) display simplified upload dates, but querying raw video streams via yt-dlp reveals exact UTC upload seconds, uploader account IDs, video resolutions, and available subtitles.
  • Electrical Network Frequency (ENF) Forensics: Electrical power grids oscillate at a nominal 50Hz (Europe, Asia, Africa) or 60Hz (Americas). Due to real-time grid load variations, the frequency fluctuates slightly every second. Comparing the background electrical hum in an audio recording against historic national grid frequency logs proves the exact time and date of recording to within seconds.

Architectural & Investigative Workflow

The following flowchart outlines the video forensic ingestion, extraction, and chronolocation pipeline:

flowchart TD
    subgraph Video_Ingestion["Phase 1: Stream Extraction & Container Ingestion"]
        VideoURL["Target Video URL (YouTube / TikTok / LiveStream)"] --> YtDlp["yt-dlp Stream Mining (--dump-json / -f bestvideo)"]
        YtDlp --> Container["Raw MP4/MKV Asset & Full Metadata JSON"]
    end
    subgraph Stream_Deconstruction["Phase 2: FFmpeg Scene-Cut & Keyframe Extraction"]
        Container --> FFmpeg["FFmpeg Scene-Detection Filter (gt(scene,0.3))"]
        FFmpeg --> Keyframes["Extracted High-Res I-Frames (PNG Directory)"]
        Container --> AudioTrack["FFmpeg Audio Stream Demuxing (WAV Extraction)"]
    end
    subgraph Visual_Audio_Forensics["Phase 3: Visual & Acoustical Analysis"]
        Keyframes --> ReverseSearch["Automated Reverse Image & Landmark Geolocation"]
        AudioTrack --> Spectrogram["Sonic Visualiser / Audacity Spectrogram Analysis"]
        AudioTrack --> ENF["Electrical Network Frequency (50Hz / 60Hz Hum Correlation)"]
    end
    subgraph Verification["Phase 4: Synthesis & Chronolocation"]
        ReverseSearch --> VerifiedReport["Confirmed Location, Timestamp & Authenticity"]
        Spectrogram --> VerifiedReport
        ENF --> VerifiedReport
    end

Technical Breakdown & Investigative Mechanics

1. Advanced Video Stream Exfiltration via yt-dlp

Commercial browser video downloaders frequently re-encode video, destroying original metadata. yt-dlp is the preeminent command-line tool for exfiltrating untouched original streams:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Dump complete raw JSON metadata without downloading the video file
yt-dlp --dump-json "https://www.youtube.com/watch?v=TARGET_ID" > video_metadata.json

# Parse critical forensic attributes via jq
cat video_metadata.json | jq '{
    id: .id,
    title: .title,
    uploader: .uploader,
    uploader_id: .uploader_id,
    upload_date: .upload_date,
    timestamp: .timestamp,
    fps: .fps,
    resolution: .resolution
}'

Downloading the Highest-Quality Untouched Stream:

1
2
# Download best video and best audio merged into an MKV container
yt-dlp -f "bestvideo+bestaudio/best" --merge-output-format mkv "https://www.youtube.com/watch?v=TARGET_ID"

2. Automated Scene-Change Keyframe Extraction via FFmpeg

When analyzing a 2-hour surveillance or propaganda video, manual screenshotting is inefficient. FFmpeg allows automated extraction of all distinct scene transitions:

1
2
3
# Detect scene changes where visual variance exceeds 30% (0.3)
# and output uncompressed PNG stills with timestamps
ffmpeg -i target_video.mp4        -vf "select='gt(scene,0.3)',showinfo"        -vsync vfr        -frame_pts 1        keyframes/scene_%04d.png

Why Scene-Cut Extraction is Crucial:

  • Generates pristine, unblurred still frames captured at the exact beginning of each camera cut.
  • The extracted PNG frames can be ingested immediately into batch reverse image search scripts (Google Lens, Yandex) to locate original filming locations.

3. Acoustic Forensics & Speed-of-Sound Blast Distance Calculation

In tactical or crisis video analysis (e.g., artillery strikes, explosions, gunfire), audio and video travel at vastly different speeds:

  • Speed of Light: $\approx 300,000\text{ km/s}$ (observed flash is effectively instantaneous).
  • Speed of Sound in Air: $\approx 343\text{ m/s}$ at $20^\circ\text{C}$.
1
Distance to Explosion (Meters) = Delta Time (Seconds between Flash and Bang) * 343

Step-by-Step Distance Calculation in Audacity:

  1. Demux audio from video using FFmpeg:
    1
    
    ffmpeg -i target_video.mp4 -vn -acodec pcm_s16le -ar 44100 audio_track.wav
    
  2. Open audio_track.wav in Audacity or Sonic Visualiser.
  3. Identify the exact video frame where the optical flash occurs (Time $T_0$).
  4. Locate the sharp acoustic pressure spike in the waveform where the explosion sound wave impacts the microphone (Time $T_1$).
  5. Calculate $\Delta T = T_1 - T_0$. If $\Delta T = 4.2\text{ seconds}$, the explosion occurred exactly $4.2 \times 343 = 1,440.6\text{ meters}$ (1.44km) from the camera.

4. Electrical Network Frequency (ENF) Chronolocation

Electrical Network Frequency (ENF) is one of the most sophisticated forensic techniques in modern digital media authentication:

graph LR
    Grid["National Electrical Grid (Nominal 50Hz/60Hz)"] --> SubtleFlux["Continuous Micro-Fluctuations due to Power Demand"]
    SubtleFlux --> HistoricLog["Government / Utility Power Grid Frequency Database"]
    Recording["Video/Audio Recorded Indoors"] --> Mic["Microphone Picks Up Electromagnetic / Acoustic 50Hz Hum"]
    Mic --> ExtractedENF["Extract ENF Curve via Spectrogram Bandpass Filter"]
    ExtractedENF --> CrossCorrelate["Cross-Correlate with Historic Power Grid Database"]
    CrossCorrelate --> ProvenDate["Exact Date & Minute of Recording Proven!"]

How ENF Defeats Disinformation:

  • If a political candidate claims an incriminating audio recording was recorded in 2021, but the extracted ENF hum matches the unique power grid frequency curve of October 14, 2024 at 14:12 UTC, the candidate’s alibi is mathematically dismantled.

Real-World Case Scenario

Case Study: Debunking a Fabricated Chemical Leak Announcement

An adversary published a dramatic video showing toxic smoke billowing from an industrial facility, claiming that a massive chemical leak had occurred two hours earlier in Frankfurt, Germany.

An OSINT team executed immediate video forensics:

  1. Running FFmpeg scene-detection extracted 35 keyframes.
  2. The analyst fed a high-resolution keyframe showing the facility’s unique flare stack into Yandex Visual Search.
  3. Yandex returned a news article from 2017: the video was historical footage of a controlled flare burn at an oil refinery in Texas, not Frankfurt.
  4. The audio track was demuxed and analyzed in Sonic Visualiser: the background electrical hum was a steady 60Hz (North American standard), completely refuting the claim that the event took place in Europe (50Hz grid).

Defensive Countermeasures & OpSec Recommendations

For corporate media departments, whistleblowers, and privacy-conscious users:

  1. Re-Encode Videos Prior to Public Release: Re-encode video through an aggressive FFmpeg filter (ffmpeg -i input.mp4 -c:v libx264 -crf 23 -an output.mp4) to permanently purge internal container atoms and device serial numbers.
  2. Apply Notch Filters to Audio: When releasing sensitive voice recordings, apply a sharp digital notch filter at 50Hz and 60Hz (and their harmonics at 100Hz, 120Hz) to eliminate ENF hum, preventing chronolocation.
  3. Conceal Visible Clock Displays & Flight Contrails: Blur background television screens, wall clocks, and high-altitude airplane contrails in videos to deny analysts chronolocation anchors.

Conclusion & Next Steps

Chapter 15 demonstrates that video files are dynamic evidentiary records. By decomposing containers into keyframes, calculating acoustic blast deltas, and analyzing electrical network frequencies, an investigator can authenticate or debunk video evidence with mathematical certainty.

In Chapter 16: Domain Names & DNS, we return to network infrastructure: historical WHOIS mining, Certificate Transparency logs, and scalable subdomain enumeration pipelines.


Practical Video Container Forensics & Keyframe Triage Cheat-Sheet

Operation / Vector Command / Syntax Example Analytical Purpose
Automated Keyframe Extraction ffmpeg -i input.mp4 -vf 'select=gt(scene\,0.4)' -vsync vfr frames/f_%04d.png Extracts high-resolution still images on scene changes for automated reverse image search
Streaming Metadata Dump yt-dlp --dump-json 'VIDEO_URL' | jq '{date: .upload_date, uploader: .uploader_id}' Extracts true upload timestamp (UTC), uploader ID, tags, and internal stream resolutions
Isolate Audio for ENF ffmpeg -i input.mp4 -vn -af 'bandpass=f=50:width_type=h:w=2' enf_audio.wav Filters background 50Hz / 60Hz power grid hum for frequency chronolocation matching
Inspect Container Atom Hierarchy atomicparsley input.mp4 -t Dumps MP4 container atom tree (moov, trak, mdat) to identify spliced or edited headers
Extract Subtitle Telemetry ffmpeg -i input.mp4 -map 0:s:0 telemetry.srt Extracts GPS and sensor telemetry embedded into drone or bodycam subtitle channels

Authoritative References & Verified Investigative Sources


Author: Abdulrahman M. Fathi (0x3bdo) • Cyber Security Engineer & Penetration Tester

Open Research & Community Labs
صدقة جارية • Ongoing Charity

Empowering the Cybersecurity Community

All research, lab walkthroughs, and technical series on this platform remain 100% free. You can support server hosting, research environments, and lab infrastructure.

Support & Wall of Honor
اللهم اجعل هذا العمل علمًا نافعًا وصدقةً جارية، واكتب لي به الأجر والقبول، وانفع به كل من قرأه أو تعلّمه.
اللهم احفظ لي والديّ وأهلي، وبارك في أعمارهم وصحتهم، وأدم عليهم نعمة الصحة والعافية، ولا تريني فيهم بأسًا يبكيني.
Dedicated as ongoing charity and beneficial knowledge. May Allah bless my parents and family, protect them, and grant them lasting health and happiness.