Sunday, July 6, 2008

More on ATSC closed captioning under Kaffeine

I got the Xine built from source now, and did some more debugging trying to figure out how the closed captioning support works. There is code for EIA-608 (used for DVD support), but there doesn't appear to be any way to load the plugin externally - it only kicks in if Xine detects closed captioning present in the stream (and the means of detection varies by standard).

Unfortunately, I don't think I can force it on/off, so I'm going to have to patch Xine to detect the info.

After some digging around through the spec and the MythTV source code, I figured out that the CC data is in the user_data section of the VOB. It's covered in ATSC a/53 Part 4 Section 6.2.3.1. For now I would be happy even if I just got the older style EIA-608 working.

I'm still not sure though how I'm going to correlate the CC stream locale information with the content contained in the PSIP EIT-0 entry (so the user knows which languages the various CC streams are in). I think the DVD code in Xine has some sort of convention for defining a callback, but I don't know how to use it yet.

At least in the short term, if I can get the content decoded I can just refer to them as "CC1,CC2,CC3,CC4", which is what Elgato EyeTV2 does (I don't have EyeTV3 so I can't say if they have improved it).