Reputation: 1335
I am using OpenIMAJ to draw facial keypoints on a video but it is stuck at the first step itself. 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. Trying to open a stream to the URL instead. 11:14:12.505 [Finalizer] DEBUG com.xuggle.xuggler - Closing dangling Container (../../../../../../../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"));
Also if I keep file in the project and then do 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)
If I use video = new XuggleVideo("out2.flv");
Upvotes: 1
Views: 380
Reputation: 518
Remove "File" and give your path only as "E:/AV/out2.flv". It will work.
Upvotes: 0