FFmpeg Input Seeking vs Output Seeking

In FFmpeg, the placement of the -ss (seek) parameter relative to the -i (input) parameter drastically changes how a media file is processed. This article explains the core differences between input seeking (-ss before -i) and output seeking (-ss after -i), comparing their speed, accuracy, and resource usage to help you choose the right approach for your media processing workflows.

Input Seeking (-ss before -i)

When you place the -ss option before the -i option, FFmpeg performs “input seeking.”

ffmpeg -ss 00:02:30 -i input.mp4 output.mp4

In this mode, FFmpeg uses the container’s demuxer to jump directly to the specified timestamp before it starts decoding the file.

Output Seeking (-ss after -i)

When you place the -ss option after the -i option, FFmpeg performs “output seeking.”

ffmpeg -i input.mp4 -ss 00:02:30 output.mp4

In this mode, FFmpeg reads and decodes the entire input file from the very beginning, discarding all decoded frames until it reaches the specified timestamp. Only the frames after the timestamp are sent to the output writer.

Key Differences at a Glance

Feature Input Seeking (-ss before -i) Output Seeking (-ss after -i)
Processing Method Jumps directly to the timestamp using file headers. Decodes and discards all preceding frames.
Speed Fast (milliseconds). Slow (depends on timestamp depth).
CPU Usage Minimal. High.
Accuracy Generally accurate, but can occasionally misalign on stream copies. Exact frame accuracy.

Which One Should You Use?

For most everyday tasks, input seeking (-ss before -i) is the preferred method because of its superior speed. It is especially critical when dealing with large high-definition video files where decoding hours of footage just to extract a clip is highly inefficient.

You should only opt for output seeking (-ss after -i) if you require absolute frame-by-frame precision, or if you are experiencing audio-video synchronization issues at the beginning of your output clip when using input seeking.