Paritian

Developers

GOP and Keyframe Interval Calculator

GOP duration in seconds, keyframes per minute, the I, P and B counts inside a GOP, and whether it lines up with the segment length.

Results

How long one GOP lasts 2.0000 s
Keyframes a minute 30.000
Keyframes in the whole file 900
P-frames in a GOP 15
B-frames in a GOP 34
Share of the GOP that is B-frames 68.00 %
GOPs in one segment 3.000
Does the segment line up? Yes
How coarse seeking will be 2.0000 s
Frames in total 45,000

What this tool does

A group of pictures starts with one complete frame and fills the rest with descriptions of what changed. Longer groups compress better and make seeking coarser, because a player can only jump to a complete frame. For streaming there is a harder constraint: the segment length has to be a whole number of groups, or every segment starts in the middle of one. The page checks that alignment, which is the mistake that costs the most and shows the least.

Formula

GOP duration = N ÷ fps · keyframes per minute = 60 fps ÷ N · P = N ÷ (M + 1) − 1 · B = N − 1 − P

Variables

SymbolMeaningUnit
nGOP length in frames
fpsFrames per second
mB-frames between references
mnHow longmin
sgSegment length for streamings
GDHow long one GOP lastss
KMKeyframes a minute
KTKeyframes in the whole file
NPP-frames in a GOP
NBB-frames in a GOP
PCShare of the GOP that is B-frames%
GSGOPs in one segment
ALDoes the segment line up?
SFHow coarse seeking will bes
TFFrames in total

Worked example

  • GOP length in frames50
  • Frames per second25
  • B-frames between references2
  • How long30 min
  • Segment length for streaming6 s
  • How long one GOP lasts2.0000 s
  • Keyframes a minute30.000
  • Keyframes in the whole file900
  • P-frames in a GOP15
  • B-frames in a GOP34
  • Share of the GOP that is B-frames68.00 %
  • GOPs in one segment3.000
  • Does the segment line up?Yes
  • How coarse seeking will be2.0000 s
  • Frames in total45,000

Limitations

  • The result is an estimate based only on the values you type. Real situations often include factors this calculator does not know about.
  • The calculation runs at full precision and only the display is rounded. If you copy an intermediate value and retype it, small differences can appear.