C1ngh10
C1ngh10

Reputation: 15

fatal error: libavfilter/avfiltergraph.h: No such file or directory

I am trying to build this project: https://github.com/abdullahfarwees/screen-recorder-ffmpeg-cpp. I installed ffmpeg (following the instructions in the repo README). After that I tried to compile (using the command in the compile.sh file) with correct paths. I received the following error:

In file included from src/main.cpp:2:
src/../include/ScreenRecorder.h:23:10: fatal error: libavfilter/avfiltergraph.h: No such file or directory
   23 | #include "libavfilter/avfiltergraph.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from src/ScreenRecorder.cpp:1:
src/../include/ScreenRecorder.h:23:10: fatal error: libavfilter/avfiltergraph.h: No such file or directory
   23 | #include "libavfilter/avfiltergraph.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

I installed the libavfilter library. Does anyone know how to fix this? Thank you for your help

Upvotes: 0

Views: 1813

Answers (1)

Botje
Botje

Reputation: 31020

avfiltergraph.h was merged into avfilter.h in this commit

You should either use a version before that, or create a dummy libavfilter/avfiltergraph.h that contains:

#include "libavfilter/avfilter.h"

I also suggest you report this issue to the project you're trying to compile, ideally with a pull request :)

Upvotes: 1

Related Questions