User-agent: Mozilla Thunderbird 0.6 (Macintosh/20040502)
Hi,
I am using QT4J to deal with MPEG-1 files. As regularly pointed out in
this list, QT cannot see the audio and video separately but see MPEG-1
files as a somewhat opaque muxed block, and so on. Having that in mind:
I am trying to get to know the exact framerate of any (MPEG1) opened
file, fortunately, there is a KB article:
Translating the code to QT4J I am getting straightforward stuff:
track = movie.getIndTrackType(1,StdQTConstants.visualMediaCharacteristic,StdQTConstants.movieTrackCharacteristic);
videoMedia = track.getMedia();
mpegMedia = (MPEGMedia) videoMedia; //exception if not MPEG, no problem
MPEGMediaHandler mediaHandler = null;
if (mpegMedia!=null) mediaHandler = (MPEGMediaHandler)mpegMedia.getHandler();
movie.task(0); //as stated in article
QTPointer encodedFrameRate = mediaHandler.getPublicInfo(StdQTConstants5.kMHInfoEncodedFrameRate);
byte[] frameRate = encodedFrameRate.getBytes();
System.out.println(frameRate);
Only thing different from the article is that the 'characteristic' used to get the track type is 'kCharacteristicHasVideoFrameRate' which I can't find anywhere... However, as MPEG-1 files have only one 'track', there does not seem to be any problem with using 'visualMediaCharacteristic'.
Code runs, but onle a single '0' byte is returned as the frame rate.
Should I file a bug report? (Gotta keep them going folks)