Skip to content

Main content

Broadcast Boundary Frame Rounding Gap Tool

Quantize one elapsed interval to a frame grid under explicit floor, ceil or nearest-half-up rounding.

Loading tool…

Description

Multiply endSeconds - startSeconds by framesPerSecond, round its frame count using floor, ceil, or nearest, and divide back to seconds.

Frame intervals distinguish inclusive frame labels from counts between boundaries. Transition sharing and rounding a duration can differ from rounding each endpoint independently.

Multiply endSeconds - startSeconds by framesPerSecond, round its frame count using floor, ceil, or nearest, and divide back to seconds.

When to use this tool

Use Broadcast Boundary Frame Rounding Gap when you need an explicit frame-boundary or duration-accounting step.

How to use the tool and how it works

  1. Enter startSeconds, endSeconds, framesPerSecond, mode. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read roundedDuration, gapSeconds. Use the output convention below.

Multiply endSeconds - startSeconds by framesPerSecond, round its frame count using floor, ceil, or nearest, and divide back to seconds. Return rounded minus original duration as gapSeconds.1

Input fieldMeaning and unitsAccepted input
startSecondsStart SecondsRequired. Finite number.
endSecondsEnd SecondsRequired. Finite number.
framesPerSecondFrames Per SecondRequired. Finite number; strictly above 0.
modeModeRequired. Text; one of "floor", "ceil", "nearest"; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
roundedDurationRounded DurationRequired. Finite number.
gapSecondsGap SecondsRequired. Finite number.
json
{
  "input": {
    "startSeconds": 0,
    "endSeconds": 1.25,
    "framesPerSecond": 2,
    "mode": "floor"
  },
  "output": {
    "roundedDuration": 1,
    "gapSeconds": -0.25
  }
}

Limitations and assumptions

  • This rounds the duration rather than its two endpoints independently; nearest uses half-up rounding for nonnegative durations and no timecode parsing is done.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use a consistent frame rate and timecode convention and inspect actual edit boundaries when frame accuracy matters.

References

  1. Calculation and input contract: media-studies/broadcast-boundary-frame-rounding-gap — tool.io

Similar or alternative tools

  • Shot Transition Frame Boundary

    Subtract lastFirstShot and one from firstSecondShot, then subtract transitionFrames and add sharedFrames for unassignedGap.

  • Shot Change Frame Gap

    Return nextFirstFrame - previousLastFrame as frameGap and max(0, frameGap - 1) as omittedFrames.