From 976fa6e63cc7dfd88f3e1ef2a62c950fe718eca9 Mon Sep 17 00:00:00 2001 From: aNNiMON Date: Sun, 15 Sep 2024 23:32:34 +0300 Subject: [PATCH] Show audio spectrum output for audio and voices --- .../annimon/ffmpegbot/parameters/resolvers/AudioResolver.java | 1 - .../ffmpegbot/parameters/resolvers/OutputFormatResolver.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/annimon/ffmpegbot/parameters/resolvers/AudioResolver.java b/src/main/java/com/annimon/ffmpegbot/parameters/resolvers/AudioResolver.java index b8a8a9f..fff17d1 100644 --- a/src/main/java/com/annimon/ffmpegbot/parameters/resolvers/AudioResolver.java +++ b/src/main/java/com/annimon/ffmpegbot/parameters/resolvers/AudioResolver.java @@ -61,7 +61,6 @@ public void refine(@NotNull Parameters parameters) { } else { parameters.enable(AudioBitrate.ID); } - }); } diff --git a/src/main/java/com/annimon/ffmpegbot/parameters/resolvers/OutputFormatResolver.java b/src/main/java/com/annimon/ffmpegbot/parameters/resolvers/OutputFormatResolver.java index 3fe41fb..051a0bc 100644 --- a/src/main/java/com/annimon/ffmpegbot/parameters/resolvers/OutputFormatResolver.java +++ b/src/main/java/com/annimon/ffmpegbot/parameters/resolvers/OutputFormatResolver.java @@ -14,6 +14,7 @@ public class OutputFormatResolver implements ParametersResolver { @Override public void resolve(@NotNull Parameters parameters, @NotNull FileInfo fileInfo) { final var outputFormat = switch (fileInfo.fileType()) { + case AUDIO, VOICE -> new OutputFormat(List.of(AUDIO, AUDIO_SPECTRUM), AUDIO); case VIDEO -> forVideo(fileInfo); case VIDEO_NOTE -> new OutputFormat(List.of(VIDEO_NOTE, VIDEO, AUDIO, AUDIO_SPECTRUM), VIDEO_NOTE); case ANIMATION -> forAnimation(fileInfo);