FFmpeg how to get an image for a particular 'c

2019-08-02 15:34发布

问题:

I am looking for ways to get this output from ffmpeg:

Basically, I would like to pass to the shell, a command that allows me to output a particular frame number, let's say coded_picture_number=200 with the motion vectors drawn into it.

Any clue? Thanks in advance.

回答1:

This

ffmpeg -flags2 +export_mvs -i video.avi -vf 'select=gte(n\,200),codecview=mv=pf+bf+bb' -vframes 1 frame.png

will open video.avi, skip first 200 frames (n starts from 0), visualize motion vectors (all types), and writes exactly 1 frame into frame.png.