fireworkweb / smpte.php

Easily deal with Timecode SMPTE format in PHP
MIT License
7 stars 9 forks source link

Error with frame rates 30-60 #5

Closed seabasss closed 3 years ago

seabasss commented 4 years ago

Hey!

Thanks again for a great library!

If I'm not incorrect I think this part: $timeCodeFormat = '/^(?:[0-1][0-9]|2[0-3])(:|;)(?:[0-5][0-9])\1(?:[0-5][0-9])(:|;)(?:[0-2][0-9])$/'; should be changed to: $timeCodeFormat = '/^(?:[0-1][0-9]|2[0-3])(:|;)(?:[0-5][0-9])\1(?:[0-5][0-9])(:|;)(?:[0-5][0-9])$/'; to support frame rates from 30 and over.

Or make that value dynamic based on frame rate to be even more precise, but it seems like there is a $frames >= round($frameRate) statement that will take care of that later on in the PHP version.

Thanks again!

dbpolito commented 3 years ago

Fixed by https://github.com/fireworkweb/smpte.php/pull/7