[mythtv] SSA/ASS sub support(with patches)

Mark Kendall mark.kendall at gmail.com
Fri Nov 19 12:56:01 UTC 2010

On 19 November 2010 20:18, Shawn King <shawnking at optusnet.com.au> wrote:
> FFMPEG has now gotten ASS/SSA sub decoders is there any plans on adding
> support?
> attached is some patches that i have been using for a few days now w/out
> issues it doesnt support any SSA override codes but most other stuff is in
> there(myth-03-SubtitleScreenSSASubSupport.patch is very wip atm)
> the ffmpeg-* patches is the backported ASS/SSA subtitle code with 1
> bugfix(ASS dialog line wasn't null terminated not sure if FFMPEG guys know
> about it yet)
> myth-01-AVFormatFontSupport.patch adds support for loading embedded fonts
> into mythtv's fontmanager for use in the subs
> myth-02-AVFormatSubtitleHeaderSupport.patch adds support for getting the
> subtitle headers
> and myth-03-SubtitleScreenSSASubSupport.patch adds all the code for
> displaying the subs and is quite messy(and prob wrong at parts)
> it isnt good enough to be considered for commiting i know but it is a start

To be honest - looks like a pretty good start:)

Clearly there is a decision to be made about backporting the ffmpeg
changes (and I'd suggest it would be preferable to have them broken
out into the original ffmpeg versions and separate additional fixes -
to help tracking) - but I have no idea when the next ffmpeg merge is

The decoder stuff looks straightforward enough - though somebody else
will need to comment on the font code.

As far as the subtitlescreen patch goes :-

 - I'd suggest just rolling SSASubUtils into SubtitleScreen
 - look at using the the Qt::Alignment flags directly rather than
adding the new alignment enums
 - there is some extra code needed to handle the fontstretch property,
otherwise the fonts may not look correct with XVideo rendering.



More information about the mythtv-dev mailing list