我正在使用sub4me上的MediaInfo.java类 从各种视频文件格式中提取元数据。但是我在运行时收到上述错误。
这是我的代码的摘录,异常被抛出MediaInfo info = new MediaInfo()
String fileName = "file:///homes/sa303/NetBeansProjects/MoviePlayer1/src/Trailer/IronMan3.mp4";
File file1 = new File(fileName);
System.out.println(file1.getPath());
MediaInfo info = new MediaInfo();
info.open(file1);
String format = info.get(MediaInfo2.StreamKind.Video, 1, "Format", MediaInfo2.InfoKind.Text, MediaInfo2.InfoKind.Name);
String bitRate = info.get(MediaInfo2.StreamKind.Video, 1, "BitRate", MediaInfo2.InfoKind.Text, MediaInfo2.InfoKind.Name);
String frameRate = info.get(MediaInfo2.StreamKind.Video, 1, "FrameRate", MediaInfo2.InfoKind.Text, MediaInfo2.InfoKind.Name);
String width = info.get(MediaInfo2.StreamKind.Video, 1, "Width", MediaInfo2.InfoKind.Text, MediaInfo2.InfoKind.Name);
String audioBitrate = info.get(MediaInfo2.StreamKind.Audio, 1, "BitRate", MediaInfo2.InfoKind.Text, MediaInfo2.InfoKind.Name);
String audioChannels = info.get(MediaInfo2.StreamKind.Audio, 1, "Channels", MediaInfo2.InfoKind.Text, MediaInfo2.InfoKind.Name);