Current location - Health Preservation Learning Network - Healthy weight loss - Android FFmage modifies video resolution, frame rate and region cropping.
Android FFmage modifies video resolution, frame rate and region cropping.
string ffmpeg = "-y-I "+file path+"-strict-2-vcodec libx 264-preset ultra fast-CRF 24-acodec AAC-ar 44 100-AC 2-b:a 96k-s "+(int)(video width/ Bi Li) +" x "+(int)(video height/ Bi Li)+"-Aspect5: 3"+savepath;

File path? = Original video address?

(int)(video width/ Bi Li) +" x "+(int)(video height/ Bi Li)? = Resolution (1080 * 1920)

5:3 = Resolution

Save path = save address.

Detailed parameter reference = mands = ffmpeg.split ("");

RxFFmpegInvoke.getInstance()。 RunCommandRxJava (command). subscribe(new rxfmpegsubscriber(){

@ Overlay

? public void onFinish() {

Log.i (label, "on finish:");

}

@ Overlay

public void on progress(int progress,long progressTime) {

Log.i (label, "onprogress:");

}

@ Overlay

Public void onCancel() {

Log.i (label, "oncancel:");

}

@ Overlay

Public void onError (string message)

Log.i (tag, "onerror:"+message);

}

});

Do I need to import the FFmpge project first? There are many on github.

This file is used to record the use of ffmpge. Because it was the first time to use it, I didn't understand the meaning of the instructions, so I searched for a long time to find a way.

The above functions have been used in the project.