Dev.to
7/25/2026

Fixing timestamp loss in video keyframe extraction pipelines for LLM analysis
Original: 1,377 frames in, 60 out, and none of them knew what time it was
Short summary
A video-to-LLM pipeline was losing timestamp data during keyframe extraction — ffmpeg extraction, dedup, thinning, and renaming each discarded position info, leaving the LLM unable to cite when a slide appeared. The fix uses ffmpeg's showinfo filter to capture real presentation timestamps (PTS) at extraction time, threads them through every processing stage, and writes them to frames.json. When timestamp and file counts disagree, the tool emits nothing rather than a plausible-but-wrong number.
- •Frame extraction pipelines lose timestamp data through dedup, thinning, and renaming stages
- •ffmpeg's showinfo filter provides true PTS on the same select pass — no second decode needed
- •Emit nothing when uncertain: a wrong timestamp is worse than a missing one for LLM evidence pipelines
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



