这个错误发生在jave中。
我如何解决这个问题并获得视频元数据?
public static void GetInfo() throws FileNotFoundException, InputFormatException, EncoderException{
//File f=new File("C:"+File.separator+"201701190004"+File.separator+".mxf");
File f = new File("C://test1.mp4");
FileInputStream file=null;
if(f.exists()) {
file = new FileInputStream(f);
System.out.println("file is exist");
//rest of code
} else{
System.out.println("The file does not exist!Please enter correct filename!");
}
Encoder encoder =new Encoder();
MultimediaInfo info = encoder.getInfo(f);
System.out.println(info.getVideo());
}
}enter image description here
错误:
file is exist
Exception in thread "main" it.sauronsoftware.jave.InputFormatException
at it.sauronsoftware.jave.Encoder.parseMultimediaInfo(Encoder.java:659)
at it.sauronsoftware.jave.Encoder.getInfo(Encoder.java:487)
at ColorDetection.GetInfo(ColorDetection.java:39)
at ColorDetection.main(ColorDetection.java:23)