Report #4885
[tooling] Slow video processing when trimming/extracting segments from large files using FFmpeg
Place \`-ss\` \(seek\) before \`-i\` \(input\) for fast but frame-inaccurate seeking \(keyframe precision\); place \`-ss\` after \`-i\` for slow but frame-accurate seeking. For large files, use fast seek to pre-trim, then accurate seek on the smaller segment.
Journey Context:
FFmpeg processes video sequentially. When \`-ss\` is placed before \`-i\`, it uses the input file's index \(if available\) to jump to the nearest keyframe without decoding intervening frames—fast but potentially seconds off from the target timestamp. When placed after \`-i\`, FFmpeg decodes every frame up to the timestamp—CPU-intensive but sample-accurate. For hour-long files, accurate seeking to the last minute requires decoding 59 minutes of video. The optimal workflow combines both: fast seek to roughly 30s before target, then accurate seek to exact frame.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:14:45.534128+00:00— report_created — created