ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Coding Snacks

[Solved] Adjust Subtitle (SRT) Timestamps

<< < (2/2)

Show me the exact command line you've used and a link to the .srt file to download it, please.
-highend01 (December 20, 2020, 12:32 PM)
--- End quote ---

I'm new to the whole subtitle thing, so I just did a search and found an admittedly sketchy looking site that I'm not sure can be trusted. So instead of linking you to that site, I've attached the file I downloaded, which I renamed to make it easier to type in the command line and have zipped since the site doesn't allow attaching SRT files.

I also renamed your AHK file to "adjust srt times.exe" to make it slightly easier to deal with.

The command I used was:

"adjust srt times.exe" "00:34:09,263" -95000

It tells me the details are copied to the clipboard, but when I paste it into a text file, I get what I posted above; all entries are blank.

It didn't like the linebreaks in your file, hence the output
The timestamp you're using on the command line doesn't exist in the file so I've changed the logic to:
It begins to shift times beginning with the first timestamp that is larger (or equal to) than the one you're giving on the command line.
Before it was: Once the given timestamp matches one in the file, begin to shift from there...

So with "00:34:09,263" it will turn this (from

--- ---304
00:33:21,776 --> 00:33:25,361
No! I have lice.

00:35:17,846 --> 00:35:20,847
We'll sing again together,
just like before.

into this (clipboard):

--- ---304
00:33:21,776 --> 00:33:25,361
No! I have lice.

305 -> These (and all following) timestamps will be shifted by -95 seconds
00:33:42,846 --> 00:33:45,847
We'll sing again together,
just like before.

I use Subtitle Edit for all...uhhh...subtitle editing.   :P
-skwire (December 20, 2020, 08:46 AM)
--- End quote ---

Me too but I've found myself using VS Code with a subtitle extension more lately.

Only really resort to Subtitle Editor if I need to change the frame rate now.


[0] Message Index

[*] Previous page

Go to full version