problem description
java.io.IOException: Cannot run program "cd / data/ffmpeg/bin": error=2, does not have that file or directory
the environmental background of the problems and what methods you have tried
this is the directory I came out with pwd, which is available on the linux machine.
related codes
/ / Please paste the code text below (do not replace the code with pictures)
Process p;
try {
p = Runtime.getRuntime().exec(new String[]{"cd /data/ffmpeg/bin","-c","./ffmpeg -i "+audioUrl});
// p = Runtime.getRuntime().exec("ping -c 3 www.baidu.com");
p.waitFor();
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = "";
while ((line = reader.readLine())!= null) {
output.append(line);
LOG.info(""+line);
}
} catch (Exception e) {
e.printStackTrace();
}