I'm using ffmpeg and libx264 to encode a video and I want to extract the DCT coefficients and motion vector of each frame during the encoding process.
What is the best way to do this?
I read in the ffmpeg manual that is possible to use the debug mode with some flags to extract these values. I tried ffmpeg -debug dct_coeff
to output the dct coefficients but this option doesn't work for me; is it deprecated or related to a specific ffmpeg version?
Another option would be to modify and recompile ffmpeg source code but I don't know in which part of the code DCT and MV are calculated.
Any help with the debug mode or code modification suggestions would be appreciated.
VQEG team modified version of JMreference tool for H.264 (link) allows to generate an xml trace file decoding an .264 video. The trace file contains all the information about the bitstream including Motion Vectors and residuals of each pixel (Obtained from DCT transform).