|
|
@ -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(" "); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|