[MPlayer-dev-eng] Re: Re: [PATCH] Subtitles formatting

Vladimir Mosgalin mosgalin at VM10124.spb.edu
Tue Sep 2 10:20:21 CEST 2003


On Tue, 2 Sep 2003, Salvatore Falco wrote:

SF>	I tried also with a space, but I can't reproduce the bug.
SF>I'm working on the CVS version (20030829). Maybe you can send me, by
SF>private e-mail, your subreader.c, subreader.h and libvo/sub.c.
SF>
SF>	I also finished the subtitle aligning patch... the problem is
SF>that I only know how JACOsub format encodes subtile alignment... does

Wow, that's great! Supporting all aligment tags in even jacosubs would
be useful.

Btw, mplayer ignores jacosubs autoload for some reason. All js files I
got have extension .js, mplayer should autoload them too!

diff -uNr mplayer/subreader.c mplayer.old/subreader.c
--- mplayer/subreader.c Tue Jul 29 14:00:05 2003
+++ mplayer.old/subreader.c Tue Jul 29 13:58:53 2003
@@ -1613,7 +1613,7 @@
     char *tmp_fname_noext, *tmp_fname_trim, *tmp_fname_ext, *tmpresult;

     int len, pos, found, i, j;
-    char * sub_exts[] = {  "utf", "utf8", "utf-8", "sub", "srt", "smi", "rt", "txt", "ssa", "aqt", "jss", "ass", NULL};
+    char * sub_exts[] = {  "utf", "utf8", "utf-8", "sub", "srt", "smi", "rt", "txt", "ssa", "aqt", "jss", "js", "ass", NULL};
     subfn *result;
     char **result2;


SF>anyone know a place where I can find other formats definitions? I assume
SF>mpsub has not an alignment field, right? ;)

My friend has some information on other formats and examples of very
'complex' subtitles, with different aligment/fonts/colors (he was
writing code to support them in player for windows). I'll contact him
and will sure get something useful, but this will take some days.


Btw, there seems to be a bug in your patch. With new sub.c mplayer
sometimes prints messages like

osd text out of range: bbox [...], txt [...]

and misses some symbol from the subtitle. Here is the simples example
(srt file):

1
00:00:04,137 --> 00:00:12,841
may be I can draw that
kind of future into place.

with any video, it prints
osd text out of range: bbox [61 411 262 352], txt [395 412 299 352]

and the last dot is missing. Without patch, everything is OK.

-- 

Vladimir



More information about the MPlayer-dev-eng mailing list