]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
docs : document how to use 'WHISPER_FFMPEG' build option (#3029)
authorFujimoto Seiji <redacted>
Thu, 10 Apr 2025 16:21:38 +0000 (01:21 +0900)
committerGitHub <redacted>
Thu, 10 Apr 2025 16:21:38 +0000 (18:21 +0200)
FFmpeg integration was introduced in 1b51fdf by William Tambellini,
but not mentioned in the main documentation.

Add a short guide on how to enable the feature. Confirmed to work
on both Ubuntu 24.04 and Fedora 39.

Signed-off-by: Fujimoto Seiji <redacted>
README.md

index 52c99f43d43ac8cc8a19e79cf438bde23088ac54..565e195acec000aa576e3674dae3544f90c72841 100644 (file)
--- a/README.md
+++ b/README.md
@@ -375,6 +375,37 @@ Run the inference examples as usual, for example:
 - If you have trouble with Ascend NPU device, please create a issue with **[CANN]** prefix/tag.
 - If you run successfully with your Ascend NPU device, please help update the table `Verified devices`.
 
+## FFmpeg support (Linux only)
+
+If you want to support more audio formats (such as Opus and AAC), you can turn on the `WHISPER_FFMPEG` build flag to enable FFmpeg integration.
+
+First, you need to install required libraries:
+
+```bash
+# Debian/Ubuntu
+sudo apt install libavcodec-dev libavformat-dev libavutil-dev
+
+# RHEL/Fedora
+sudo dnf install libavcodec-free-devel libavformat-free-devel libavutil-free-devel
+```
+
+Then you can build the project as follows:
+
+```bash
+cmake -B build -D WHISPER_FFMPEG=yes
+cmake --build build
+```
+
+Run the following example to confirm it's working:
+
+```bash
+# Convert an audio file to Opus format
+ffmpeg -i samples/jfk.wav jfk.opus
+
+# Transcribe the audio file
+./build/bin/whisper-cli --model models/ggml-base.en.bin --file jfk.opus
+```
+
 ## Docker
 
 ### Prerequisites