B-frame
A B-frame (bidirectional predicted frame) is a compressed video frame that can borrow picture information from both earlier and later frames. Using two directions lets B-frames achieve the best compression of any frame type. The encoder must send frames out of display order so the later reference arrives first. B-frames add a small amount of encoding and decoding delay.
Why it matters
B-frames cut file sizes further than any other frame type, lowering storage and delivery bills for on-demand libraries. The cost is extra encoding delay and decoding work. For interactive live video, that delay can matter more than the savings, so the right choice depends on the product.
How it works
- The encoder holds back a few frames so it can see what comes after the current one.
- It codes the later reference frame first, then codes the B-frame between the two references.
- Each block can be predicted from the earlier frame, the later frame or an average of both.
- The player decodes frames in coded order, then reorders them back into display order before showing them.
Should I turn off B-frames for live streaming?
Usually no, unless you need very low delay. Most live streaming setups keep a small number of B-frames because they improve quality at the same bitrate. YouTube Live's recommended settings list 2 B-frames. Turn them off for video calls, cloud gaming or real-time interaction, where every frame of delay counts.
How many B-frames should I use?
Two to three consecutive B-frames is a common, safe setting for streaming. YouTube's upload guidance recommends 2 consecutive B-frames. More B-frames can save bits on calm content but add encoding time and delay, and some older hardware decoders handle long B-frame runs poorly.
Where it's used
On-demand video platforms and OTT services use B-frames to shrink files without visible quality loss. Interactive live streams and video call apps often switch them off because they add delay.
By the numbers
- YouTube's recommended upload encoding settings list 2 consecutive B frames. (YouTube Help: Recommended upload encoding settings)
- YouTube Live's recommended encoder settings list 2 B-frames and 1 reference frame. (YouTube Help: Choose live encoder settings, bitrates, and resolutions)


