Index ¦ Archives ¦ Atom ¦ RSS

Visualizing mpeg4 motion compensation vectors using mplayer

The MPEG4 video encoding process makes use of block motion compensation to achieve compression. The motion compensation process serves to produce the intra frames which are the frames between keyframes. I’ve always been fascinated by this process and was delighted to find out that my favorite video player, mplayer, allows one to visualize this process. I tried it and it is wonderful!

This is the video I tried the process on: download


motion compensation vector
visualization motion compensation vector
visualization


motion compensation vector
visualization motion compensation vector
visualization


motion compensation vector
visualization motion compensation vector
visualization


motion compensation vector
visualization


To try this out yourself, you will first need to have mplayer installed. If you are running Debian/Ubuntu, do this,

sudo apt-get install mplayer

After this, download the video using the link provided above. Run this command,

mplayer -lavdopts vismv=1 -vo x11 motion_vector_video.avi

To learn more about motion compensation, go here. Enjoy!

© Prashanth Ellina. Built using Pelican. Theme by Giulio Fidente on github.