Skip to content
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

Check fps of source and set for output #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joley-gh
Copy link

@joley-gh joley-gh commented Jan 8, 2024

These changes add the mediainfo tool to analyze the source media and get the frame rate.
The mediainfo binary was installed with brew on my M2 and seems to be a Mach-O 64-bit executable arm64.
It might be better to replace it with a x64 version to support all systems.

With the extracted framerate it is possible to force mkvmerge to use the correct framerate.

@nekno
Copy link
Owner

nekno commented Jan 9, 2024

Hi @joley-gh, thanks for your PR! Would you say this is a common problem you're encountering, or how often would you say an incorrect framerate is an issue?

I've never run into it as a problem, so I'm hesitant to rely on MediaInfo to force a framerate when the source typically should have it set as intended.

@joley-gh
Copy link
Author

joley-gh commented Jan 9, 2024

Hey @nekno
I encountered the problem when submitting a profile 8 file, which content mapping I wanted to convert from v4.0 to 2.9.

To invetigate further I tested some more files:

  1. Profile 8, (CM v2.9), Frame Rate 23.976 FPS
    -> file size reduced (strange) + Frame Rate 25.000 FPS

  2. Profile 8, (CM v4.0), Frame Rate 24.000 FPS
    -> file size reduced (ok since cm data gets removed) + Frame Rate 25.000 FPS

  3. Profile 7, (CM v4.0), Frame Rate 23.976 FPS
    -> file size reduced (ok since cm data gets removed) + Frame Rate 23.976 FPS

When converting from profile 7 to 8 the fps problem does not arise.
Something seems to go wrong when a file with profile 8 is provided. The frame reate is always set to 25.000 in that case.

The file reduction in test 1 is weird and also occures with my fix. It also occures if I set the entries in config.json to false.

@nekno
Copy link
Owner

nekno commented Feb 20, 2024

Hi @joley-gh — I've been attempting to find cases where this is needed, but I just haven't run across it. Do you think this is something that's routinely needed, or more likely an edge case you encountered in a file or two?

Adding the additional mediainfo binary plus all the processing to find and set the framerate when it isn't typically needed is a lot of overhead. There's also potential it could set the values incorrectly or make other undesirable changes.

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.

2 participants