From c1a377fe9d3dcb900d04b0e8bf5a349d22571125 Mon Sep 17 00:00:00 2001 From: xufulong Date: Thu, 23 Sep 2021 10:28:05 +0800 Subject: [PATCH] fix:remove accurate_seek when cutting audio --- app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java b/app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java index 3b41b6e..7347a00 100644 --- a/app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java +++ b/app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java @@ -42,8 +42,8 @@ public class FFmpegUtil { * @return cut success or not */ public static String[] cutAudio(String inputPath, float startTime, float duration, String outputPath) { - String cutAudioCmd = "ffmpeg -ss %f -accurate_seek -t %f -i %s -acodec copy -vn %s"; - cutAudioCmd = String.format(Locale.getDefault(), cutAudioCmd, startTime, duration, inputPath, outputPath); + String cutAudioCmd = "ffmpeg -i %s -ss %f -t %f -acodec copy -vn %s"; + cutAudioCmd = String.format(Locale.getDefault(), cutAudioCmd, inputPath, startTime, duration, outputPath); return cutAudioCmd.split(" "); }