This discussion is archived
0 Replies Latest reply: Jun 12, 2013 12:17 PM by d0d7721a-65e4-4dd8-8e6e-12f0e540e68a RSS

JMF Importing Video with Zero Frames

d0d7721a-65e4-4dd8-8e6e-12f0e540e68a Newbie
Currently Being Moderated

I've just started to use JMF for a project where I want to measure how an object's size changes over time. I have recorded video with an external device and converted the file into an .avi format (H264 encoding). JMStudio opens the file just fine using both Open File and Open URL (I have found some file types that will open only with Open File but not with Open URL). An odd quirk is that even though the file is an .avi format according to its properties, I have to include ".avi" in the file name for JMStudio to be able to open it (so the official file name is "test4.avi.avi", simply using "test4.avi" returns a player not found error). The problem I'm having is that when I go to write my own code to open and the video file, the file is imported into memory without errors but the imported video consists of zero frames. Alternatively, if I use JMStudio to record video off my webcam, I am able to load that video using my code and return an accurate frame count. (Beyond a frame count this video is giving me a null pointer exception when I try to access a frame, which may or may not be a related issue.)

 

Another important issue is that my JMF install might not be working properly. The JMF diagnostic at <http://www.oracle.com/technetwork/java/javase/jmfdiagnostics-139189.html> returns the error ClassNotFoundException, but from what I can tell my ClassPath is pointing to the right jmf.jar and fobs4jmf.jar (I have added fobs4jmf). My java install is verified by the online diagnostic. I have tried reinstalling JMF but the error persists.

 

This is all on a 32bit Windows 7 machine, with up to date JRE7. The code I am running is almost identical to this <http://popscan.blogspot.com/2012/08/reading-and-processing-video-frames.html>. Also the videos I am interested in are black and white and have no sound. When converting the file formats I made sure to turn off audio encoding, since the original videos didn't have sound anyway.

 

Does anyone have any suggestions on how to fix this issue? Thanks for any feedback or advice.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points