[MPlayer-dev-eng] subtitle wrapping

D Richard Felker III dalias at aerifal.cx
Tue Mar 25 04:26:13 CET 2003


Gabu brought this up a while back, and it was never really
addressed....maybe no one understood him. Anyway, the way MPlayer
currently wraps subtitles that are too long to fit on one line is a
bit broken, IMO. Often you end up with one line that fills the full
width of the screen, followed by just one or two short words on the
second line. This makes it very hard to read the subtitles. In the
past discussion, someone pointed out that you can set the margins for
subtitles, so that they don't go to the extreme edges of the picture,
and this helps somewhat, but it doesn't really get to the heart of the
problem.

Instead, MPlayer should (at least optionally) try to optimize subtitle
wrapping so that the resulting split lines are all approximately the
same width. I started looking into implementing this several weeks
ago, but I didn't understand the code (and it had nothing to do with
the spacing!! :). Would someone who's worked on subtitles a bit
comment on where the modifications to do this would need to be made?

Another related idea that's probably worth implementing along with
this is giving preference to splitting lines right after certain
configurable characters (".,;:" etc. by default). This greatly
improves readability by keeping logical units of the sentence from
being split across lines when possible.

Rich



More information about the MPlayer-dev-eng mailing list