[MPlayer-dev-eng] Closed captions
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Mon Jun 2 19:30:10 CEST 2008
On Monday 02 June 2008 07:50:32 Bryan Henderson wrote:
> On 6/1/08, Uoti Urpala <uoti.urpala at pp1.inet.fi> wrote:
> > On Sat, 2008-05-31 at 03:17 +0000, Bryan Henderson wrote:
> >> Another difference with the existing DVD CC function is that it
> >> renders the captioning as subtitles. There's a lot of difference
> >> between CC and subtitles; you lose a lot in the translation.
> >
> > What kind of differences are you talking about?
>
> Subtitles are little more than lines of text. The input stream
> describes the text that has to go on the screen, and when, and Mplayer
> (with the user) decides how to put it there.
>
> NTSC Closed Caption commands are low level display commands, like "put
> the character 'I' at column 7, Row 2." Or "erase the screen." They
> control attributes of each character including italic, blinking,
> underscore, and foreground and background color. There's a mode where
> text scrolls up smoothly in a window. Because the characters are
> addressable, the font has to be a certain size and fixed-width.
> There's a particular, somewhat unusual, character set and code.
>
> NTSC Closed Captions and Teletext are alike in this way.
>
> > And which subtitle format?
>
> Is there something you couldn't translate to a subtitle format
>
> > like SSA/ASS?
>
> The DVD CC code doesn't render the closed caption information in a
> subtitle file format; it feeds the information to the Mplayer
> 'subtitle' object and the subtitle OSD object takes it from there and
> puts it on the screen. In order to use that facility, it essentially
> reads the characters being drawn on the screen and forms simple lines
> of text out of them, discarding much of the information.
>
> >Is there something you couldn't translate to a subtitle format
> >like SSA/ASS?
>
> I don't know anything about SSA/ASS, but assuming it can represent all
> the information in a Closed Caption stream, how does that relate to
> getting Mplayer to display CC information from the MPEG source?
Then you can use libass for CC rendering. It supports colors, fonts,
positioning and so on. Some features are missing, for example blinking and
background color, but it might be easier to extend SSA/ASS with them than
implement it from scratch.
> BTW, I know little about subtitles. I've played a little with SRT
> because there's a program (ccextractor) that converts IVTV embedded
> MPEG closed caption (the format I'm working with) to an SRT file --
> with much loss, of course.
More information about the MPlayer-dev-eng
mailing list