YoshiWalsh / aegisub-timewarp

Aegisub Automation to linearly stretch time
MIT License
4 stars 1 forks source link

What is the format of time codes to enter? #1

Open Dioxaz opened 2 years ago

Dioxaz commented 2 years ago

Hello. Despite the description written on the main page, I have trouble to figure out how to enter time codes that are above the 1 minute mark.

By default, "0." is input into text boxes and it seems I can't type time codes manually. I have to have them pasted from clipboard. Then, there comes my problem. When pasting something like "0:21:36.70", this is either misinterpreted or all my time codes are replaced by zeroes.

So, in my case, I want to stretch as follows: Original Time A: 0:00:04.70 New Time A: 0:00:05.30 Original Time B: 0:21:36.70 New Time B: 0:21:39.30

How am I supposed to make the plugin do my stretching as mentioned? If it's ever possible. If input exactly as mentioned, all I get are zeroes. However, if I replace "0:00:04.70" by "04.70" and "0:00:05.30" by "05.30", stretching is done, but not like I wanted it: no matter what I input as Original Time B and New Time B, my last line starts at "0:24:22.23" instead of the "0:21:39.30" I wanted. So it looks like I clearly missed something obvious here.

Regards

YoshiWalsh commented 2 years ago

Hi, sorry for the lack of clarity in the documentation. The times should be entered in seconds.

In your case:

Original Time A: 4.7 New Time A: 5.3 Original Time B: 1296.7 New Time B: 1299.3

If the code can't understand your timestamp, it treats it as zero. Also, the code doesn't care if A or B comes first, it will work just fine either way. So since the code couldn't understand your B values, it was basically doing this:

Original Time A: 0 New Time A: 0 Original Time B: 4.7 New Time B: 5.3

5.3 / 4.7 * 1296.7 = 1462.24 (0:24:22.24)

So that explains the undesired stretching that you were seeing.

Hope this helps, let me know how it goes.

Dioxaz commented 2 years ago

Yes, definitely. Thank you very much. I thought about it today while going back home and suddenly had a flash: and if I entered my times converted to seconds instead? And that was exactly it. I think this tool may be of a precious help for later, when encountering weird cases or framerate mismatches. Great of you for having taken the time for developing this automation.

grogcw commented 2 years ago

Hi ! It might be great to have HH:MM:SS:FF inputs, but once I read your post in this issue, I knew how to use your script, so no problems here, I just wanted to thank you for your work !

Unknow0059 commented 6 months ago

Thanks. It would indeed be nice to have HHMMSSCS inputs. For now I made a Google Sheets converter.