Broadcast CentreIt’s been a long time since I’ve updated you, for which I apologise. However the good news is this will hopefully be my last post about lipsync issues on BBC HD. That’s in part because I’m really running out of bad puns based on the word ’sync’, but mostly because – and I realise I’m tempting fate here – we may have got to the bottom of it all. Let me elabourate…

If you read the comments on this blog, you’ll recall that we’ve been having problems with the lipsync of stereo programmes on BBC HD. Surround sound programmes have been fine since the previous work I’ve done, but stereo was not working quite right. It turns out that our broadcast chain introduces around 15ms of audio delay on stereo programmes, which is normally too little to notice. However if a programme is delivered with audio slightly late, as recently happened with Hustle, the two small and virtually invisible delays add up to create one much larger and very noticeable delay. So the question has been, where is that 15ms coming from, and how can we remove it? I’ve spent a long time looking at this over the last few weeks, and I’ve been tearing my hair out as every bit of testing we’ve done has given results that we couldn’t quite explain, until yesterday when things became clear.

I’ve mentioned before that we use Dolby E to encode audio around our broadcast infrastructure. It’s a technology that allows us to fit up to 8 channels of audio (plus some extra metadata) into the data space which usually fits just 2 audio channels. The difficulty lies in the fact that surround sound programmes arrive at the BBC with Dolby E encoded audio, whereas stereo programmes use uncompressed audio. The same broadcast infrastructure has to handle both types of audio with the same latencies (delays). Dolby E takes time to decode (1 video frame or 40ms to be precise) so we delay the video by the same amount to compensate and ensure that they stay in sync. But the stereo must therefore be delayed by the same amount, otherwise that video delay we’ve added will cause stereo programmes to be out of sync. The question you’re probably asking by now is “so what went wrong on BBC HD?”. It’s a good question, dear reader, and it has a simple and a complex answer. The simple version is this; we thought that the delays through each piece of equipment were the same for stereo and surround programmes, but our testing proved that this wasn’t the case. Finding which device had the problem and why was more challenging, and that forms the long answer…

Before I continue, I’ll tell you what happens now. The details of the problem, and therefore the solution, finally became clear only yesterday. We used a duplicate set of equipment to do tests without affecting broadcast chain. The solution we found requires some pretty major changes, so we’re waiting now on authorisation from the relevant people to allow us to make the changes in the broadcast chain. I’m sure you’ll appreciate that if any old engineer was allowed to change the on-air equipment in fundamental ways, we’d be a bit open to disastrous mistakes; so you’ll have to allow us a couple of days to get the change done. Soon enough though, we will get the changes on air and we should have properly in-sync stereo as well as surround programmes, rather than only “roughly in-sync” stereo. Phew!

Those who just want to know what we’re up to and when things will be better will hopefully be satisfied with what I’ve said so far. The hardcore tech-heads amoung you may want to know more however, so I’ll do my best to explain… When a programme arrives in the mixing part of the signal path (be it from a playout server or from a live contribution), the audio is embedded in the video. In other words, there’s one cable which carries both audio and video in a digital data stream. So the first thing that we do is de-embed the audio. We take the SDI video stream and extract the audio, spewing it out on a separate digital audio interface. This then goes to a Dolby E decoder, which decodes Dolby E if present, or just passes through the audio unchanged if it’s uncompressed. At this point the audio goes through the mixer, then gets Dolby E encoded, embedded again and continues on its way. It’s the de-embedder and the decoder that we’re interested in here, as they make up the bit of the signal path which is able to behave differently depending on whether the incoming audio is PCM (uncompressed) or Dolby E. My initial suspicions were around the decoder, which has a configuration option for how it handles PCM audio. It passes it through unaltered, however it can delay it by one of two amounts; “minimum” or “single frame”. The single frame option is what we want, as it delays the audio by the same amount as a Dolby E stream would be delayed, thus keeping everything in sync. However we have been using “minimum” because even in this mode the PCM ends up being a bit too late, so setting it to “single frame” just makes things worse. But why? I shan’t tell you all the possibilities we checked and the false leads we had, instead I shall cut to the chase… it was the de-embedder’s fault!

Don’t you just hate it when electronic devices are too smart for their own good? When your word processor magically changes (c) to a copyright symbol and actually you just wanted a c in brackets? Well, our de-embedder was being way to smart for its own good. We had been under the impression that it was applying a frame of delay to all audio. This is much more than it needed to, but by selecting a one frame delay it becomes predictable and easy to manage. Excellent, thought I. The problem is that it wasn’t that simple. After a lot of settings checking, head scratching and examination of the somewhat cryptic manual, it turned out that all audio was not being treated equal. We inadvertently had the device configured to delay the PCM audio by 1 frame but not the Dolby E! The bright idea behind this option in the de-embedder is to allow you to compensate for the decode delay of the Dolby E by similarly delaying PCM and/or the video. However, as I previously mentioned, we were already applying a compensating delay in the Dolby decoder itself. So we had 2 sets of delay where we only wanted one! Then even with the Dolby decoder set to apply “minimum” delay to PCM audio, it seems to add about 15ms of delay – a familiar figure! So what we shall be doing is turning off all delay in the de-embedder and setting the “single frame” delay mode in the decoder. Job done… I hope.

Hopefully I’ve given some insight into the problems we’ve had, and – touch wood – we should be all fixed soon. You’ll likely be unable to see the difference when we do make the change, because you should be unable to see the sync error currently due to it being so small. However, next time we have a programme delivered with a tiny lipsync error it should stay tiny and impossible to notice, rather than being amplified by the broadcast chain into a serious and visible error.

A final note just to say that I come to the end of my time working for BBC HD soon, I shall be moving on to another project. I’ll aim to do one more post before I leave to tell you a little about some other things we’ve been doing, so expect a post next week.


I’m an engineer with the BBC and sharing information about my work, but this is my personal website. Because the subject matter here is fairly different to my personal posts, this post is part of a seperate category, with its own RSS feed. You can therefore choose to only read my work-related posts, or to ignore them altogether.

6 Responses to “That Syncing Feeling”
  1. Hi Rown. Well done on sorting out the sound sync issues – it had certainly become less noticeable (or maybe that’s dependent on what I’d been watching). Just wanted to say thanks because I suspect that most of what you read in comments is complaints!

  2. Thanks Jez! Much appreciated – obviously it’s my job, but it’s a lot more rewarding when you can directly improve things for the viewers. R

  3. Since we’re after perfection, may I point out that, in your italicised foot note, you’ve misspelt “separate” and you’ve typed “different to”. In English it’s always “different from” (not “different than”, “different to”, “different of” or any other American version). ;-)

  4. John Rossettiq says:

    Well done, Rowan. As someone from the film industry, this subject has had me tearing my hair out on Sky HD+ etc etc.
    Does this “discovery” mean that all the other channels that have sync problems will sort themselves out, as I cant keep changing the sync timing every time I change a channel. !!!!! and…….. did any of this subject effect BBC1 and 2 ? because sync seems to slide from programe to programe ??
    J

  5. Well, hopefully things might improve across other channels, but afraid I can’t promise anything from other broadcasters! BBC1&2 ought to be OK really, I’ll keep an eye out…

  6. John Rossetti says:

    Hi Rowen, thanks for the promt reply. It seems that in the BBC’s case, OB’s seem to be a problem, e.g. Question Time last night, The 10PM news was spot on Question Time out of sync… My system is a Panasonic HD Plasma Monitor (no tuner) – Sky HD+ – Yamaha RX-v2600 – External Spendor speakers 5-1. I dont use the audio delay on the Sky HD box, because that does not help with other sources (DVD and a Euro1080 Sat Receiver) The panasonic screen delay is about 68ms (which is all I sould be compensating for) but on certain BBC transmission (and other broadcasters) I have had to move the delay to 112ms (the Yamaha has 0-240ms) indicating to me its not the sound that the broadcasters are delaying, but the vision path ? ? I realise vision mixers can cause problems with efx processing but what else ?? The last time I checked BBC HD (Test card F and sync test) it was (I was) spot on, but its hit an miss (car doors shutting are my best clues) if I change channels. Hence why I’m bald ! All audio connections are optical, all video HDMI / YUV or DVI.

Leave a Reply

© 2008 Rowan de Pomerai | Admin