Use .srt (subRipTile) or SSA (SubStation Alpha)

Jul 20, 2010 at 9:48pm

Use .srt (subRipTile) or SSA (SubStation Alpha)

Hello,
I want to use .srt (subRipTile) or SSA (SubStation Alpha) to add subtitles on video.
I know that Quicktime pro let see a movie with srt subtitle. The srt subtitle must have the same name with the movie in the same folder.
Jit.qt.movie uses Quicktime so we can use srt .
But i only have the free version of Quicktime which don’t work with subtitles.
Is there an other solution to do it?
Best regards

#51427
Jul 27, 2010 at 7:21am

Hello,
I have try with quicktime pro but it don’t work.
I suppose that i should use Perian but it only work on Mac and i’m on Windows.
Is there an other way to use .srt (subRipTile) or SSA (SubStation Alpha) to add subtitles on video.
Is my question right or not?
Because nobody answer to me.
Have a nice day.

#184388
Jul 27, 2010 at 2:36pm

I’m pretty sure I’m correct in saying that jit.qt.movie doesn’t provide any particular help to you in dealing with .srt files, but you can write a program that synchronizes a .mov with a .srt. The .srt format is just plain text and very simple to parse. I think you could build your own in roughly the following way.

Use the text object or the js object to read in the .srt file. The js object would be my choice because you could also use it to parse the file, translate the timecode into QT timescale units, etc. Load the .mov into jit.qt.movie and query its timescale units with the ‘gettimescale’ message. You’ll need to use that value in order to convert the .srt timings into timescale units. As you play a .mov file in jit.qt.movie, you would need to continually poll its current time (in its native timescale units) by sending it the ‘time’ message. When the movie time equals or surpasses the start time of a subtitle, trigger the display of that subtitle, and when the time equals or surpasses the stop time of the subtitle trigger the end of the display of that subtitle and start looking to display the next one. By “trigger the display” I mean write the text of the subtitle into a jit.lcd object then composite that on top of the movie (using jit.op @op + or jit.alphablend), or another way would be to write the text into jit.gl.text2d and render that on top of a jit.gl.videoplane that is showing the movie.

I guess that’s a verbose and complicated explanation. I don’t have time to write an example program, so I hope it’s clear. I don’t think it’s hard to do, but you do pretty much need to build it from scratch, I fear.

#184389
Jul 27, 2010 at 9:34pm

Thank you Christopher, now i see a way to do it.
Best regards.

#184390
Jul 30, 2010 at 10:24pm

Hello,
I have made a patcher but i’m lost to convert the srt file and to synchronise it with the video.
Am i on the right way?
Can someone help me?
Here is my patcher and my srt file:

– Pasted Max Patch, click to expand. –

Have a nice day.

Attachments:
  1. subtitle.srt
#184391
Aug 4, 2010 at 10:56pm

Hello,
Is my question poorly worded?
Have a nice day.

#184392
Aug 6, 2010 at 9:14am

Christopher,
A little help for the JS Object?
Best regards

#184393

You must be logged in to reply to this topic.