FFmpeg支持x264编码

FFmpeg支持x264编码
pull/107/head
xufulong 5 years ago
parent 449a514fb0
commit d319782dd2
  1. BIN
      app/libs/arm64-v8a/libffmpeg.so
  2. BIN
      app/libs/armeabi-v7a/libffmpeg.so
  3. 1
      app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java

Binary file not shown.

Binary file not shown.

@ -145,6 +145,7 @@ public class FFmpegUtil {
*/ */
@SuppressLint("DefaultLocale") @SuppressLint("DefaultLocale")
public static String[] cutVideo(String srcFile, int startTime, int duration, String targetFile) { public static String[] cutVideo(String srcFile, int startTime, int duration, String targetFile) {
//指定音视频编码器:ffmpeg -i %s -ss %d -t %d -acodec libmp3lame -vcodec libx264 %s
String cutVideoCmd = "ffmpeg -i %s -ss %d -t %d -acodec copy -vcodec copy %s"; String cutVideoCmd = "ffmpeg -i %s -ss %d -t %d -acodec copy -vcodec copy %s";
cutVideoCmd = String.format(cutVideoCmd, srcFile, startTime, duration, targetFile); cutVideoCmd = String.format(cutVideoCmd, srcFile, startTime, duration, targetFile);
return cutVideoCmd.split(" ");//以空格分割为字符串数组 return cutVideoCmd.split(" ");//以空格分割为字符串数组

Loading…
Cancel
Save