[MEncoder-users] Generating switchable binary subtitles with MEncoder

Nicolas George nicolas.george at normalesup.org
Mon Oct 29 13:43:50 CET 2007


L'octidi 8 brumaire, an CCXVI, Francois Visagie a écrit :
> Is there any way of capturing or exporting MEncoder subtitle rendering
> to some commonly used binary authoring format?

I doubt that mplayer can do that.

When I had to convert text subtitles to DVD subtitles, I wrote a perl script
to convert ASS to SVG, and used Inkscape to render the SVG to PNG.
Unfortunately, the result is not very satisfactory: it seems that Inkscape
somehow does not use hinting, and the outline of the characters is quite
irregular.

Furthermore, DVD subtitles can only have 4 colors¹, which requires an
additional tool to convert. I do not know a good tool to do that in that
particular case, because of the alpha channel (ImageMagick, for example, is
not able to treat the alpha channel as a color component when deciding a
palette).

All in all, I did not like this solution. If I had to do it again, I would
have Freetype or something render each glyph separately without
anti-aliasing, and write my own tool to place the glyphs and add the
outline.

Unfortunately, I do not know a tool that already does it. There is spumux
from the dvdauthor suite, but it does not handle font subtleties, and I did
not manage to actually extract the result.

If you find something, I am interested.


1 : Strangely enough these 4 colors include a non-trivial alpha channel as
part of their definition. It seems to be supported by home DVD players. But
I have never seen commercial DVD that actually took advantage of it.

Regards,

-- 
  Nicolas George



More information about the MEncoder-users mailing list