需要精确裁剪的拿走不谢
gyymz1993 opened this issue · comments
Yangshao commented
double startTime = (double)startMs / 10.0D / 10.0D / 10.0D;
double induration = (double)(endMs - startMs) / 10.0D / 10.0D / 10.0D;
String[] complexCommand = new String[]{"ffmpeg", "-ss", "" + startTime, "-y", "-i", inputFile, "-t", "" + induration, "-vcodec", "mpeg4", "-b:v", "2097152", "-b:a", "48000", "-ac", "2", "-ar", "22050", outputFile};
FFmpegCmd.exec(complexCommand, 0L, new OnEditorListener() {
public void onSuccess() {
callback.onFinishTrim(outputFile);
}
public void onFailure() {
callback.onFailed();
}
public void onProgress(float progress) {
Log.d(TrimVideoUtil.TAG, "FAILED with onProgress : " + progress);
}
});