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

Carlos Fernandez cfs at nova.es
Fri Oct 19 19:16:07 CEST 2012


Hi,

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:

I didn't know you were pregnant (just one random sample someone sent,
don't mind the title or content):
00 00 01 b2 43 43 01 f8 03 c3 ff fc c4 20 fd 6e 6e fc 54 45 ff

Brickel...
00 00 01 b2 43 43 01 f8 9e ff 80 80 ff 80 80 ff

If both, the packets start with 00 00 01 b2 43 43 01 f8 as excepted,
nothing interesting. But then:

The first one has 03 c3 ff before caption starts. The other has has
only fe, which would match McPoodle's description (one byte only, I
mean).

If you believe McPoodle's bitmapping then:

I didn't know... 03 => 00000011 where (reading right to left)
1 => Extra field flag
00001 => Caption count
0 => Filler, must be zero
1 => Pattern flag

Nothing to do with McPoodle's description, and then there's c3 ff (c3
also not matching McPoodle's, for example the filler isn't zero).
What's this?

Brickel => 9e => 10011110 where (reading right to left)
0 => Extra field flag
01111 => Caption count
0 => Filler
1 => Pattern flag

Looks better except for the 'pattern' in the data not being followed.

Maybe someone has already analyzed this and knows what each bit means,
in the first 1-3 bytes that follow the standard header?

Thanks
Carlos


More information about the ffmpeg-devel mailing list