Log in

View Full Version : Playback of positioned subtitles (srt with X & Y co-ords)


sharingan
1st June 2006, 17:11
I have made a lot of subtitle files with SubRip (srt) that preserve the subtitles position within the video.

However, I cannot get any playback method (player/filter) to position these within the video.

So my questions are:
1. Does any subtitle filter support coordinate information in srt files?
2. If yes, which, and how do you enable them?
3. If no, what subtitle converters recognise and convert srt co-ordinate information into SSA/ASS co-ordinate information?

I haven't found any answers to this anywhere else. Posted it seperately rather than at the end of the big SubRip thread.

Adub
1st June 2006, 17:21
what kind of video are you using?

Just a thought you might want to try subtitle creator. It is a sticky in this thread.

sharingan
1st June 2006, 17:27
xvid-avi, made with Auto GK.

Subtitle display, colour information is preserved, but the co-ordinate information is ignored. So subtitles that should be displayed at the top of the screen, or overlaid on asian text are just bunched in at the bottom.

I tried converting to ASS/SSA with Subtitle Workshop, but that seemed to ignore the co-ordinate information too.

I will check out Subtitle Creator.

manusse
1st June 2006, 20:26
Next version of SubtitleCreator (2.00) should be able to do that but only with DVDs.

If you can reauthor your files to a DVD structure, then this could be the solution.

Maybe there is a better solution?

sharingan
2nd June 2006, 10:09
I tried Subtitle Creator, it doesn't read in the co-ordinate information from the SRT file.

Just to make myself clear, I want to find a way for the co-ordinate information in my SRT files to be used during playback.

Either
1. I find a filter that supports srt coordinates & configure it
2. I find a tool that transforms the co-ordinate information into another text subtitle format that is supported by players (SSA/ASS etc.)
or lastly:
3. Someone to tell me that SRT co-ordinates are supported by absolutely nothing. It will save time looking for something that doesn't exist and I can see what I can do. Annoyingly SubRip wont open SRTs and allow me to output them as something else.

klinika
2nd June 2006, 10:59
I tried converting to ASS/SSA with Subtitle Workshop, but that seemed to ignore the co-ordinate information too.

If you got a lot of those srt's, it would probably be worth it to learn a little programming ;) It's not that difficult to code a little conversion program yourself.

sharingan
2nd June 2006, 12:04
If you got a lot of those srt's, it would probably be worth it to learn a little programming ;) It's not that difficult to code a little conversion program yourself.

Well I do know coding, and SRTs look particularly easy to parse. However I don't know *anything* about the format/specs of the target format (ASS/SSA).

To tell you the truth I was thinking along the same lines myself. The SRTs represent a good chunk of my DVD collection that I have been steadily SubRip-ing for the past few months. I was hoping that something might be supporting the co-ordinates by now. Reripping the DVDs into SSA just sounds too painful really. I was hoping to leverage the work I had already done.

manusse
2nd June 2006, 13:04
As I've replied the next to come release of SubtitleCreator (2.0.0) will support srt positioning. However the current version (1.9.2) doesn't.

Either you are patient and wait for the official release.

Or you download the source code from CVS (see http://forum.doom9.org/showthread.php?p=833410#post833410).

And compile it using SharpDevelop: http://www.icsharpcode.net/OpenSource/SD/Download/.

Then you will able either to play the DVD+subs in SubtitleCreator or to reauthor your DVDs.

Manusse

sharingan
2nd June 2006, 13:22
But will Subtitle Creator support any other conversion formats other than SRT or SUP?

Its playback with conventional Media Players (MPC preferred) that I need. I am only looking at subtitle tools that might allow me to convert these SRTs into another text-based subtitle format (like SSA) that has well-supported positional text in the main filters.

So if Subtitle Creator 2.00 correctly utilises SRT positional information, but doesn't export to another text based subtitle format, its no good to me.

I have been patient so far, but after recently updating codecs etc. I thought something would have implemented SRT co-ordinates by now. Its frustrating that such a usefil addition was added to the format with no support. Whats more annoying is that the common converters dont support it either. If I had known that the feature was such a white elephant I would have been ripping directly into SSA instead.

manusse
2nd June 2006, 13:28
Sorry, but SubtitleCreator can only save subs to sup or srt.
So it will not do the job for you.

sharingan
2nd June 2006, 13:33
Shame. Thanks for the help though.

Unless someone locates the 'enable SRT positioning' checkbox in whatever filter/player/convertor etc. for me (I am stumped), it looks like my real choices are:

1. write my own SRT-> SSA convertor
2. Wait for someone else to do it, or for it to be incorporated into VSFilter

Its summer, the weather is lovely and I smell barbeque, so I guess that means option 2.

klinika
2nd June 2006, 14:50
Well, there's a question of mapping the coordinates to individual subtitle lines. I'm not actually sure, but I think srt's x1 y1 x2 y2 refer to the top left and bottom right corners of the sub picture, and since the picture can contain any number of lines anywhere in it, it gets kinda confusing when it comes to translating the coordinates to positioning data for each individual line. Granted, the first and last line of the subpicture can be easily mapped to top and bottom coordinates, but other lines not so. Someone correct me if I'm wrong.

sharingan
2nd June 2006, 15:11
I suspect as much. But I wouldn't expect anything too precise.

In fact the player/filter would need a lot of flexibility to make this work, and treat those co-ordinates as guidelines only. Those co-ordinates are correct for the DVD resolution they came from, but when you re-use them with a smaller resolution encode that you made from that DVD, it would need to override them, or you would need to rescale the co-ordinates.

Really %X and %Y would have been more useful, and the player itself needs to override some settings to make them sensible, treating the coordinates as a 'canvas' for laying out the subtitles however it feels is appropriate (wrt number of lines, font size etc.)

Perhaps the complexity involved in utilising these co-ordinates properly and having a visually sensible result is the reason they are not used.

klinika
2nd June 2006, 18:39
Perhaps the complexity involved in utilising these co-ordinates properly and having a visually sensible result is the reason they are not used.

I agree. Some time back I wrote a very simple and ugly perl script that won't qualify posting here that does convert .srt to .ass, it reads the y1 coordinate comparing it to a threshold variable and maps the entire lines of dialogue to either top or bottom margin. I gave up on that point because of the reasons above. More than two lines of dialogue, and it just doesn't have a clue.

Extracting the individual dialogue line positions from subpictures themselves should do the trick though. It's a shame that subrip doesn't use that info. At least not that I know of...

gameplaya15143
2nd June 2006, 21:05
1. write my own SRT-> SSA convertor
2. Wait for someone else to do it
You won't have to wait long.
http://www.svsu.edu/~mmdupuis/skosc/
Just wait a bit for the first alpha version to be posted. Should be there either later today or maybe tomorrow.

note: SSA doesn't support full positioning, so only the vertical position will hold.