remove acodec copy from cut command

pull/209/head
xufuji456 3 years ago
parent 1453249b21
commit 4dd4ce954b
  1. 3
      app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java

@ -67,8 +67,7 @@ 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) {
// "ffmpeg -i %s -ss %f -t %f -acodec copy -vn %s" String cutAudioCmd = "ffmpeg -i -ss %f -t %f -vn";
String cutAudioCmd = "ffmpeg -i -ss %f -t %f -acodec copy -vn";
cutAudioCmd = String.format(Locale.getDefault(), cutAudioCmd, startTime, duration); cutAudioCmd = String.format(Locale.getDefault(), cutAudioCmd, startTime, duration);
return insert(cutAudioCmd.split(" "), 2, inputPath, outputPath); return insert(cutAudioCmd.split(" "), 2, inputPath, outputPath);
} }

Loading…
Cancel
Save