ffmpegi视频压缩

编程

public class FFmpegKit {

static {

System.loadLibrary("native-lib");

System.loadLibrary("avutil");

System.loadLibrary("fdk-aac");

System.loadLibrary("avcodec");

System.loadLibrary("avformat");

System.loadLibrary("swscale");

System.loadLibrary("swresample");

System.loadLibrary("avfilter");

}

//定义接口,回调命令执行周期

public interface KitInterface {

void onStart();

void onProgress(int progress);

void onEnd(int result);

}

//开启异步线程执行

public static void execute(String[] commands, final KitInterface kitIntenrface) {

new AsyncTask<String[], Integer, Integer>() {

@Override

protected void onPreExecute() {

if (kitIntenrface != null) {

kitIntenrface.onStart();

}

}

@Override

protected Integer doInBackground(String[]... params) {

return run(params[0]);

}

以上是 ffmpegi视频压缩 的全部内容, 来源链接: utcz.com/z/510287.html

回到顶部