[MPlayer-dev-eng] Closed captions
Bryan Henderson
giraffedata at gmail.com
Sat May 31 05:17:47 CEST 2008
As a couple of people pointed out, the closed caption function I'm
working on intersects with some existing Mplayer code/function.
Teletext is a little like closed captioning in that it comes in the
Vertical Blanking Interval (VBI) of a television broadcast, so
interpreting both should be similar. However, the Mplayer Teletext
function gets the VBI live from a TV tuner's VBI port, while the
closed caption work I'm doing gets it out of an MPEG file beside the
video and audio, where is has a different format.
Teletext also displays the same kind of stuff as CC on the screen, so
the display end should be similar. But I looked and couldn't find
anything I could use, other than some ideas.
But one thing that needs to be done if my closed caption work is to
join Mplayer is some renaming so you can tell apart the two different
kinds of VBI. Also some names treat VBI and Teletext like they're
synonymous. E.g. "VBI_ROWS" is a symbol for the number of rows of
teletext on a TV screen.
DVD closed captioning is also similar, in that it 1) comes in the MPEG
stream; and 2) uses the same EIA-608 protocol as broadcast. But it
comes in a whole different part of the MPEG stream (IVTV embedded VBI
is in Private Stream 1; DVD CC is somewhere else (a substream of the
video stream, I think). Also, the IVTV stuff is generic VBI; that's
one step removed from the closed caption commands in the DVD stream.
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.
Nonetheless, they do both interpret the EIA-608 protocol and should
not duplicate code. The DVD CC intepreter is weak -- partly because
DVDs don't use the full protocol and partly because it's just weak (I
saw comments acknowledging that). My EIA-608 interpreter is a
separate module, and I could make the DVD CC code just use it --
either to display proper CC or to continue rendering it as subtitles.
And then there's the whole subtitle/OSD thing. There is code in sub.c
relevant to closed captioning, but that file name appears to be a
misnomer today -- the file is really OSD code, not subtitle code.
Much of it isn't even related to subtitles. So I'll probably propose
some renaming or splitting of that file.
Let me throw in one more thing: The EIA-608 stream isn't strictly
closed captioning. It's also XDS: that's where things like the
program name, channel, and offensiveness rating live. I'm planning to
make that available in the OSD status display somehow.
More information about the MPlayer-dev-eng
mailing list