Pepa Zapletal
Pepa Zapletal

Reputation: 2979

How to convert subtitles time to start and stop frame (SRT to SUB) and backwards

I want convert SRT subtitles to SUB and backwards. But I don´t know, how to convert time from SRT to start and stop frame from SUB format. Can you help me?

Upvotes: 1

Views: 2926

Answers (3)

Mantas D
Mantas D

Reputation: 4150

You can do it like that:

Subtitles::convert('subtitles.srt', 'subtitles.sub');

Subtitles::convert('subtitles.sub', 'subtitles.srt');

more info: https://github.com/mantas-done/subtitles

Upvotes: 0

bLind
bLind

Reputation: 1

The formula is simple:

Time (in seconds) * FPS (frames per second)(of the video) = {frame}

i.e.:

00:00:00,000 --> 00:00:42,740

Bla bLa blA

calculate:

0*23,976 = 0

42,740*23,976 = 1024

results is:

{0}{1024}Bla bLa blA

Upvotes: 0

Pepa Zapletal
Pepa Zapletal

Reputation: 2979

I founded this solution ...I hope this will help someone other

Upvotes: 1

Related Questions