求救mencoder问题,急!!!
mencoder在命令行下,转换视频没有问题。
我用JAVA程序调用,运行几秒钟就停止不动了,JAVA程序和mencoder.EXE进程也没结束。
请问是什么问题呀。
JAVA代码如下:
try {
ProcessBuilder builder = new ProcessBuilder();
builder.command(commend);
Process process = null;
process = builder.start();
java.io.InputStream stderr=process.getInputStream();
InputStreamReader isr=new InputStreamReader(stderr);
BufferedReader br = new BufferedReader(isr);
String line = null;
while ((line = br.readLine())!= null)
System.out.println(line);
int exitVal=1;
exitVal = process.waitFor();
if (exitVal==0){
System.out.println( "视频文件转换成功!!! ");
}else{
System.out.println( "视频文件转换失败!!! ");
}
} catch (Exception e) {
e.printStackTrace();
}
JAVA程序运行结果:
MEncoder dev-SVN-rUNKNOWN-4.2.1 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Celeron(R) CPU 2.13GHz (Family: 15, Model: 4, Stepping: 9)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0 data: 0x0 - 0x4f2674
ASF file format detected.
[asfheader] Audio stream found, -aid 1
[asfheader] Video stream found, -vid 2
VIDEO: [WMV1] 320x240 24bpp 1000.000 fps 314.0 kbps (38.3 kbyte/s)
[V] filefmt:6 fourcc:0x31564D57 size:320x240 fps:1000.00 ftime:=0.0010
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 32000 Hz, 2 ch, s16le, 32.0 kbit/3.13% (ratio: 4000-> 128000)
Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg 's libavcodec codec family
Selected video codec: [ffwmv1] vfm: ffmpeg (FFmpeg M$ WMV1/WMV7)
==========================================================================
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (320x240 fourcc=34504d46 [FMP4])
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos: 0.0s 1f ( 1%) 0.00fps Trem: 0min 2mb A-V:0.000 [0:0]
Pos: 0.1s 2f ( 1%) 0.00fps Trem: 0min 2mb A-V:0.003 [0:0]
Pos: 0.1s 3f ( 1%) 0.00fps Trem: 0min 2mb A-V:0.009 [0:0]
Pos: 0.2s 4f ( 1%) 0.00fps Trem: 0min 2mb A-V:0.011 [0:0]
Pos: 0.2s 5f ( 1%) 0.00fps Trem: 0min 3mb A-V:0.014 [0:0]
Pos: 0.2s 6f ( 1%) 0.00fps Trem: 0min 3mb A-V:0.013 [0:0]
到这就不动了。
[解决办法]
视聘转换的,我不太明白,学习了,