4

As the title suggests, I am looking for a Python library that can read an MP4/MKV file and extract the motion vectors for all the macroblocks in each frame.

Are there any Python libraries that can do this?

runeks
  • 1,745
  • 2
  • 17
  • 26
  • nope not AFAIK but you can use the reference decoder and the debug-output to output that info in textformat and parse it using python. – Fredrik Pihl Oct 25 '13 at 22:08
  • @FredrikPihl What is this reference decoder you're talking about? I'm on Linux, does it work for Linux as well? Parsing output from an external program is fine for my use case. – runeks Oct 27 '13 at 13:01
  • latest version 18.5 can be found @ http://iphome.hhi.de/suehring/tml/download/ And, YES, it works for linux! – Fredrik Pihl Oct 28 '13 at 09:25
  • @runeks Did you get this to work? Do you have any code you'd be willing to share? – saulspatz Apr 24 '17 at 18:32
  • 3
    @saulspatz I didn't get far with this, but I did end up with some working code, by patching ffmpeg to print information about macroblocks, and then parsing this output using a Python script. It's not much, but it's better than nothing I guess: https://github.com/runeksvendsen/python-mv – runeks Apr 26 '17 at 06:04

0 Answers0