Perform Input vs Output seeking
mainSeeking determines how FFmpeg finds the timestamp you want to start at.
Input Seeking (-ss before -i)
- Usage:
ffmpeg -ss [time] -i input.mp4 ... - Pros: Extremely fast; it jumps to the nearest keyframe.
- Cons: Less accurate; it may not land exactly on the requested timestamp.
Output Seeking (-ss after -i)
- Usage:
ffmpeg -i input.mp4 -ss [time] ... - Pros: Frame-accurate; it decodes and discards frames until it reaches the exact timestamp.
- Cons: Slower, as it must decode the preceding frames.
Critical Advice for Trimming: When trimming, it is advised to use output seeking and re-encode the video (do NOT use -c:v copy). Using -c:v copy with seeking can result in black frames or errors because the stream copy might miss the necessary keyframe data required to render the frames immediately following the seek point.