jishnujayakumar / MV-Tractus

A simple tool to extract motion vectors from h264 encoded videos.
108 stars 27 forks source link

how to get referance frame of motion vector #10

Closed NoharaMasato closed 3 years ago

NoharaMasato commented 4 years ago

I want to get the information about reference frame of motion vector, in order to normalize mv. I think, using FFmpeg, we cannot extract reference frame data. Because, there is a comment below in libavutil/motion_vector.h.

 /**
 26      * Where the current macroblock comes from; negative value when it comes
 27      * from the past, positive value when it comes from the future.
 28      * XXX: set exact relative ref frame reference instead of a +/- 1 "direction".
 29      */
 30     int32_t source;

I am searching the tool to get fully information of motion vector from compressed videos. Could you give me some advice?

jishnujayakumar commented 4 years ago

We can actually. Source attribute indicates the reference frame. Due to the nature of encoding it can be the previous one or the next one.

sandra-vs-nair commented 2 years ago

But it can be any of the previous frames or any of the future frames, right? It need not be the adjacent frames.