Teletext On A Raspi With Zero Additional Parts

Way back in the 70s, the UK and BBC rolled out teletext – an information retrieval service that’s much closer to the ‘television screens connected to computers the size of a room’ popularized by 1960s futurists than the Internet and world wide web. For about 30 years, teletext was one of the most reliable means of information distribution until it was quietly shelved with the rollout of digital television.

Playing with dead protocols is fun, though, and since the Raspberry Pi has an analog video out, [Alistair] thought it would be fun to turn his Pi into a teletext generator and display.

This isn’t [Alistair]’s first teletext rodeo; earlier he built an add-on board for the Raspi that uses an AVR and an LM1881 video sync separator to mux the video output of a Raspi with teletext signals. The new build does away with this completely, allowing any Raspberry Pi to generate and display information from a teletext service. Right now there are two demos, a Raspi status display that shows the CPU frequency, usage, memory, and temperature. There’s also a ‘clock cracker’ with a picture of Tux that should help diagnose reception issues.

All the code is available on the project’s github, although [Alistair] hasn’t released the scripts to output teletext pages captured from broadcast signals years ago.

45 thoughts on “Teletext On A Raspi With Zero Additional Parts

    1. No, “teletext” is the name for the service of 8-bit-graphics-over-TV in general. The BBC launched Ceefax, ITV’s was called Oracle. Then lots of business nonsense happened and Oracle went out of business and was replaced down the line by Teletext. Having a teletext service called Teletext is understandably a bit confusing.

  1. Teletext is still being broadcast as yet another stream in DVB, but it’s not really the same anymore because it gets set sparsely as a big blob of data instead of continuously every blanking interval. Teletext originally provided a robust way to transmit switchable multi-language subtitles because of that.

    All of the promises of digital television never actually materialized: the image quality went down with compression, the range went down because the broadcast doesn’t degrade gracefully with marginal reception, it became more susceptible to interference like frayed spark plug wires and elevators turning on/off even where reception is good, the promised “superteletext” never materialized, the dedicated subtitle transmission system in DVB skips and drops lines every single time you try to watch a program and DVRs won’t capture the subtitles if you time the recording before the broadcaster puts the “subtitles” flag up in the starting minute of the show – it’s just dysfunctional to the point that broadcasters have started to employ burned-in subtitles again after so many years.

    The only thing it actually did was cram more channels in the same radio space, at the expense of making television work like shit.

    Design by committee at it’s best.

    1. The fun part was that teletext was so robust that it would be captured on VHS casettes, so if you recorded a show, you could still turn the subtitles on and off, and select the language by picking the right page number. You could also read that day’s news, horoscopes, classifieds…

      So people around here were slightly unimpressed when DVD came along.

      1. Usually only on S-VHS recorders, ordinary VHS wouldn’t do it. I know because I tried, way back when, as well as the wisdom of the Internet saying so. There’s a guy who archives old teletext pages, and he’s desperate for any old S-VHS tapes.

        Maybe your VHS was just really really good. Am I right in thinking teletext was sent on line 11 of the picture, normally hidden in the top border of the TV? If your TV lost V-sync a bit while changing channel you could sometimes see the little bits fizzing away, was very entertaining to “special” children like me! It’s related to the Closed Caption system the Americans had, only much, much, better.

        1. IIRC yeah it was only on SVHS recorders. My parents were deaf so CC was always an issue. It’s why my parents lagged a long time before getting our first DVD player because the CC and/or English subtitle support was spotty at best during the early years. And why HDMI adaption amongst the deaf is often poor because those dumbass engineers left that portion of the signal out in the specification. It forces people to find boxes that can inject an overlay into video stream (sometimes by accessing a lame ass service menu).

          The whole digital “revolution” seems to be a step backwards. Cool! I have 1080 video… but why is it all herky jerky? DOH!

          1. The worst part is that while ATSC does give you HD channels, the first iteration of DVB did not.

            We were forced to buy the set-top-boxes to keep watching regular television, twice, because the first generation was really buggy. Then TVs started to appear with integrated DVB-T/C tuners, but still no HD. Now they’re rolling out DVB-T2 which has HD over the air, but nobody’s got compatible televisions.

            So it’s external tuner boxes all over again… what a ripoff.

          2. HDMI is usually jerky because very few players will change the output of the HDMI port down to 50Hz when playing 50Hz content which is still for some reason the norm in former PAL countries. Put that over a 60Hz connection and it looks aweful

          3. Re Dax, I’ve got an HDTV but it’s digital tuner is only standard-res. Why!? It’s not the only one, this is common in the UK. Is it to save money on HDTV chips or something? I bought it in January 2014 I think so I’m hardly an early adopter.

          4. ” it’s digital tuner is only standard-res. Why!?”

            Because the DVB-T2 standard didn’t exist when it was built. The DVB has only standard resolution.

            We were sold an obsolete system.

    2. OK, this is as lot love for an absolute terrible standard as I can take at one.

      Let’s have a look at the claims you make:

      * the image quality went down with compression
      * no graceful degradation
      * became more susceptible to interference
      * promised superteletext never materialized
      * subtitles skips constantly
      * subtitles tag only sent before transmission, so DVRs might miss it when started too late

      Now to the dissection:

      *the image quality went down with compression*

      Almost certainly not. In fact, PAL was a terrible standard when it comes to video quality by modern standards; it actually streamed a 288 px wide video, that, if you’re really tolerant could claim was 576px wide — that’s worse than the first youtube videos, and simply no comparison with a “normal” DVB-T Mpeg2 encoded stream, even if it’s transmitted in SD (which has the full, non-interleaved width). Actually, most programs receivable today use 720p around here — I don’t need to explain the difference between that an a PAL moving picture on a digital screen.

      *no graceful degradation*

      That’s a common misconception. DVB-T is rather robust, it takes hell of an SNR to actually get significant bit error rates — there is lot of forward error correction employed, so for a big range of signal quality, the video quality actually doesn’t suffer. Now, the decoded transport bitstream is MPEG-2, which itself is rather robust agains bit errors here and there, so you might not even notice your data is wrong. Just when you’d only see moving snow with remnants of silhouettes I find DVB-T to totally fail.

      Remember: PAL is a beast of a spectrum hog — not only are PAL channels insanely wide, but also transmission power is ridiculously high for the data it actually transports.

      *became more susceptible to interference*

      That’s very very very unlikely. More likely is, that the electronics inside your TV are directly confused by EMV. You see, digital transmissions usually spread and tumble (and DVB-X does that very thouroghly) their bits around, so that short bursts of interference don’t harm bits that in the data stream follow each other, and errors can be corrected by error correction algorithms. Since PAL can’t do that, your friendly tram spark will disrupt a consecutive set of pixels, which is arguably worse.

      *promised superteletext never materialized*

      Now, this is highly subjective, but I find EPG a houndred times more useful than teletext, because I’ve never felt the urge to look up lotto numbers on teletext. I think most would agree with me.

      *subtitles skips constantly*

      Send in your TV set for repair. Can not reproduce.

      *subtitles tag only sent before transmission, so DVRs might miss it when started too late*

      Ok, you might be right (I’m too lazy to test), but given the fact that DVRs directly use the EPG for programming, I wonder who the hell would manually program a time to start recording.

      1. A spark in a PAL picture produces a few consecutive pixels off for one frame. In MPEG, you get blocks going wrong, either spread over the wrong place, or bad pixels in the blocks. Looks terrible. Obviously I haven’t compared that across differen S:N ratios, just subjectively from watching a lot of telly with a crap aerial. Although obviously per bandwidth digital would win if they allowed the same bandwidth as a PAL channel, there’d be room for a lot more error bits. As it is you get around 6 digital channels per PAL one, which makes up for it. Although 80% of those channels being shit is a point against it.

        Teletext was much more than lottery numbers, there were a number of magazines, with daily articles, often a magazine would have 10 pages (and those pages had timed sub-pages), all sorts of interests, plus weather and news. Lots of people used UK teletext. I used to read the kids’ pages and the computer game ones when I was young.

        I was pretty sure PAL was 768×576 btw. When they showed American stuff on UK TV the quality was always very noticable worse. Everything had a wierd yellow cast to it, and you could notice the lower resolution. PAL was great for what it was, despite being crippled by the requirement to transparently piggy-back on the old black and white signal.

        1. did you get a new aerial? when we switched to dvb they changed the frequency too so until I swapped the aerial to one optmized for the new frequency the DVB signal looked AWEFUL. A quick and cheap new aerial optimised for the right frequency made a huge difference. This happened to a LOT of people in the UK

      2. *PAL was a terrible standard*

        If you look at the image resolution only. With DVB I get jaggies, blurring, tearing, macroblocks, parts of the image moving at different rates or sticking when they shouldn’t, compression artifact ghosting around moving objects over matte backgrounds, which appear and dissapear abruptly, newsreaders’ foreheads turning into plastic and football pitches turning into monocolored tarps, image freezing, blank picture. It’s simply terrible in many ways that the slightly fuzzy or noisy picture of an analog programme wasn’t.

        *DVB-T is rather robust*

        In reality I find it far from. I can click a piezo lighter near a tuner and the programme halts for a second. If I keep clicking, I can jam it entirely. Switching the lights on and off will sometimes do the same. Many different recievers do this. This also messes up subtitles and it may take a minute before they resume after an error, or appear in the wrong order.

        And when the picture does start to break down it doesn’t just go fuzzier – it stops entirely. When the wind is rattling and shaking the antenna, it just doesn’t work at all. It’s impossible to watch a programme when the screen is frozen or blank about 50% of the time. It’s the same problem as with digital radio: go under a bridge and the whole thing goes mute for a couple seconds. It just do…t …ork wh.. the bro … cast sounds li… is.

        When the transition was on, people were promised that DVB would have better range and reach people further into the countryside. In reality, most people with good analog reception had to redo their cabling, buy better antennas and lift them higher because the reception with digital was just too poor.

        *Now, this is highly subjective, but I find EPG a houndred times more useful than teletext*

        I find no practical difference between a teletext listing of programmes and the EPG, save for the difference that the EPGs in televisions and boxes are often ill designed and obtrusive in behaviour. The EPG is also not a part of the “superteletext” which was supposed to be like the old teletext upgraded with rich rendering similiar to websites and an optional uplink channel via internet/phone. It never came to anything.

        *Can not reproduce.*

        I have never encountered a DVB-T TV or set-top-box that would not drop or misrender at least one line of subtitles over the course of a 1 hour programme. Usually it’s right in the middle of a documentary when they’re interviewing a person who doesn’t speak English. This is the reason why all but one group/mux is no longer using DVB subtitles over here. Too many complaints.

        *DVRs directly use the EPG for programming*

        Indeed, and the EPG information is often inaccurate or plain wrong, so the recording starts when the commercials are still on, or when the announcer is still speaking and the flag hasn’t yet been sent, or the flag is sent too late. For some reason they just can’t get the timing right, so you can never trust your DVR to record a show correctly on its own.

        Analog television might have been a terrible format, but DVB-T is downright unusable in large parts of my country.

      3. Clearly your experiences are different to the OP and indeed myself.

        *the image quality went down with compression*

        Yes. In real terms. Look, forget what the spec says as far as the number of pixels, or lines. The fact is that artefacts on a digital signal take away from the quality of the overall image. Look at a TV channel in the UK on freeview which is not mainstream and you will be able to see some hideous effects on those channels that do not have high bandwidth to save themselves a bunch of money.
        Compare and contrast a analogue signal on a quality CRT set verses a digital signal on a LCD (when both signals were transmitted) and even on the top flight channels, the quality of the picture was poor with digital.
        Compression adds distortion. I’m playing with compressed 720/1080 IP cams and even with 32Mbps on a 720 stream, you still get image distortion inherent from the way the codecs work to compress the image through guess work (calculation).

        DVB is great from the point of view of channel selection without having to give money to the Murdock terrorist regime, but it’s far from a quality broadcast method. Unless your standards are rather low.
        It’s acceptable by the masses, brain washed by channel choice.

        *no graceful degradation*

        I commonly see picture break up, sharp high pitch intervals in the audio and either bad decode of the I frame or some other effect which causes a picture that is not comfortably watchable. Not just my TV’s but various others in various UK locations.
        Satellite is manifestly worse, so I’ll assume this is to do with losing the data in the first place and the decoder trying to cope.
        Good old analogue was still watchable, even on a portable TV set with a wire loop antenna made from the original broken one plus pipe cleaners. Fuzzyness/noise of analogue is not total picture distortion and psychedelic rainbow colouration didn’t happen either.

        *promised superteletext never materialized*

        Teletext was brilliant and as a kid I would sit for hours reading the various pages.
        Now we have the internet.
        That was positive progress at least.

        “I wonder who the hell would manually program a time to start recording”

        It’s that the broadcaster forgets to insert the flag to notify the DVR to capture it.
        Same as the broadcaster screwing up 4:3 to 16:9 switching on old content as it goes in and out of adverts which can have most bizarre consequences. Often making a 42″ TV into a 14″ letter box.

        Least we aint talking about NTSC. :)

        1. If the subtitles flag isn’t present when the DVR creates the recording filestream, it won’t record subtitles. It’s to do with the DVB standard TS container format that most DVRs use, and how it interleaves the different data substreams. If the file to be recorded is created originally with no subtitles, it cannot have subtitles even when they become available later on.

          Which is just another technical omission of the system.

        2. The stream from an IP camera is in no way comparable to one produced by a proper broadcast encoder, because the amount of detail you can squeeze into a given bandwidth is determined by both the features of the format, and the amount of computational power thrown at the problem. The format might be similar if you’re lucky, but the difference between the tiny SOC in a camera and a 2U box full of FPGAs is not a small one.

          Its the same mistake that causes people to complain when bit rates go down even though the perceptual quality is demonstrably better.

          1. Actually, it is kinda comparable, especially when it comes to live broadcasts.

            Because the compression method looks ahead in the video stream to achieve optimum compression, which is not possible without unreasonable delays in live broadcasts, and the video feed from cameras in the field is often not racks full of FPGAs quality.

            So again, yes, with good source material, preparation, and excellent equipment, the result is superb. Now go tell that to the bean counters.

          2. To be more precise; when you have many channels in the mux, you have to be able to predict the data rate of each channel in advance. If you’re showing pre-canned programmes, you can optimize the compression such that each channel gets just as much bandwidth as it needs to look perfect.

            But when there’s a live broadcast, you can’t predict what’s going to happen, so you just have to give it X amount of bandwidth and hope that it’s enough to deal with anything that happens in the picture without breaking up into artifacts.

            It often isn’t, and it often does.

    3. From the USA point of view, all of the above DAX, and the resulting free bandwidth was sold off to private agents who are now selling it back to you for your shinny, twiddly thing that you are always pulling out of your pocket to check your f***book page. My father lives in the downtown area of a major US city and every time his neighbor moves the furniture his reception will drop out on certain channels due to multipath interference.

      1. Agreed. DTV sucks in a great many places here in the US. Unless you live in a very urban area which isn’t plagued by multipath (which comes, largely, from densely packed urban areas… see any problem there?), you’re going to have reception issues. Even with outside aerials, reception can be problematic in large portions of the coverage area. We’re told that “since most people are on cable or satellite, aerial reception really isn’t a priority and you should just pay for a service”, but that flies in the face of the whole idea of broadcasting and it runs in direct contradiction to my wallet management practices. Prior to the ATSC switchover here in the States, a little analog fuzz was able to be accommodated, worse static could be tuned around with an antenna position change, and reception was instantaneous. With ATSC, if you move your aerial you will probably have to rescan, and with many sets that requires a complete bandscan, and even moving the aerial usually doesn’t make enough of a change to improve reception on all stations (improve some, you’ll degrade others, etc…). Any significant change usually comes from raising mast height (easier said than done, depending on local regulations), and that gets progressively more clumsy in terms of adjusting, maintaining, etc…

        In short, Digital offers a superior picture under ideal conditions, and a broken one some or all of the time, under less-than-ideal conditions. It’s frustrating.

        My apologies for drifting further off-topic.

    4. I hate that they do indeed massively do burn-in subtitles when channels have both the digital as well as a teletext subtitle stream.
      Annoying as hell and indeed as you say an example of prioress not being fulfilled, like the reduction in quality in some aspects.

      Then there’s the ridiculous incorporating of interlace in a modern standard like DVB, and the perhaps even more insane ‘PAL’ version of HDTV where they without any reason whatsoever drop the framerate, without the increased resolution and better color stability the classical PAL signal had going for it.

      1. Yep. Trying to watch DVB-T on a computer monitor with a USB tuner stick always results in some amount of horizontal tearing or jitter in the framerate because of the 50/60 Hz difference. It’s most apparent in nature programmes where there’s long sweeping camera pans over the scenery.

        They could have just standardized to 60 Hz everywhere, games, computers, television, but they didn’t.

          1. LIghting now is virtually all electronicly ballasted except for dirt cheap LED lamps so flicker is a non issue when scenes are lit properly. For on site recording they could record at 50Hz and then run it thru a proper rate conversion which does correct motion tracking so things look smooth still.

    1. Thank you – I was in France in the late 80’s and people there used them like we use social networks and the internet today, a very impresive system for the day! But it was a wired system kind of like DSL with a dedicated terminal, so not really part of the teletext discussion.

      1. Pretty sure it used a modem over normal phone lines. When they started Minitel, they scrapped Directory Enquiries, and the money they saved gave everyone a basic terminal for free. In the early 90s I went to Paris, and second-hand shops were packed with all sorts of Minitel terminals. I quite fancy one to mess about with, but the shipping would be a pain. Maybe I’ll pop over to Calais one day and bring one back.

        Minitel was quite an industry in France, with premium-rate lines at several prices. Lots of le cybersex lines for men who were too embarassed to talk to real women, I suppose.

  2. I remember Teletext on my grandparent’s television over in Germany. ZDF and ARD had the best screens. You would just type in the 3 digit code (from the home page) and it would take a few seconds till the data came through and then display on your television. It would be nice for some TV providers to utilize their sub-carriers (or even X.x [x being the sub channel]) to get this out again. I, personally enjoyed the old system, and would love to see something like this back on the air again. I mean, come one…there are so many white-spaces out there right now, that we should utilize them for something. If not, the technology will be going to the wayside, and we will be left with what is given to us, and we will have to accept it. Hack on, my brothers and sisters…hack on.

  3. People having trouble with DTV reception might want to consider trying an amplifier. When we had the mandatory switchover in the US I got a converter and was pleased with both the image quality and the new channel selection. But when I finally went in for a flatscreen with its own digital tuner I lost half my channels. After some reading I realized that most TV sets, even high-end ones, are made with the expectation of a fairly strong cable TV signal and not optimized for marginal broadcast reception. A cheap amplifier restored the performance I’d had from the converter, which was better than my analog reception had ever been — channels which had always been noticeably snowy on analog were crystal clear due to the error correction.

    1. With amplification comes noise, which makes the situation with marginal reception worse due to interference.

      At least ATSC works the same for cable and antenna. The European DVB system is split between DVB-T and C, so a television with a DVB-T tuner cannot connect to a cable network, and vice versa. That’s so they can sell you yet another converter box.

  4. Ah, that is awesome. He’s mapped the TV guide of today to the teletext (okay, Ceefax) of yesteryear.

    This would be a genuinely useful product to sell for old people used to the Teletext system.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.