Menu

Post image 1
Post image 2
1 / 2
0

FFmpeg -ss, -t, and -to Flags: Input vs Output Seeking

DEV Community·Javid Jamae·22 days ago
#dioNGp2c
#ffmpeg#cli#tutorial#output#input#seeking
Reading 0:00
15s threshold

Originally published at ffmpeg-micro.com Trimming video with FFmpeg looks simple until your 5-second clip comes out as 7 seconds. Or your output starts a few frames late. The culprit is almost always flag order: where you put -ss relative to -i completely changes how FFmpeg processes the seek. This post covers what -ss , -t , and -to do, why their placement matters, and when to use each combination. What -ss, -t, and -to Actually Do Three flags control timing in FFmpeg: -ss sets the start position (the seek point) -t sets the duration of the output -to sets the end timestamp -t and -to are mutually exclusive. If you use both, -t wins and -to gets ignored silently. The critical distinction is where you place -ss : before -i (input seeking) or after -i (output seeking). The two produce different results with different tradeoffs. Input Seeking: Fast but Imprecise Place -ss before -i and FFmpeg jumps directly to the nearest keyframe at or before your timestamp. It doesn't decode anything before that point.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More