RAPID: Codec-Aware Video Decoding for Efficient Long-Video Understanding
Authors: Yuna Lee, Yulhwa Kim
Organizations: Dept. of Electrical and Computer Engineering, Sungkyunkwan University · Dept. of Semiconductor Systems Engineering, Sungkyunkwan University
Recent vision-language models (VLMs) can process hour-long videos, but the large number of input frames incurs substantial inference overhead. Existing approaches to efficient long-video understanding largely overlook video decoding, which can take longer than LLM prefill. We propose RAPID (Reference- and Access-Point-Informed Decoding), a codec-aware framework that exploits information embedded in compressed bitstreams to reduce both frame decoding and selection costs. RAPID consists of two components. RAPID-Dec exploits reference-frame information and random access points to skip unnecessary frames and decode the retained frames in parallel while preserving exact reconstruction of the target frames. It achieves up to a 3.7x decoding speedup over the fastest baseline on H.264/AVC videos. RAPID-Sel uses keyframes as coarse representatives of video segments, avoiding the dense candidate decoding and scoring required by existing frame selection methods. It achieves comparable accuracy with up to a 3.0x preprocessing speedup. Together, RAPID achieves a 4.9x time to first token (TTFT) speedup on hour-long videos over a state-of-the-art frame selection method using the fastest baseline decoder.
Figures & tables
Figure 1: Motivation of RAPID. (a) Accuracy of Qwen3-VL-8B on MLVU under different frame sampling settings. (b) Breakdown of TTFT for Qwen3-VL-8B across sampling settings. (c) Video decoding latency at 1 fps without frame capping for different video durations. In (a) and (b), f denotes the number of uniformly sampled frames (64, 128, or 256), while fps denotes frames per second, with sampling capped at 2,048 frames for the 1 fps setting. All videos were decoded using TorchCodec [ 29 ] .
Figure 2: Example of keyframe groups. (a) In display order, each arrow points from a frame to a frame it references. (b) In the bitstream, frames are stored in decoding order, and the bitstream consists of NAL units, each with a header and a payload.
Figure 3: Overview of RAPID. RAPID-Dec (right) decodes target frames chosen by any sampling strategy, including RAPID-Sel (left). It skips groups without target frames, frames after the last target frame of each group, and non-reference frames other than target frames, while preserving exact reconstruction of the targets. The retained groups are then distributed across threads for parallel decoding. RAPID-Sel decodes and scores only the keyframes against the query and selects target frames by combining uniform frames with relevant frames allocated to groups by relevance.
Video-MME
LongVideoBench
MLVU
52.7%
51.8%
37.5%
Table 1: Average ratio of non-reference frames per video.
Figure 4: Video decoding latency of 1 fps sampling (up to 2,048 frames) with different numbers of threads.
Figure 5: Video decoding latency under different frame sampling settings with 16 threads. The y-axis is in log scale.
64 frames
1 fps
Configuration
Lat. (s)
Speedup
Lat. (s)
Speedup
Parallel decoding only
15.91
–
16.38
–
+ Group skipping
2.20
7.23 ×
15.94
1.03 ×
+ Truncation
1.84
1.20 ×
13.03
1.22 ×
+ Workload balancing
1.77
1.04 ×
12.90
1.01 ×
+ Non-ref. skipping (full)
1.45
1.22 ×
8.72
1.48 ×
Table 2: Ablation of RAPID-Dec. Decoding latency (Lat.) on videos of Fig. 5(a) . Components are added cumulatively, and speedup is relative to the previous row.
Figure 6: Latency of decoding frames sampled at 1 fps from H.264/AVC videos in Video-MME with 16 threads.
Qwen3-VL-8B
GLM-4.6V-Flash
Method
#Frames
Preproc. (s) ↓
Video-MME
MLVU
LVB
Avg.
Video-MME
MLVU
LVB
Avg.
Uniform
32
0.60
60.26
60.69
55.95
58.97
57.15
58.68
55.27
57.03
Top-K
32
3.41
61.56
68.81
57.89
62.75
59.70
67.08
60.13
62.30
AKS
32
3.41
61.44
65.84
56.99
61.42
59.26
61.70
57.67
59.54
Focus
32
2.36
61.04
67.40
58.27
62.24
58.30
64.76
60.21
61.09
WFS-SB
32
3.41
62.78
66.81
58.26
62.62
60.93
64.33
58.49
61.25
Table 3: Accuracy (%) and preprocessing latency on Video-MME, MLVU, and LongVideoBench (LVB). Preproc. is the per-video latency of RAPID-Dec decoding and CLIP ViT-B/32 scoring, averaged over three runs on 10% of the videos of each benchmark.
Candidates
Short
Medium
Long
Avg.
Uniform
76.22
63.67
55.22
65.04
Keyframes
75.67
63.78
56.78
65.41
Table 4: Uniform vs. keyframe candidates of RAPID-Sel, equal in number, on Video-MME with Qwen3-VL-8B and 64 frames.
Figure 7: Keyframe placement and visual consistency over 2,098 videos of Video-MME, LongVideoBench, and MLVU. (a) Per-video fraction of low-similarity 1 s intervals (CLIP similarity below 0.73) containing a keyframe. (b) CDFs of CLIP similarity between adjacent 1 fps frames within a group, across a keyframe, and between each keyframe and the other frames of its group.
ρ
Short
Medium
Long
Avg.
0.45
75.44
63.67
55.22
64.78
0.50
75.67
63.78
56.78
65.41
0.55
75.22
63.22
56.11
64.85
0.60
76.00
61.89
55.22
64.37
Uni. ( ρ=1 )
74.56
61.89
54.44
63.63
Table 5: Impact of ρ (Video-MME, Qwen3-VL-8B, 64 frames).
Figure 8: TTFT breakdown of Qwen3-VL-8B with 64 frames on hour-long videos. The first four bars use AKS with each decoder. Others includes relevance scoring and frame selection.
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 9: Video decoding latency using NVDEC. The y-axis is in log scale.
Figure 10: Video decoding latency of 1 fps sampling (up to 2,048 frames) with different numbers of threads on the AMD CPU.
Figure 11: Video decoding latency under different frame sampling settings with 16 threads on the AMD CPU. The y-axis is in log scale.
Figure 12: Video decoding latency on the Video-MME videos of each duration with 16 threads.
Figure 13: Video decoding latency on all Video-MME videos and on two special cases with 16 threads.
Candidates
Preproc. (s) ↓
Short
Medium
Long
Avg.
None
0.75
74.56
61.89
54.44
63.63
Uniform
2.87
76.22
63.67
55.22
65.04
Keyframes
1.39
75.67
63.78
56.78
65.41
Appendix
Table 6: Accuracy (%) and preprocessing latency of uniform vs. keyframe candidates of RAPID-Sel on Video-MME with Qwen3-VL-8B and 64 frames.
Figure 14: Average accuracy over the three benchmarks vs. TTFT of Qwen3-VL-8B with 32 to 256 frames.
Figure 15: Medians of keyframes and low-similarity intervals (Low-sim) per minute in ten groups of videos sorted by keyframes per minute.
Figure 16: Keyframes in a sparse minute (left) and a dense minute (right) of four videos. Each plot shows the CLIP similarity of adjacent 1 fps frames, the threshold of 0.73 for low-similarity intervals, and the keyframes of the minute. Below each plot are three consecutive keyframes of the minute.
Efficient long-video understanding with vision-language models (VLMs) is often framed as selecting informative frames or visual tokens at a fixed native resolution. We show that per-frame resolution can instead be traded for denser temporal coverage, while front-end decoding latency depends on the size of the candidate pool rather than the final token budget. An empirical study across multiple VLMs and long-video benchmarks yields three findings: dense low-resolution sampling outperforms sparse native-resolution sampling at matched token budgets; resolution-sensitive tasks benefit from selected high-resolution frames; and front-end decoding dominates wall time for hour-long videos. Motivated by these findings, we introduce LoHi, a training-free, single-pass framework that combines a dense low-resolution video stream with sparse high-resolution image frames through the VLM's native video and image pathways. LoHi-Anchor selects high-resolution frames using codec I-frame metadata, while LoHi-SemDiv uses query relevance and visual diversity over CLIP features. Across three long-video benchmarks, LoHi improves average accuracy by 10.6 percentage points over the native-resolution baseline at a matched token budget and by 5.2 percentage points over the strongest prior efficiency method. It also reduces front-end decoding latency by up to 7x on hour-long videos. Project page: https://sixundong.com/projects/lohi
Sixun Dong, Wei Li, Andong Deng +4
University of Central Florida · Meta Reality Labs · Axon
Although current Video-LLMs achieve impressive performance in video understanding tasks, their autoregressive decoding efficiency remains constrained by the massive number of video tokens. Visual token pruning can partially ease this bottleneck, yet existing approaches still suffer from information loss and yield only modest acceleration in decoding. In this paper, we propose ParallelVLM, a training-free draft-then-verify speculative decoding framework that overcomes both mutual waiting and limited speedup-ratio problems between draft and target models in long-video settings. ParallelVLM features two parallelized stages that maximize hardware utilization and incorporate an Unbiased Verifier-Guided Pruning strategy to better align the draft and target models by eliminating the positional bias in attention-guided pruning. Extensive experiments demonstrate that ParallelVLM effectively expands the draft window by 1.6∼1.8× with high accepted lengths, and accelerates various video understanding benchmarks by 3.36× on LLaVA-Onevision-72B and 2.42× on Qwen2.5-VL-32B compared with vanilla autoregressive decoding.
The fundamental challenge in scaling Video Large Language Models (Video LLMs) to long-form video lies in managing the explosion of visual-token context length. Existing strategies predominantly focus on "post-hoc" token reduction -- reducing visual tokens after feature extraction to alleviate the LLM's computational overhead. While these methods effectively reduce the number of visual tokens, we observe that the primary latency bottleneck then shifts from the LLM to the expensive per-frame processing of the vision encoder. To address this, we introduce LiteFrame, a strong, yet highly efficient video encoder backbone for Video LLMs. To train LiteFrame, we propose Compressed Token Distillation (CTD), a novel training framework that teaches a compact student vision encoder to directly predict information-dense, spatio-temporally compressed representations produced by a large teacher vision model, effectively bypassing redundant computation. When coupled with further Language Model Adaptation (LMA), this approach results in a new latency-accuracy Pareto frontier -- compared with InternVL3-8B, LiteFrame provides a 35% reduction in end-to-end latency while processing 8× more frames and improves average video understanding accuracy across multiple benchmarks. Our results demonstrate a new potential path to unlocking longer-form video understanding under fixed compute budgets.