Debugging macroblocks and motion vectors with ffmpeg

 Previous versions of ffmpeg (before October 2017) also allowed you to analyze macroblocks, but this option has been removed. The `codecview` filter can be used to display motion vectors as small arrows for each macroblock. It has an option called mv which specifies the type of motion vector to draw:
pf - the forward predicted motion vector for the P picture
bf - the forward predicted motion vector for the B picture
bb - the backward predicted motion vector for the B picture

 

ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv=pf+bf+bb
ffmpeg -flags2 +export_mvs -i input.mp4 -vf codecview=mv=pf+bf+bb output.mp4

 

Earlier versions of ffmpeg did not have this filter, but supported the now deprecated -vismv option. This option is not available for codecs that do not export motion vectors (most non-MPEG based codecs) 

Guess you like

Origin blog.csdn.net/yunxiaobaobei/article/details/130048157