2. AssumeFPS can't help in this case, it can only make fps look better, but it can't bring back dropped frames or remove duplicated frames.
3. and 4. - the things still depends on used splitter\decoder. About preroll - see
here.
5. Thanks. The problem is in this calculation (duration and m_avgframe - both int64):
Code:
num_frames = (int)(duration / m_avgframe); //Truncate
In DSS the same thing looks like this:
Code:
num_frames = (int)((duration + (m_avgframe - 1)) / m_avgframe); //Ceil
But I think that Rounding is better choice
Code:
num_frames = (int)((duration / (double) m_avgframe) + 0.5); //Round
Sometimes it is better to Ceil, sometimes to Round (sometimes to Truncate
), but still there is a chance that calculated value will not equal the real frame count of the video.
That's by design, inaccuracy here and there (incorrect Duration returned by DS, fps=23.976 vs fps=23.9760239760,..), and DSS also affected.
Here is two versions for testing: avss_ceil and avss_round.