1
Coding Snacks / Re: [Solved] Adjust Subtitle (SRT) Timestamps
« on: December 21, 2020, 01:54 AM »
It didn't like the linebreaks in your j.srt 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 j.srt):
into this (clipboard):
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 j.srt):
304
00:33:21,776 --> 00:33:25,361
No! I have lice.
305
00:35:17,846 --> 00:35:20,847
We'll sing again together,
just like before.
00:33:21,776 --> 00:33:25,361
No! I have lice.
305
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.
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.