jishnujayakumar / MV-Tractus

A simple tool to extract motion vectors from h264 encoded videos.
110 stars 27 forks source link

Any idea how to install it on Mac? #17

Closed complexfilter closed 3 years ago

complexfilter commented 4 years ago

How to install it on Mac?

jishnujayakumar commented 4 years ago

I am afraid I can't help in that context. Please Google it. Installing the ffmpeg libraries should do the trick. I believe it's the same for Mac as well. Kindly check and revert back. Let's try to combat this together. Meanwhile if you come up with something, your findings will be a boost to this project.

Kaltura-Git commented 4 years ago

Hi Jishnu,

I am trying to install this tool on my MAC book. After installing I am seeing the below errors while executing the ./compile file. Could you please help here?

In file included from extract_mvs.c:29: ./include/libavformat/avformat.h:1985:16: error: redefinition of 'AVPacketList' typedef struct AVPacketList { ^ /opt/dev-tools-sources/ffmpeg/build/include/libavcodec/packet.h:396:16: note: previous definition is here typedef struct AVPacketList { ^ In file included from extract_mvs.c:29: ./include/libavformat/avformat.h:1988:3: error: typedef redefinition with different types ('struct (anonymous struct at ./include/libavformat/avformat.h:1985:16)' vs 'struct AVPacketList') } AVPacketList; ^ /opt/dev-tools-sources/ffmpeg/build/include/libavcodec/packet.h:399:3: note: previous definition is here } AVPacketList; ^ extract_mvs.c:283:5: error: void function 'extract_motion_vectors' should not return a value [-Wreturn-type] return ret < 0; ^ ~~~ 3 errors generated. In file included from extract_mvs_with_frames.c:29: ./include/libavformat/avformat.h:1985:16: error: redefinition of 'AVPacketList' typedef struct AVPacketList { ^ /opt/dev-tools-sources/ffmpeg/build/include/libavcodec/packet.h:396:16: note: previous definition is here typedef struct AVPacketList { ^ In file included from extract_mvs_with_frames.c:29: ./include/libavformat/avformat.h:1988:3: error: typedef redefinition with different types ('struct (anonymous struct at ./include/libavformat/avformat.h:1985:16)' vs 'struct AVPacketList') } AVPacketList; ^ /opt/dev-tools-sources/ffmpeg/build/include/libavcodec/packet.h:399:3: note: previous definition is here } AVPacketList; ^ extract_mvs_with_frames.c:327:7: error: void function 'extract_motion_vectors' should not return a value [-Wreturn-type] return -1; ^ ~~ extract_mvs_with_frames.c:377:5: error: void function 'extract_motion_vectors' should not return a value [-Wreturn-type] return ret < 0; ^ ~~~ 4 errors generated.

medomatto commented 3 years ago

First you have to install MV-Tractus as from the info given in the readme by @jishnujayakumar (thank you for the great tool)!. Then you install ffmpeg by using homebrew: brew install ffmpeg Afterwards did the errors "should not return a value" bother me most. Simply open the extract_mvs_with_frames.c file with a code editor and comment out the lines 327,377. In extract_mvs.c comment out line 283. This helped for me. I hope you get it working.