FFmpeg: Display and isolate macroblock motion-vectors in mpeg video


# Isolate motion-vectors using 'difference128' blend filter
# - add brightness, contrast, and scaling, to taste

ffplay \
   -flags2 +export_mvs \
   -i "video.mp4" \
   -vf \
   "
      split[original],
      codecview=mv=pf+bf+bb[vectors],
      [vectors][original]blend=all_mode=difference128,
      eq=contrast=7:brightness=-0.3,
      scale=720:-2
   "

Works best with higher-resolution videos; 4K source used in this case.

more info: https://trac.ffmpeg.org/wiki/Debug/MacroblocksAndMotionVectors
source video: Czech National Ballet - https://www.youtube.com/watch?v=bn12Ffi15Go
shorter alt. version: https://www.youtube.com/watch?v=KN_c4mdBpvg