Monday, 20 February 2012

Teletext data extraction from the VBI


I've spent some time on extracting teletext data from the WinTV USB hardware.  I can't find a definition of a VBI slicer, but that might be what it is.  Please leave me a comment if you know what a VBI data slicer is!

The PCI card is (kind of) straightforward once you know what's going on (DirectDraw this time) but the same technique as applied to the WinTV USB device just outputs 0 byte files.  It saves the VBI OK though, but the VBI files are just samples of the analogue signals in the VBI.  You have to convert the analogue samples to bits and analyse those.

So I spent a lot of time analysing a sample I'd recorded from BBC1 Ceefax from Black Hill.  I plotted the sample in Excel and worked out the average bit width (about 5.113 samples per bit).  From this, you'd imagine that you could, once synchronised, read the value of every 5.113 samples, compare it to a threshold value to see if it was a zero or a one, concatenate the bits until you got a byte and converted to decimal.

Not a bit of it.  The bit width drifts as you go across the VBI line, so you have to keep compensating for it by checking to see if there's a higher or lower sample value in adjacent sample bytes.

It gets worse - I think that different teletext inserters have different characteristics too.

At the moment it's working but I've not got round to actually extracting any teletext data from them for use in the emulator.

As to why I wanted to use the USB device rather than the PCI device that works just fine - portability.  The USB device means I can take a laptop on my travels and record teletext from wherever I go to. 

I've managed to get captures from Germany and Poland hotel rooms, so lots of various European channels have had their carousels captured, including some Level 2.5 services.

The hotel I always get sent to in Finland, though, has a peculiar set up which means that the aerial cable coming in to the room is encrypted in some way and has to go into a box on the back of the set.  The box outputs a signal via SCART cable into the TV.  It turns out that it's the box itself that decodes the teletext, not the TV, so the remote controls the box at the back of the TV.  There is no VBI on the SCART composite input into the TV, the TV just displays teletext that has already been decoded by the box at the back.  The upshot of all this is that I couldn't get access to the VBI data to record it.  Foiled in my attempt to record some BBC World teletext :-(

Now I just need to get around to converting all these VBI recordings into teletext data...

No comments:

Post a Comment