1

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 1

1

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(); }
Sign up to request clarification or add additional context in comments.

4 Comments

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.
Okay I've just answered it in your question opened
in windows os 32 bit the ffmpeg libarary is not buliding ..please help me how to do that..
I am also getting working directory null exception.How to resolve it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.