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
| Symbol | Meaning | Unit |
|---|---|---|
n | GOP length in frames | — |
fps | Frames per second | — |
m | B-frames between references | — |
mn | How long | min |
sg | Segment length for streaming | s |
GD | How long one GOP lasts | s |
KM | Keyframes a minute | — |
KT | Keyframes in the whole file | — |
NP | P-frames in a GOP | — |
NB | B-frames in a GOP | — |
PC | Share of the GOP that is B-frames | % |
GS | GOPs in one segment | — |
AL | Does the segment line up? | — |
SF | How coarse seeking will be | s |
TF | Frames 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.