[FFmpeg-devel] Question on line 21 data in wtv
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sat Oct 20 18:05:53 CEST 2012
On 20 Oct 2012, at 16:42, Carlos Fernandez <cfs at nova.es> wrote:
> 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
Uh, this is _not_ the data in the wtv file, or more precisely that is not the data that Windows Media Center will use to display the CC data (though it should match for normally created files).
Instead, that seems to be the data that Media Center left in the video stream (it itself does not use that, it uses the data in the subtitle streams), which you then let the video code mangle (which also means completely pointless processing since the wtv file already contains the reordered data in the subtitle streams).
> (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
You should check the actual file. I suspect that part is fully made up by the decoder filter, in which case this is then completely wrong place to ask because FFmpeg will never encounter that part anywhere.
More information about the ffmpeg-devel
mailing list