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

Carlos Fernandez cfs at nova.es
Sat Oct 20 16:42:21 CEST 2012


On Sat, Oct 20, 2012 at 12:17 PM, Peter Ross <pross at xvid.org> wrote:
>
> see the discussion here: https://ffmpeg.org/trac/ffmpeg/ticket/1482

OK... I downloaded both samples. The first one (BBC) indeed has bitmap
based subtitles so nothing for me to do with those :-)

The second one (famous NCIS), does contain EIA-608 captioning indeed.
I'm cheating here a bit since I'm letting the DirectShow filters do
the heavy lifting (I just get the data from the output pin of the MPEG
decoder) but it's useful because I get "official" data with sorting
and time stamps. This is what the first data packet looks like:

72 : 467 : 00 00 01 b2 43 43 01 f8 03 d4 ff f8 00 00 fd 20 20 fa 00 00
fa 00 00 fa 00 00 fa 00 00 fa 00 00 fa 00 00 fa 00 00 fa 00 00 fa 00
00 fa 00 00 fa 00 00 fa 00 00 fa 00 00 fa 00 00 fa 00 00 fa 00 00 fa
00 00 fa 00 00 ff

(72 is number of bytes, 467 time stamp in ms, then the line 21 data):

00 00 01 b2 43 43 01 f8 => Expected header for DVD subtitles
03 => Always 03 in all 7 samples I've seen but I don't have it written
in stone anywhere.
d4 => "magic byte" i.e. unknown. I'm getting good results by ignoring it...
ff => Same as with 03
Then the data, which *can* contain both EIA-608 and EIA-708 samples
since the control byte is present.
Finally, a FF terminating each packet

> i have a couple of other Line21 samples. they're kinda big, if you want
> them, tell me where to upload.

Thanks :-) I'll email FTP info.

Carlos


More information about the ffmpeg-devel mailing list