Codec-guided Selection Cheaply Removes Redundant Frames for Video LMMs

1 University of Trento 2 Google 3 Fondazione Bruno Kessler 4 Technical University of Munich
† Work done as a Student Researcher at Google. Now at Focoos AI. ‡ Now at Prometheus.
Embedding-based selection compared with CodecSelect

Moving frame selection into the video decoder. Top: embedding-based selectors encode all N candidate frames with a vision backbone, then search over them. Bottom: CodecSelect uses no neural network. It reads two signals the decoder already computes from the bitstream, the residual energy ER and the intra-block ratio EI, and keeps a frame once they show enough change or enough time has passed.

Abstract

For temporal reasoning over videos, Large Multimodal Models (LMMs) commonly rely on dense sampling at a fixed frame rate. Consecutive frames are often nearly identical, yet each sampled frame adds visual tokens that the LMM must encode and attend to. While embedding-based selectors drop these redundant frames, they must first process every candidate frame with a vision backbone, reducing or even undoing the time saved in the LMM. In this work, we posit that selection should take place before the LMM or any other model processes the video, i.e., at decoding time. We propose CodecSelect, a training-free method that exploits, during decoding, two signals already stored in the compressed bitstream: residual energy and intra-block ratio. Used as proxies for visual novelty, they mark the changes the encoder already found, so CodecSelect keeps more frames where the content changes and fewer where it is static. This costs under 1.5% of the total time per query. Across four LMMs and three temporal reasoning benchmarks, CodecSelect matches the accuracy of dense sampling while keeping 64% of the frames and reducing latency per query by 36%. On two long-video benchmarks, where embedding-based selectors are slower than dense sampling, it answers 14 to 16% faster with comparable accuracy.

Method overview

Overview of CodecSelect

Every pipeline decodes the bitstream. While it parses, CodecSelect reads the prediction modes, which give the intra-block ratio EI (intra-coded blocks in red), and the dequantized coefficients, which give the residual energy ER, and combines them into the novelty score st. A grid frame is kept (green) when the evidence since the last kept frame, elapsed time (grey) plus codec evidence (amber), reaches the threshold θ (here 1 s). Only the kept frames reach the LMM.

What each signal captures

Legend
Redundant frame
Redundant frame
ER = 0.00, EI = 0.00
Temporal discontinuity
Temporal discontinuity
ER = 1.00, EI = 1.00
Spatial novelty
Spatial novelty
ER = 0.02, EI = 0.41

Frames t−2 to t, with the intra-coded blocks (EI) and the residual energy per block (ER) of frame t. Left: predictable motion leaves almost no intra blocks or residual. Middle: a cut starts a new keyframe, so all blocks are intra and the residual is the largest of the video. Right: a new scene enters from the left. It is coded intra (EI rises), but well predicted within the frame (ER stays low).

Results

Accuracy against latency

Accuracy vs latency, averaged over four LMMs and three temporal reasoning benchmarks, with latency relative to dense sampling. CodecSelect matches the accuracy of dense sampling while keeping 64% of the frames and reducing latency per query by 36%. On two long-video benchmarks, where embedding-based selectors are slower than dense sampling, CodecSelect answers 14 to 16% faster with comparable accuracy.

Selection time against video length

Selection cost grows with video length. Median selection time per video and interquartile band (8,230 videos), with the signal export included for CodecSelect.

Qualitative Results

For each video, all frames of the 2 FPS grid that dense sampling passes to the LMM (Qwen3-VL-8B) are shown below it. Frames kept by CodecSelect have a green border, and dropped frames are faded. As in the method overview, the panel next to the video shows, for each grid frame, the evidence since the last kept frame, elapsed time (grey) plus codec evidence (amber), and a frame is kept once it reaches θ = 1 s. Below, each thin line is the novelty score st of one decoded frame.

elapsed time codec evidence kept frame

TempCompass · 8 s · 11 of 17 grid frames kept (65%)

What is the direction in which the airplane is flying?

  • A. bottom to top
  • B. right to left
  • C. top to bottom
  • D. left to right

Dense sampling: A ✓    CodecSelect: A ✓

▲θ1 s0keptst0 s12345678
0.0s
0.5s
1.0s
1.5s
2.0s
2.5s
3.0s
3.5s
4.0s
4.5s
5.0s
5.5s
6.0s
6.5s
7.0s
7.5s
8.0s
TempCompass · 16 s · 19 of 33 grid frames kept (58%)

In what order do the events occur in the video?

  • A. An eye is opening followed by a flower is wilting
  • B. Both events happen at the same time
  • C. A flower is wilting followed by an eye is opening

Dense sampling: A ✓    CodecSelect: A ✓

▲▲▲▲θ1 s0keptst0 s246810121416
0.0s
0.5s
1.0s
1.5s
2.0s
2.5s
3.0s
3.5s
4.0s
4.5s
5.0s
5.5s
6.0s
6.5s
7.0s
7.5s
8.0s
8.5s
9.0s
9.5s
10.0s
10.5s
11.0s
11.5s
12.0s
12.5s
13.0s
13.5s
14.0s
14.5s
15.0s
15.5s
16.0s
TVBench · 20 s · 23 of 40 grid frames kept (58%)

Can you choose the option that matches how the scenes change in the video?

  • A. From the microphone scene to the walking scene.
  • B. From the walking scene to the microphone scene.

Dense sampling: A ✓    CodecSelect: A ✓

▲▲▲▲θ1 s0keptst0 s2468101214161820
0.0s
0.5s
1.0s
1.5s
2.0s
2.5s
3.0s
3.5s
4.0s
4.5s
5.0s
5.5s
6.0s
6.5s
7.0s
7.5s
8.0s
8.5s
9.0s
9.5s
10.0s
10.5s
11.0s
11.5s
12.0s
12.5s
13.0s
13.5s
14.0s
14.5s
15.0s
15.5s
16.0s
16.5s
17.0s
17.5s
18.0s
18.5s
19.0s
19.5s
LongVideoBench · 9 s · 11 of 20 grid frames kept (55%)

A man wearing a pink hat is sitting next to a computer. He is wearing a brown short-sleeved T-shirt and glasses. After raising his right hand and saying 'with different lenses if you look at,' what action did he take next?

  • A. The man on the left wearing a pink hat is standing with his hands in his pockets looking forward, and the man on the right wearing a black hat is standing with his hands in his pockets looking to the right front.
  • B. The man on the left wearing a pink hat is standing with his hands in his pockets looking forward, and the man on the right wearing a black hat is standing with his hands in his pockets looking down.
  • C. The man on the left wearing a pink hat is standing with his hands raised, and the man on the right wearing a black hat is standing with his hands in his pockets looking to the right front.
  • D. The man on the left wearing a pink hat is standing with his hands in his pockets looking forward, and the man on the right wearing a black hat is leaning against a tree looking up at the sky.

Dense sampling: A ✓    CodecSelect: A ✓

▲θ1 s0keptst0 s12345678910
0.0s
0.5s
1.0s
1.5s
2.0s
2.5s
3.0s
3.5s
4.0s
4.5s
5.0s
5.5s
6.0s
6.5s
7.0s
7.5s
8.0s
8.5s
9.0s
9.5s
LongVideoBench · 12 s · 18 of 26 grid frames kept (69%)

In the video, a hand is holding a piece of raw meat patty with green seasoning inside. What changes occur after the meat patty is placed on a black flat cast iron pan?

  • A. The meat patty gets sauce poured over it
  • B. The meat patty develops caramelized grill marks
  • C. The meat patty gets burnt
  • D. The meat patty falls apart
  • E. A piece of vegetable is placed on the meat patty

Dense sampling: B ✓    CodecSelect: B ✓

▲θ1 s0keptst0 s24681012
0.0s
0.5s
1.0s
1.5s
2.0s
2.5s
3.0s
3.5s
4.0s
4.5s
5.0s
5.5s
6.0s
6.5s
7.0s
7.5s
8.0s
8.5s
9.0s
9.5s
10.0s
10.5s
11.0s
11.5s
12.0s
12.5s
TempCompass · 10 s · 12 of 21 grid frames kept (57%)

Which caption matches the video better?

  • A. Caption A: The sun is falling.
  • B. Caption B: The sun is rising.

Dense sampling: B ✓    CodecSelect: B ✓

θ1 s0keptst0 s12345678910
0.0s
0.5s
1.0s
1.5s
2.0s
2.5s
3.0s
3.5s
4.0s
4.5s
5.0s
5.5s
6.0s
6.5s
7.0s
7.5s
8.0s
8.5s
9.0s
9.5s
10.0s
Video-MME · 58 s · 75 of 117 grid frames kept (64%)

What is this video mainly about?

  • A. Learning how to make a spoon candle holder.
  • B. Teaching how to handcraft a plastic ball.
  • C. Learning how to DIY snow globes.
  • D. None of the above.

Dense sampling: C ✓    CodecSelect: C ✓

▲▲▲▲▲▲▲▲θ1 s0keptst0 s510152025303540455055
0.0s
0.5s
1.0s
1.5s
2.0s
2.5s
3.0s
3.5s
4.0s
4.5s
5.0s
5.5s
6.0s
6.5s
7.0s
7.5s
8.0s
8.5s
9.0s
9.5s
10.0s
10.5s
11.0s
11.5s
12.0s
12.5s
13.0s
13.5s
14.0s
14.5s
15.0s
15.5s
16.0s
16.5s
17.0s
17.5s
18.0s
18.5s
19.0s
19.5s
20.0s
20.5s
21.0s
21.5s
22.0s
22.5s
23.0s
23.5s
24.0s
24.5s
25.0s
25.5s
26.0s
26.5s
27.0s
27.5s
28.0s
28.5s
29.0s
29.5s
30.0s
30.5s
31.0s
31.5s
32.0s
32.5s
33.0s
33.5s
34.0s
34.5s
35.0s
35.5s
36.0s
36.5s
37.0s
37.5s
38.0s
38.5s
39.0s
39.5s
40.0s
40.5s
41.0s
41.5s
42.0s
42.5s
43.0s
43.5s
44.0s
44.5s
45.0s
45.5s
46.0s
46.5s
47.0s
47.5s
48.0s
48.5s
49.0s
49.5s
50.0s
50.5s
51.0s
51.5s
52.0s
52.5s
53.0s
53.5s
54.0s
54.5s
55.0s
55.5s
56.0s
56.5s
57.0s
57.5s
58.0s
MVBench · 5 s · 6 of 11 grid frames kept (55%)

What is the color of the last object that enters the scene?

  • A. blue
  • B. green
  • C. red
  • D. cyan

Dense sampling: B ✓    CodecSelect: B ✓

θ1 s0keptst0 s12345
0.0s
0.5s
1.0s
1.5s
2.0s
2.5s
3.0s
3.5s
4.0s
4.5s
5.0s

Failure cases

Here dense sampling answers correctly and CodecSelect does not, although the kept frames show the answer.

TempCompass · 3 s · 5 of 7 grid frames kept (71%)

How would you describe the movement of the people?

  • A. gliding away from the camera
  • B. gliding towards the camera
  • C. gliding parallel the camera

Dense sampling: A ✓    CodecSelect: B ✗

θ1 s0keptst0 s123
0.0s
0.5s
1.0s
1.5s
2.0s
2.5s
3.0s
TVBench · 5 s · 7 of 11 grid frames kept (64%)

Which direction does the yellow sphere move in the video?

  • A. Down and to the left.
  • B. Up and to the right.
  • C. Up and to the left.
  • D. Down and to the right.

Dense sampling: C ✓    CodecSelect: D ✗

θ1 s0keptst0 s12345
0.0s
0.5s
1.0s
1.5s
2.0s
2.5s
3.0s
3.5s
4.0s
4.5s
5.0s