视频剪切保持码率不变,质量不变

视频剪切保持码率不变,质量不变
pull/107/head
xufulong 5 years ago
parent 6c47625fcb
commit 956566cee4
  1. 2
      app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java

@ -136,7 +136,7 @@ public class FFmpegUtil {
*/
@SuppressLint("DefaultLocale")
public static String[] cutVideo(String srcFile, int startTime, int duration, String targetFile){
String cutVideoCmd = "ffmpeg -i %s -ss %d -t %d %s";
String cutVideoCmd = "ffmpeg -i %s -ss %d -t %d -acodec copy -vcodec copy %s";
cutVideoCmd = String.format(cutVideoCmd, srcFile, startTime, duration, targetFile);
return cutVideoCmd.split(" ");//以空格分割为字符串数组
}

Loading…
Cancel
Save