Hi i have 20MB size video,I need to split this video as each part should be 2MB, For this i google it and found FFMpeg library for splitting videos.
But this library splitting the videos based on time-limit suppose (00:00:02 to 00:00:06 seconds,Between this time period video splitted)
My requirement is, I want to cut the video per every 2MB that's what my exact requirement not based on time limit.
I searched for this lot in google but i did not get solution can some one help me please.
FFMpeg Command i used for splitting:-
String cmd[] = new String[]{"-i", inputFileUrl, "-ss", "00:00:02", "-c", "copy", "-t", "00:00:06",
outputFileUrl};
executeBinaryCommand(fFmpeg, cmd);
public void executeBinaryCommand(FFmpeg ffmpeg, String[] command) {
try {
if (ffmpeg != null) {
ffmpeg.execute(command,
new ExecuteBinaryResponseHandler() {
@Override
public void onFailure(String response) {
System.out.println("failure====>" + response.toString());
}
@Override
public void onSuccess(String response) {
System.out.println("resposense====>" + response.toString());
}
@Override
public void onProgress(String response) {
System.out.println("on progress");
}
@Override
public void onStart() {
System.out.println("start");
}
@Override
public void onFinish() {
System.out.println("Finish");
}
});
}
} catch (FFmpegCommandAlreadyRunningException exception) {
exception.printStackTrace();
}
}