fix:remove accurate_seek when cutting audio

dev
xufulong 3 years ago
parent 494ea794ba
commit c1a377fe9d
  1. 4
      app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java

@ -42,8 +42,8 @@ public class FFmpegUtil {
* @return cut success or not * @return cut success or not
*/ */
public static String[] cutAudio(String inputPath, float startTime, float duration, String outputPath) { 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"; String cutAudioCmd = "ffmpeg -i %s -ss %f -t %f -acodec copy -vn %s";
cutAudioCmd = String.format(Locale.getDefault(), cutAudioCmd, startTime, duration, inputPath, outputPath); cutAudioCmd = String.format(Locale.getDefault(), cutAudioCmd, inputPath, startTime, duration, outputPath);
return cutAudioCmd.split(" "); return cutAudioCmd.split(" ");
} }

Loading…
Cancel
Save