public static String mxf2ts(File file,String fileName){
String mxfFilePath = "\""+file.getPath()+"\"";// mxf文件
String tsFilePath = "\""+file.getParent() + File.separator + fileName + ".ts"+"\"";// ts文件
try {
String command ="e:\bohui\mxf2ts\TransCodec.exe -i " +mxfFilePath+ " -o " + tsFilePath+" -ac mp2";
Process process = Runtime.getRuntime().exec(command);
这段代码是我调用的方法,当文件名有连续两个空格时就转换不成功,但是直接在dos窗口上是没有问题的,是什么原因啊,大神们求帮助
给文件名加引号
.............