LukasBommes / mv-extractor

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

Information about CPU usage #2

Closed mfoglio closed 3 years ago

mfoglio commented 3 years ago

Does this tool decode the video or does it retrieve the motion vectors without decoding it? I am looking for a solution with low CPU usage. I looked at the code and it seems the entire frame is decoded, however, I am not a C++ expert. Thank you.

LukasBommes commented 3 years ago

Dear mfoglio,

excuse the belated reply. The tool indeed decodes the video frame entirely. It should be possible to obtain the motion vectors and only partially decode the frame. But this would require changing most of video_cap.cpp. If you want to implement this change, I recommend asking on the FFMPEG mailing list on how to obtain motion vectors and only partially decode the frame. The community over there was quite willing to answer questions when I worked on this project.

Best regards, Lukas