jishnujayakumar / MV-Tractus

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

Can not compile -> libavcodec/avocdec.h not found #4

Closed mullanptr closed 5 years ago

mullanptr commented 5 years ago

Hi, I can not compile. The command ('./compile') throws this error:

$> ./compile 
In file included from extract_mvs.c:29:0:
include/libavformat/avformat.h:319:32: fatal error: libavcodec/avcodec.h: No such file or directory
compilation terminated.

When looking online for this error, I only find one thread concerning this error in general [1]. There it is suggested to have a recent ffmpeg version; I updated ffmpeg to 4.1; Didn't help, though...

Any ideas?

[1] https://github.com/leandromoreira/ffmpeg-libav-tutorial/issues/15

mullanptr commented 5 years ago

This fixed it: sudo apt-get install libavformat-dev

But, then gave me:

$> ./compile 
/usr/bin/ld: cannot find -lavdevice
/usr/bin/ld: cannot find -ljson
collect2: error: ld returned 1 exit status

How to fix that, now... Ahhhhhhhhhh

jishnujayakumar commented 5 years ago

Hi @mullanptr,

If you have installed FFmpeg correctly then this error should not crop up. Kindly check the installation.

Else try manually installing the missing libs from Ubuntu universe or from whichever repository that provides the libs for your OS.

PS: In any case don't forget to update the ldconfig file with correct .so file paths. This is the key.

Hope that helps.

mullanptr commented 5 years ago

I now set up an Ubuntu 18.04 in a virtual machine. Run your installation-scripts -> Bumped into same errors.

So as it is a mint fresh set up Ubuntu installation, I can not see any problems I could have made during set up...

jishnujayakumar commented 5 years ago

We had also run into the same problem. It seems that the packages offered by Ub18.04 are broken. Hence we rolled back to Ub16.04. Even 17.04 couldn't run it. As of now Ub16.04 is the best one to go with.