I have all the ffmpeg´s files compiled in my android project, but I don´t know how to call ffmpeg commands. How can I get the "executable" file of the compiled library? What is it exactly? Thanks!!
1 Answer
Try this code:
try {
Process ffmpegProcess = new ProcessBuilder(ffmpegCommand).redirectErrorStream(true).start();
String line;
BufferedReader reader = new BufferedReader(new InputStreamReader(ffmpegProcess.getInputStream()));
Log.d(null, "*******Starting FFMPEG");
while((line = reader.readLine())!=null){
Log.d(null, "***"+line+"***");
}
Log.d(null,"****ending FFMPEG****");
} catch (IOException e) {
e.printStackTrace(); }
4 Comments
Sanket990
String ffmpegCommand="ffmpeg -i "+path.getAbsolutePath()+"/test/1.mp4 -f avi -acodec mp3 "+path.getAbsolutePath()+"/Songss.avi"; i m passing ffmpegcommand in your example giving error IOException Working directory null IOEXception Executing below code.
Gonzalo Solera
Okay I've just answered it in your question opened
Ajay
in windows os 32 bit the ffmpeg libarary is not buliding ..please help me how to do that..
Muhammad Umair Shafique
I am also getting working directory null exception.How to resolve it?