From fbb8bc6c2f09bf49eeb044c616ef0b7188c259f6 Mon Sep 17 00:00:00 2001 From: Shi Liang Date: Thu, 26 Sep 2024 15:39:53 +0800 Subject: [PATCH] Update Makefile and ReadMe for ffmpeg v7 --- Makefile | 1 + README.md | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2d258bf0..70f11259 100644 --- a/Makefile +++ b/Makefile @@ -841,6 +841,7 @@ endif ifdef WHISPER_FFMPEG OBJ_COMMON += examples/ffmpeg-transcode.o +override CXXFLAGS := $(CXXFLAGS) -DWHISPER_FFMPEG override LDFLAGS := $(LDFLAGS) -lavutil -lavformat -lavcodec -lswscale -lswresample endif diff --git a/README.md b/README.md index 808717cb..aac00ee1 100644 --- a/README.md +++ b/README.md @@ -205,7 +205,15 @@ The command downloads the `base.en` model converted to custom `ggml` format and For detailed usage instructions, run: `./main -h` -Note that the [main](examples/main) example currently runs only with 16-bit WAV files, so make sure to convert your input before running the tool. +Note that the [main](examples/main) example currently runs by default with 16-bit WAV files. + +Building with `WHISPER_FFMPEG=1` enables ffmpeg support to handle other formats: + +```bash +WHISPER_FFMPEG=1 make main +``` + +If you do not want to rebuild it, convert your input before running the tool. For example, you can use `ffmpeg` like this: ```bash