Quicktime doesn't think in terms of fps, all it cares about is how much time occurs
between frames, so fps isn't a value you can directly retrieve from a movie. There are two general approaches:
To derive the
average fps you can take total frames / total seconds. Unfortunately, Quicktime also doesn't care about the total number of frames, so you can't retrieve that directly either. The most reliable way to get the total number of frames is to step through the movie one frame at a time and count them yourself.
The other approach is to
assume that every frame in the movie has exactly the same duration, then divide the time scale by the time between successive frames (the number of media samples) to get fps. (then you only need to read one frame instead of all of them) This approach can actually be more accurate for some frame rates (like NTSC where timescale=30000, samples=1001, fps~=29.970029...; sometimes approximated as timescale=2997, samples=100, fps=29.97)
There's some code in
here that you could (with some minimal effort on your part) repurpose for either approach, hth.