I want to convert my 3gp audio to .wav format. I used ffmpeg to convert that one. In that it is showing success not getting any error. But i am unable to get the final output file. Please help me to solve this issue.
Here is my code.
sampleDir = new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "/OfficeRecordings/");
if (!sampleDir.exists()) {
sampleDir.mkdirs();
}
outputFile = sampleDir+"/"+"sample_record.3gp";
finalFile = sampleDir+"/"+"final_record.wav";
final String[] cmd = new String[]{"-y", "-i", outputFile, finalFile};
execFFmpegBinary(cmd);
private void execFFmpegBinary(final String[] command) {
FFmpeg ffmpeg = FFmpeg.getInstance(this);
try {
FFmpeg.getInstance(MainActivity.this).loadBinary(new FFmpegLoadBinaryResponseHandler() {
@Override
public void onStart() {
Log.e("start",".......");
}
@Override
public void onSuccess() {
Log.e("success",".......");
}
@Override
public void onFailure() {
Log.e("fail",".......");
}
@Override
public void onFinish() {
Log.e("finish",".......");
}
});
} catch (FFmpegNotSupportedException e) {
e.printStackTrace();
}
After trying so many ways. I got the solution it is working fine.
final FFmpeg ffmpeg = FFmpeg.getInstance(this);