Page MenuHomePhabricator

Subtitle lines should be broken more evenly
Closed, ResolvedPublic

Description

Currently a subtitle line is broken when it is too long to fit in the video frame. This way, if the line has 12 words and only 10 fit in the frame, the top displayed line will have 10 and the bottom line will have 2.

The subtitles should be broken more evenly, so that line lengths will be more or less equal. As much as possible, character count, word count and actual line length should be taken into account. This will make the subtitles much easier to read.


Version: unspecified
Severity: enhancement

Details

Reference
bz26721

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:22 PM
bzimport set Reference to bz26721.

mdale wrote:

this is kind of tricky problem to solve perfectly via an algorithm, we can relatively easily evenly divide words pre line, but that is not always the ideal breaking point. Sometimes its a coma or end of thought.

What we can do is allow users to include line breaks newlines in the subtitle wikitext so they decide when the line breaks rather than the word count. This lets you break on commas or end of more logical breaking points.

The subtitle parser was not handling <br> very well so that is fixed in r80276
you can see an example here ( once I push out the update )
http://commons.wikimedia.org/wiki/File:Folgers.ogv#t=13
where we break after the comma.