Nico Juralewsky wrote:
Hello,
my task is if it is possible to extract the motion information in video
codecs. I have seen that in the libavcodec/mpegvideo.c is a function
MPV_decode_mb_internal (...) with a motion vector variable. My problem
is that I'm new in this topic ffmpeg.
Now my question: Is there any possibility how I can get the motion
information, for example to visualize this. In my project I have to test
how I can get the motion information and implement it into an OpenCV
program for image processing tasks.
Is there anyone who can give some hints in which code segment in the
libavcodec library I have to see or how I can proceed to get the motion
information?
Thank you for input.
Best regards
Nico
After a quick look, it appears to me that this information is present in
the AVFrame structure returned to the user after a picture is decoded.
Look at the array AVFrame.motion_val. AVFrame is defined in avcodec.h.
If this is true, then no internal FFmpeg function calls are needed at
all for you to get the data you want.
You may discover that only some decoders write to this array, and some
do not. But you can hope for the best.
--
Mike Scheutzow
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user