A motion vector is a tiny piece of data — usually just two numbers, an X offset and a Y offset — that tells the decoder "this block of pixels looks like the block that was over there in the previous frame, shifted by this much". It's how video manages to be so small: instead of re-describing the entire moving object frame after frame, the encoder writes a handful of motion vectors plus a few correction bytes, and the decoder reconstructs the motion from previously decoded material.
Modern codecs use sub-pixel precision motion vectors, addressing fractional positions like "3.25 pixels right, 1.75 pixels down". The decoder synthesises those fractional positions using a built-in interpolation filter. This sub-pixel accuracy matters enormously for smooth panning shots and slow-moving objects — without it, you'd see jittery edges as objects jump by whole pixels. H.264 uses quarter-pixel precision, AV1 uses up to eighth-pixel, VVC has switchable precisions.
For most product purposes, motion vectors are invisible — they're inside the bitstream. But two things to know about them. First, they're the reason video compression is so good on slow-moving content and so bad on chaotic content: a fight scene with rapid camera shake produces motion vectors all over the place, with poor matches, and the encoder has to fall back on storing more pixel data directly. Second, motion vectors are often used outside compression — video stabilisation, frame interpolation, object tracking and "smart" thumbnail picking all reuse the motion vectors the codec already computed, getting that work essentially for free.
The book · Volume 1 of 7
Video Encoding: A Complete Guide to Video Compression — From Pixels and Color to H.264, HEVC, AV1, Quality Metrics, and AI
Motion vectors are why inter-frame video is so small, and they also drive tools like scene analysis and error concealment. Volume 1 explains motion vectors in detail: how they are predicted and coded, quarter-pixel precision, multiple reference frames, and how H.264, HEVC and AV1 differ in motion vector coding. Written by Nikolay Sapunov, CEO at Fora Soft.
Want to use motion vectors from your encoder for analytics or smarter compression?
Tell us what you want to detect or save: we outline how to extract motion vectors from your pipeline and what accuracy and cost to expect. 250+ video products shipped since 2005.