LukasBommes / mv-extractor

Extract frames and motion vectors from H.264 and MPEG-4 encoded video.
MIT License
279 stars 56 forks source link

Update __main__.py #28

Open xyperias opened 1 year ago

xyperias commented 1 year ago

extract motion vectors at h264 quarter-pixel precision

Currently the code uses only the integer precision end-point of motion vectors. However, AVMotionVector contains motion_x, motion_y and motion_scale values which allow for sub-pixel motion vector lengths.

This should be hardly visible in the visualization, but will show how to get more accurate motion vectors.