[MEncoder-users] Generating switchable binary subtitles with MEncoder

Giacomo Comes comes at naic.edu
Mon Oct 29 16:14:10 CET 2007


On Mon, Oct 29, 2007 at 01:43:50PM +0100, Nicolas George wrote:
> 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.

spumux (part of dvdauthor) is able to convert text subtitles to spu format
since forever. After uou have them in spu format you can extract them to 
vobsub format if you like.

> 
> 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.

Well actually ALL dvd subtitles uses the alpha channel because the region 
surrounding the subtitle text is transparent.
Otherwise you would see a rectangle of some opaque color surrounding the
subtitle text.

Giacomo



More information about the MEncoder-users mailing list