Take the State of DFIR Survey Caseloads, AI, tools and careers. 8 minutes, anonymous, early access to the report. Take the survey ›

Take the survey

Take the State of DFIR Survey

Caseloads, AI, tools and careers. 8 minutes, anonymous, early access to the report.

Take the survey →
FFmpeg frame extrac...
 
Notifications
Clear all

FFmpeg frame extraction on VFR CCTV clips: watch out for default frame duplication

1 Posts
1 Users
0 Reactions
8 Views
(@stone770514)
New Member
Joined: 2 days ago
Posts: 1
Topic starter   [#20861]

Sharing a small practical gotcha we keep running into when inspecting CCTV/DVR exports with FFmpeg.

Many security camera exports are variable frame rate (VFR) or have timestamp gaps from motion-triggered recording, network drops, or quirky DVR muxers. If you extract stills with the usual command:

ffmpeg -i clip.mp4 frame_%06d.png

FFmpeg defaults to constant frame rate (CFR) output for image sequences and will silently duplicate frames to fill timestamp gaps. On a quick test clip with 21 actual coded frames and a 1-second gap, the default command wrote 30 PNGs (9 duplicated frames that were never in the stream). In casework, treating those synthetic copies as distinct frames can skew frame counts and timing estimates.

To extract only the frames actually stored in the bitstream, pass -fps_mode passthrough:

ffmpeg -i clip.mp4 -fps_mode passthrough frame_%06d.png

Two other habits that help when cross-checking timing against a burned-in OSD clock:
- Dump per-frame container PTS and frame type alongside the stills so gaps and frame order are obvious:
ffprobe -v error -select_streams v:0 -show_entries frame=pts_time,pict_type -of csv=p=0 clip.mp4
- When stepping through slightly damaged streams for repeatable comparison, add -threads 1 so multithreaded decode buffering doesn't shift error handling between runs.

Curious what other FFmpeg / ffprobe checks folks here keep in their standard workflow when dealing with non-standard DVR exports.



   
Quote

Enterprise Partners

  • MagnetForensics_ForensicFocus
  • celebrite-logo
  • atola-logo
  • semantics21 2026 FF logo

Partners

  • Aid4Mail-Logo
  • Logo_MSAB_Black (2)
  • detego-logo
  • logo Belkasoft 135x100
  • gmdsoft-logo
  • ADF

Academic Partners

  • University of Southampton logo 2
Share: