FPS

Dec 10, 2011 at 4:30 PM

Hi,

Is there a way of getting the fps of a AsfFile?

Thanks.

Coordinator
Sep 8, 2012 at 3:53 PM
Edited Sep 8, 2012 at 3:54 PM

Hi Chris - better late than never - you can get the FPS from the AsfExtendedStreamProperties object, below an example:

AsfFile asfFile = new AsfFile(testVideoFileName);
AsfExtendedStreamProperties asfExtendedStreamProperties = asfFile.GetAsfObject<AsfExtendedStreamProperties>();

if (asfExtendedStreamProperties.AvgTimePerFrame > 0)
{
    double frameRate = 1.0 / TimeSpan.FromTicks((long)asfExtendedStreamProperties.AvgTimePerFrame).TotalSeconds;
}