ffmpeg compiler flag for video understanding #32
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PLEASE NOTE: This is a PR to amend ggml-org#9165 to implement ngxson's suggestion to make the ffmpeg dependency optional.
This moves the ffmpeg dependency to live behind a compiler flag that can be enabled optionally by setting LLAMA_FFMPEG=1 in call to make.
If you just build without this option, then attempting to load a video file displays a message to the user:
However, one can re-enable video support by adding it as a compiler flag, ex:
make clean
make -j LLAMA_FFMPEG=1
And then video support works as-expected.
There are still a few rough points with this implementation that may need to be cleaned up -- namely:
Overall, I think this is still an improvement, since llama.cpp should not require a dependency on ffmpeg / pkg-config, and this nicely separates that out.