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

59.94 Dropframe calculation #9

Open
stephenbickle opened this issue Jun 11, 2021 · 2 comments
Open

59.94 Dropframe calculation #9

stephenbickle opened this issue Jun 11, 2021 · 2 comments

Comments

@stephenbickle
Copy link

Thanks for making such a great library, curiuos, it doesn't seem to like 59.94 DropFrame as far as I can tell, is there a way to make that calculation work?

I get: InvalidArgumentException: Frame rate not supported

Thank you so very much!
S

@dbpolito
Copy link
Member

Hey @stephenbickle , maybe the docs needs some improvements but i think it is supported:

https://github.com/fireworkweb/smpte.php/blob/master/src/FrameRate.php#L13

So if you use the constant it should work as it's a big number...

@stephenbickle
Copy link
Author

stephenbickle commented Jun 11, 2021

I think you are right, it was an issue that the timecode was 00:00:00:00 instead of 00:00:00;00 but I had seen an error earlier when I tried to do dropframe calc that said only 29.97, its at the end of Validation.php

Thanks for the reply and a kickass library! Have a great weekend!

public static function isFrameRateSupported(float $frameRate, bool $dropFrame) : bool { if ($frameRate !== 30000/1001 && $dropFrame) { throw new \InvalidArgumentException('Only 29.97 frame rate has drop frame support.'); }
return in_array($frameRate, self::SUPPORTED_FRAMERATES); }

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

No branches or pull requests

2 participants