disable video when cutting audio

disable video when cutting audio
pull/166/head
xufulong 5 years ago
parent 856d44f31f
commit 55c1a6f3c8
  1. 2
      app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java

@ -45,7 +45,7 @@ public class FFmpegUtil {
*/ */
@SuppressLint("DefaultLocale") @SuppressLint("DefaultLocale")
public static String[] cutAudio(String srcFile, int startTime, int duration, String targetFile) { public static String[] cutAudio(String srcFile, int startTime, int duration, String targetFile) {
String cutAudioCmd = "ffmpeg -i %s -acodec copy -ss %d -t %d %s"; String cutAudioCmd = "ffmpeg -i %s -acodec copy -vn -ss %d -t %d %s";
cutAudioCmd = String.format(cutAudioCmd, srcFile, startTime, duration, targetFile); cutAudioCmd = String.format(cutAudioCmd, srcFile, startTime, duration, targetFile);
return cutAudioCmd.split(" "); return cutAudioCmd.split(" ");
} }

Loading…
Cancel
Save