android-ffmpeg-cmdline icon indicating copy to clipboard operation
android-ffmpeg-cmdline copied to clipboard

MP3 file not create

Open ankitsiliconithub opened this issue 11 years ago • 0 comments

hi sir,

here my code i am change in your code but when create wav file it create successfully but when i change in mp3 file 0kb file display in sdcard please help me

    if (inputPath == null || outputPath == null) {
        throw new IllegalStateException("Need an input and output filepath!");
    }   

    final List<String> cmd = new LinkedList<String>();


    String baseDir = Environment.getExternalStorageDirectory().getAbsolutePath();
    String fileName = "2.3GP";
    String fileName1 = "2.mp3";

    String path  = baseDir + "/" + fileName;
    String path1  = baseDir + "/" + fileName1;

      File f = new File(path);

      if(f.exists()){
          System.out.println("File existed");
      }else{
          System.out.println("File not found!");
      }


      cmd.add(mFfmpegPath);
      cmd.add("-i");
      cmd.add(path);
       `  cmd.add("-ab");
      cmd.add("128k");
          cmd.add(path1);
         final ProcessBuilder pb = new ProcessBuilder(cmd);
     return new ProcessRunnable(pb);

ankitsiliconithub avatar May 28 '14 14:05 ankitsiliconithub