[FFmpeg-devel] Question on line 21 data in wtv

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Oct 20 10:47:06 CEST 2012


On Fri, Oct 19, 2012 at 07:16:07PM +0200, Carlos Fernandez wrote:
> I'm one of the authors of CCExtractor, a small program to extract
> closed caption data and convert to srt. I'm currently working on
> adding support for wtv format, and I see you guys have figured it out
> - so maybe someone here is able to reply a quick question on line 21
> data in wtv, even if this isn't really a ffmpeg development question.
> It would save me some time of analysis.
> From what I seen, line 21 data is more or less saved as in DVDs (for
> which I haven't been able to find any official specs, by the way -
> "only" McPoodle's reverse engineered description). However, there's
> some differences that make parsing a bit difficult. I'm working with
> very few samples (I don't have a TV capture card myself, so I rely on
> what other people send me) which also doesn't help much. Anyway,
> consider these two samples:

First, while maybe ugly and not fully correct, I believe MPlayer has
working code for it in sub/sub_cc.c file, the subcc_process_data
Also while I never found a proper specification for the DVD format,
the DVB one should be quite well documented, search for
EIA-608 and EIA-708.
I did not look at your examples in detail, but I believe your problem
might be that DVB is actually using a completely new format, EIA-708,
but that one does contain a compatibility layer.
Now, WTV actually does split the compatibility layer out.
Unfortunately, if you just look at the concatenated data you will
no longer be able to make sense of it.
You absolutely have to look at the size of the packets.
All 2-byte sized packets are EIA-608 (basically the DVD format),
anything larger is EIA-708, which despite some similarities is
a quite different system.
As I was too lazy to analyze your examples, I hope that helps you out.
And should you end up looking at the MPlayer code and find issues with
it I'd be happy to hear about it :-)


More information about the ffmpeg-devel mailing list