1

FF-MPEG Run-time execution in java not running in windows 10 server.I Have test with my system its working perfectly but in windows 10 server not works.i have also gives the environment variable path in windows 10 but problem is still. my code is following

I Have try all the possible ways to running ff-mpeg command in run-time java environment but error still continues in windows 10 server

String cmd = "ffmpeg -i " + source + " -ar 16000 -ac 1 " + pathwav + wavFileName + ".wav";

        System.out.println("cmd=> "+cmd);
        Process p = Runtime.getRuntime().exec(cmd); 
        p.waitFor();
        System.out.println("Exit value: " + p.exitValue());
        if(p.exitValue()==0)
        {
            System.out.println(wavFileName + " is Created");
            String path = pathwav + wavFileName + ".wav";
            return path;
        }

I Expect Wav File is creates in given path but it not created due to not execution of ffmpeg command

Aakash
  • 21
  • 3
  • Try to specify an absolute path to ffmpeg in cmd – Nikolay Shmyrev Oct 10 '19 at 07:58
  • @Nikolay Shmyrev I have already tried this way but error is still – Aakash Oct 10 '19 at 12:30
  • Any error messages? – llogan Oct 10 '19 at 18:28
  • @llogan yes! this is like: Cannot run program "ffmpeg -i D:\git\speechproject\src\main\webapp\AllAudio\speech.wav -ar 16000 -ac 1 D:\git\speechproject\src\main\webapp\WavFiles\XK9FQYVMUSC0UFHBNQ.wav": CreateProcess error=2, The system cannot find the file specified null – Aakash Oct 11 '19 at 12:13
  • Verify that you are including full path to point to the ffmpeg executable. [See CreateProcess error=2, The system cannot find the file specified](https://stackoverflow.com/questions/19621838/createprocess-error-2-the-system-cannot-find-the-file-specified) – llogan Oct 11 '19 at 17:07

0 Answers0