Applies to: FFmpeg project current online manuals read 2026-11-08; generated documentation may be newer than an installed package; check local build options
The useful distinctions
- Input seeking can land before the requested time.
- Default accurate seeking during transcoding discards the leading decoded segment.
- Streamcopy can retain that leading segment.
Choose the boundary you need
A review excerpt often needs to begin just before a visible action rather than at the nearest convenient compressed-data boundary. Write down that action and the intended duration before choosing a command. If the first movement is the important evidence, a slightly earlier or later start can make the excerpt misleading even when the rest of the clip looks normal.
Accept the encoding tradeoff deliberately
The example requests a short excerpt and uses ordinary encoding selections rather than copying the original compressed packets. These encoders must exist in your own build. Treat the resulting file as a review derivative and retain the source. A fresh encode can change visual or audio characteristics, so the excerpt should not become the sole evidence for a subtle source-quality comparison.
Inspect the actual result
Check the first visible action, the end of the passage and the presence of the intended audio. Do not infer precision solely from the timestamp written in the command. A source with unusual timing still deserves inspection. Record the command and installed version with the derivative so another person can understand the processing choice. If the boundary is wrong, investigate timing evidence before trying a series of unexplained offset adjustments.
A focused way to proceed
- Choose the intended start and excerpt duration.
- Select encoders available in the installed build.
- Place the seek before the input and the duration before a new output filename.
- Review the first action and final duration in the produced excerpt.
Worked example · synthetic
ffmpeg -ss 00:00:18 -i workshop-demo.mp4 -t 12 -map 0:v:0 -map 0:a:0 -c:v libx264 -c:a aac workshop-excerpt.mp4Read the comparison
The command requests a precise transcoded excerpt; visual verification of the actual boundary remains necessary.
When to stop or ask for help
For unexplained timing discrepancies, preserve source timing information and the complete command output.