[mythtv-commits] Ticket #10194: Add formatting support for SRT subtitles

MythTV noreply at mythtv.org
Mon Jan 23 18:30:42 UTC 2012


#10194: Add formatting support for SRT subtitles
------------------------------------------------+--------------------------
 Reporter:  Jim Stichnoth <stichnot@…>          |          Owner:  danielk
     Type:  Patch - Feature                     |         Status:  assigned
 Priority:  minor                               |      Milestone:  0.25
Component:  MythTV - General                    |        Version:  Master
 Severity:  medium                              |  Head
 Keywords:                                      |     Resolution:
                                                |  Ticket locked:  0
------------------------------------------------+--------------------------

Comment (by Jim Stichnoth <stichnot@…>):

 You can use ccextractor (http://ccextractor.sourceforge.net/) on a
 suitable U.S. ATSC recording to get an SRT file with italics, colors, and
 underlining.  Italics are reasonably common, especially for off-screen
 dialog.  Color changes are very rare, usually only for sponsorship
 messages.  I don't recall ever seeing underlining in a clean recording.

 I can upload a small sample mpeg with plenty of italics if needed.

 For testing, I manually edit the resulting SRT file to add boldface,
 underlining, and colors.  I tested combinations of attributes, and also
 very long lines to maintain the existing line-wrapping functionality.

 The most "official" documentation of SRT formatting that I can find is
 http://forum.doom9.org/showthread.php?p=470941#post470941 .  This patch
 doesn't support SRT display coordinates.  It also doesn't try to correctly
 support multi-level nesting of attributes, e.g. </i> always turns off
 italics, instead of restoring the previous state, e.g. the following would
 be displayed without italics:

 {{{
 <i> <i></i> This should be in italics. </i>
 }}}

 See the comments at the beginning of FormattedTextSubtitle::InitFromSRT()
 for a description of this implementation.

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/10194#comment:2>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list