Posted on 2010-02-06 22:07
疯狂 阅读(2204)
评论(1) 编辑 收藏 所属分类:
java
import java.io.IOException;
public class TestMencoder {
public static void main(String[] args) {
String outPath="e:\\output\\o1.flv";
String inPath="e:\\74.2.mpg";
String cmd4="e:\\test_par.bat " + inPath+ " "+outPath;
try {
Process pr=Runtime.getRuntime().exec(cmd4);
pr.getInputStream();
System.out.println(cmd4);
} catch (IOException e) {
e.printStackTrace();
}
}
}
bat文件
cmd /c start D:\foresee\workspace3.2\rr\ffmpeg\ffmpeg.exe -i %1 -y -ab 32 -ar 11025 -b 400000 -s 320*240 %2
echo 完成!
echo. & pause