Skip to content

Fix frame rate calculation using handler duration #387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2019

Conversation

payton
Copy link
Collaborator

@payton payton commented Jan 17, 2019

Fixes #386

After fix, new frame rates as shown below (with sample file provided in corresponding issue):

Metadata-Extractor VLC Exiftool ffmpeg
30.051 30.050836 30.051 30.05

All frame rates in metadata-extractor-images remain the same.

sampleCount += ec.sampleCount;
}

float frameRate = (float) Mp4HandlerFactory.HANDLER_PARAM_TIME_SCALE/((float) Mp4HandlerFactory.HANDLER_PARAM_DURATION / sampleCount);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume entries will always have one item, otherwise we'll be dividing by zero.

@drewnoakes drewnoakes merged commit a958e0b into drewnoakes:master Feb 14, 2019
@drewnoakes
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MP4 Incorrect Frame Rate from Snapchat Video
2 participants