PDA

View Full Version : showSMPTE behaviour


Phil Rhodes
1st October 2008, 03:54
Hi,

There's a slight ambiguity in the wiki page. It says:

If the framerate of the clip is between 29.969 and 29.971 drop-frame timecode is enabled.

The concern is that clip, which is specifically what that line refers to, wouldn't necessarily be 29.97, but the FPS argument could be.

Does drop frame code also apply if the FPS argument of the showSMPTE filter is set to between 29.969 and 29.971?

P

IanB
1st October 2008, 05:05
ShowSMPTE::ShowSMPTE(PClip _child, double _rate, const .... , IScriptEnvironment* env)
...
else if (_rate > 29.969 && _rate < 29.971) {
rate = 30;
dropframe = true;
}
....
AVSValue __cdecl ShowSMPTE::CreateSMTPE(AVSValue args, void*, IScriptEnvironment* env)
...
double def_rate = (double)args[0].AsClip()->GetVideoInfo().fps_numerator
/ (double)args[0].AsClip()->GetVideoInfo().fps_denominator;
double dfrate = args[1].AsFloat(def_rate);
...
return new ShowSMPTE(clip, dfrate, ... , env);
}

Phil Rhodes
1st October 2008, 13:26
Uh, right, OK.

What does any of that mean?

P

IanB
1st October 2008, 15:20
It's a source code fragment for what you asked about. :p

So framerate is taken from the clip properties unless you specify it with FPS=.

If the framerate is between 29.969 and 29.971 non inclusive then use 30fps drop frame counting.