byroot / pysrt

Python parser for SubRip (srt) files
GNU General Public License v3.0
446 stars 67 forks source link

Fixed rate command #64

Open qarkai opened 7 years ago

qarkai commented 7 years ago

If ratio is final/initial then time should be divided by it, not multiplied.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 71.919% when pulling cb62de38c71ce5ed14ad7dc1ab528a063d81a7a7 on qarkai:master into 331b344656052a8444ba5b85974972defe0d028f on byroot:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 71.919% when pulling cb62de38c71ce5ed14ad7dc1ab528a063d81a7a7 on qarkai:master into 331b344656052a8444ba5b85974972defe0d028f on byroot:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 71.919% when pulling cb62de38c71ce5ed14ad7dc1ab528a063d81a7a7 on qarkai:master into 331b344656052a8444ba5b85974972defe0d028f on byroot:master.

qarkai commented 7 years ago

The more framerate the less time value should be because there will be more text per second. Frame = Time * Framerate. Frame is the same, Framerate changes, we need to calculate new Time: T_new * F_new = T_old * F_old T_new = T_old * (F_old/F_new) Since Ratio = F_new/F_old then T_new = T_old * (1/Ratio) T_new = T_old/Ratio

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.5%) to 72.267% when pulling 32361e2de2e97bd5e4bd032467dc79cf1d5f6693 on qarkai:master into 331b344656052a8444ba5b85974972defe0d028f on byroot:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.5%) to 72.267% when pulling 9598d8279255d57e77b6d56abc5a144131c5087f on qarkai:master into 331b344656052a8444ba5b85974972defe0d028f on byroot:master.