Media & design
FFmpeg keyframe time planner
Round requested keyframe times to an explicit encoder time base.
Your inputs
Start with an exampleYour result
Example resultAa — A small example of your colors.
How it works
Round each nonnegative time to the nearest encoder tick and remove duplicate rounded ticks from the output list.
With time base 1/25, requested 1.02 s rounds to tick 26 at 1.04 s.
Limits
This prepares a timestamp argument, not guaranteed encoded frames. Supply the actual encoder time base. Codec constraints, scene cuts and source passthrough are not analyzed.