[英]OpenIMAJ not able to access video file
I am using OpenIMAJ to draw facial keypoints on a video but it is stuck at the first step itself. 我正在使用OpenIMAJ在视频上绘制面部关键点,但它停留在第一步本身。 Here is the code I am trying to run::
这是我尝试运行的代码:
Video<MBFImage> video;
video = new XuggleVideo("file://E:/AV/out2.flv");//XuggleVideo("file:"+fileName);
VideoDisplay<MBFImage> display = VideoDisplay.createVideoDisplay(video);
display.addVideoListener(
new VideoDisplayListener<MBFImage>() {
public void beforeUpdate( MBFImage frame ) {
FaceDetector<DetectedFace,FImage> fd = new HaarCascadeDetector(40);
List<DetectedFace> faces = fd.detectFaces( Transforms.calculateIntensity(frame));
for( DetectedFace face : faces ) {
frame.drawShape(face.getBounds(), RGBColour.RED);
}
}
public void afterUpdate( VideoDisplay<MBFImage> display ) {
}
});
When I run this It prints 当我运行它时它打印
file:///E:/AV/out2.flv URL file:///E:/AV/out2.flv could not be opened by ffmpeg.
文件:/// E:/AV/out2.flv URL文件:/// E:/AV/out2.flv无法由ffmpeg打开。 Trying to open a stream to the URL instead.
尝试打开指向URL的流。 11:14:12.505 [Finalizer] DEBUG com.xuggle.xuggler - Closing dangling Container (../../../../../../../csrc/com/xuggle/xuggler/Container.cpp:146)
11:14:12.505 [Finalizer]调试com.xuggle.xuggler-关闭悬空的容器(../../../../../../../csrc/com/xuggle/xuggler/Container。 CPP:146)
on the screen and then just dies out. 在屏幕上消失,然后消失。 result is same if I use video = new XuggleVideo(new File("E:/AV/out2.flv"));
如果我使用video = new XuggleVideo(new File(“ E:/AV/out2.flv”)),结果是相同的;
Also if I keep file in the project and then do video = new XuggleVideo(new File("out2.flv")); 另外,如果我将文件保留在项目中,然后执行video = new XuggleVideo(new File(“ out2.flv”)); I get same result.
我得到相同的结果。
I am able to access the file if I put the link in the browser. 如果将链接放在浏览器中,则可以访问该文件。 What is going wrong?
怎么了?
Update: I get just this 更新:我得到这个
out2.flv 12:03:06.485 [Finalizer] DEBUG com.xuggle.xuggler - Closing dangling Container (../../../../../../../csrc/com/xuggle/xuggler/Container.cpp:146)
out2.flv 12:03:06.485 [Finalizer]调试com.xuggle.xuggler-关闭悬空的容器(../../../../../../../csrc/com/xuggle/xuggler /Container.cpp:146)
If I use video = new XuggleVideo("out2.flv");
如果我使用
video = new XuggleVideo("out2.flv");
Remove "File" and give your path only as "E:/AV/out2.flv". 删除“文件”,并将路径仅作为“ E:/AV/out2.flv”。 It will work.
它会工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.