MPEG movies, when compressed, analyze the movement of pixel data and use “motion vectors” to help achieve data compression. Movie players, like mplayer, support showing this data as a “debugging” feature.
This blog post discusses the mplayer feature, and here some C code is offered for doing the motion analysis.
Unfortunately, my mplayer crashed when trying to do this. Luckily I found some very useful instuctions for compiling mplayer from source on Ubuntu. This newly compiled mplayer did the trick!
Also, I tried to figure out how to see only the motion vectors (no image) but didn’t manage. The vector drawing feature is considered a “decoder option” and is as such tightly coupled with the decoding of the image data (it’s not a video filter). Eventually it might be possible to extract/isolate the motion data, though there seems reason for some doubt about the quality of the resulting data in general; I came across some discussions disputing the quality of this data.