Skip to content

Why did my one-second FFmpeg trim still start with a timestamp of one second?

The trim filter chooses which video frames to keep. It does not alone reset their presentation timestamps. Use a deliberate timestamp reset for a new zero-based clip and align audio deliberately if it is included.

NATIVE SOUNDTRACK AND MEDIA FINISHINGAISwapLab team · Editorial methodPublished 2 min read
See the recorded exampleExplore 67 Image SkillsIndependent finishing · Check the actual file

Check at the filter output

Measure retained frames and the first PTS. Avoid inferring that the source frames changed from a timing label alone.

Use the destination clock

Choose retained source time for a linked editorial note or zero for an independent excerpt as required. Preserve any required relative audio offset during processing.

Example

In a synthetic 24 FPS clip retained between seconds 1 and 2, trim kept 24 frames. Resetting PTS changed the first timestamp from 1 to 0 without changing their checksums.

Pass condition

The excerpt contains the required frames and uses the clock expected in the next tool.

Sources

Review the result in context.

Compare the recorded example and its documented limitations.

See the recorded example