Hello,
I want to get the number of frames in a video file but I get always only the value for tfTime. My code is the following:
if ievTmp.IO.DShowParams.Connected then begin
ievTmp.IO.DShowParams.Disconnect;
end;
ievTmp.IO.DShowParams.FileInput := AnsiString(sFN);
ievTmp.IO.DShowParams.Connect;
ievTmp.IO.DShowParams.Position := 0;
ievTmp.IO.DShowParams.Pause;
ievTmp.IO.DShowParams.TimeFormat := tfTime;
//it's OK:
nxgVCM.Cells[5, iTmpRow] := secs2str(ievTmp.IO.DShowParams.Duration);
nSec := ievTmp.IO.DShowParams.Duration / 10000000;
//it's not OK:
ievTmp.IO.DShowParams.TimeFormat := tfFrame;
sFPS := IntToStr(ievTmp.IO.DShowParams.Duration);
nSec are 89 seconds = OK. sFPS is the same: the 89 seconds in 100 Nanoseconds. What is wrong?
Thank you.
Jens