Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×

Inside the BBC’s Audiofactory Encoding Farm

Underpinning the BBC’s new app online offering

The BBC iPlayer mobile app, shown above, is now available worldwide.

The British Broadcasting Corporation � better known as the BBC � is one of the world�s largest broadcasters. In July of this year, the broadcaster launched �BBC iPlayer Radio� as a globally-available app on iOS and Android � an all-in-one product, offering the BBC�s live radio stations and almost every program on-demand for a period of at least seven days after transmission. That service is also available on the web at bbc.co.uk/radio.�

Underpinning the BBC�s online offering is Audiofactory. Launched in February 2015, it�s the audio encoding facility for all of the BBC�s radio output, and is currently supporting:

  • 11 national radio stations
  • Seven �nations� radio stations (Radio Scotland, Radio Cymru, etc)
  • 41 local radio stations
  • 31 different streams of the BBC World Service
  • 25 ad-hoc event streams, and a potential of eight temporary radio stations

Prior to Audiofactory, each division of the BBC had their own audio encoding solutions, which made it difficult to add new services and support for formats and codecs. A decision was made to move all audio encoding for the BBC�s radio services into one system. (Disclosure: the author was a senior manager at the BBC responsible for the successful rollout of Coyopa, the previous encoding solution for BBC national radio).

Audiofactory is hosted in �the cloud� as a set of microservices running in their own cloud instances or in scalable groups. This allows �infinite� expandability, as well as the opportunity to run shadow environments for testing purposes when required.

Adrian Wisbey, Audio Specialist for BBC Design & Engineering, highlighted to me the requirement for reliability: �We wanted Audiofactory to be seen as just another distribution platform and so we built it based on the traditional broadcast engineering lines of high reliability and high availability. �The design runs two completely separate systems that are presented to the consumer on a hot-hot basis. This means that we can use a continuous deployment methodology for hardware and software support and development.�

CHALLENGES

Audio is delivered to the cloud-based audio encoders over IP. �Audio over IP is pretty easy when you have a closed managed network,� said Wisbey. �Doing it over the internet is hard. �We ended up with a solution that uses a simple chunk delivery mechanism for linear audio that we convert back to realtime RTP (over TCP for reliability) at the encoder inputs.�

With over a hundred different audio inputs, Audiofactory already looks a relatively complex setup. As ever with setups of this type, that doesn�t tell the whole story � since Audiofactory also provides both UK and non-UK rights versions of BBC radio services, so content can be �blanked� when there are no rights to cover a particular territory. Blanking is done in the cloud � no mean feat when there�s uncertain latency in the audio arriving at the encoder.

�One of the biggest problems we had to solve was embedding timecode into the audio,� added Wisbey. Timecode was required for scheduled blanking insertion, to synchronize audio chunks in their hot-hot distribution configuration, to find program start and end points for their on-demand workflow, and to enable listeners to be able to go to the beginning of the currently live program.

�The timecode solution came via AES67 that outlines a method of using the timestamp field in the RTP packet header to absolute time. �Basically the 32 bit field can just accommodate 24 hours worth of 48kHz mediaclock ticks before it rolls over. �So if you know the epoch of you time domain and which day it is then you can work out the accurate time. �We use PTP time protocol which uses TAI (UTC without leap seconds) which is handy as managing missing and/or extra seconds in a media clock is very hard!�

ENCODING PROFILES AND DELIVERY FORMATS�

Audiofactory produces four main stereo profiles for every service:

  • 320kbs AAC-LC (UK only)
  • 128kbs AAC-LC (UK only)
  • 96kbs HE-AAC
  • 48kbs HE-AAC

A legacy 128kb/s mp3 stream for Shoutcast is also produced, primarily for internet radios. The 320/128 and 96/48 sets are delivered as adaptive bitrate streams � HE-AAC used for mobile data connections.

�Following the success of the 2012 Olympics a strategic decision was made to focus our online output to HTTP �chunked� formats such as HLS, HDS and the then embryonic MPEG-DASH. �This had many advantages for us and the consumer including simpler and cheaper distribution (it is ordinary HTTP traffic), adaptive bitrate support and the bursty nature of the internet making chunked delivery easier than continuous fixed bandwidth required by realtime streaming,� explains Wisbey. HTTP chunks can be cached and proxied, lowering bandwidth costs and easing pressure on networks.

Wisbey says that HLS is used for Apple and Android devices currently, but Android�s support for HLS has been �sadly very variable�, and the BBC is moving Android support to MPEG-DASH. �MPEG-DASH was always on the roadmap to become our primary delivery format. �We have had to wait for the standard and in particular the DVB profile that we use to become finalized. Ultimately we would like to serve everything with MPEG-DASH, but it is doubtful if Apple will ever support the DVB profile.�

The BBC uses 6.4 second chunks �as they are an integer multiple of AAC frames (for both LC and HE varieties). �We also ensure chunk production is started by the encoders at a 6.4 second boundary since the UNIX epoch (00:00 01/01/1970). �This ensures we have consistency between the two halves of the system.�

STATISTICS

How popular are the BBC�s radio streams? Based on January to June 2016, the BBC say they handle, on average, 82 million requests for live and on-demand streams every month (62 million of these from the UK). On top of that, they serve on average of 44 million successful podcast downloads globally per month.

Since the BBC launched DRM protected downloads � available within the UK on the iPlayer Radio app since summer 2015 � there have been over 23 million programs downloaded, with an average of 2.4m DRM protected downloads per month in the UK.

THE FUTURE

Audiofactory isn�t, yet, �finished.� Development is focused on improving the start/end times of on-demand content (which is currently based on a program schedule); and to standardize the loudness of every stream. Loudness standardization is particularly required for a new initiative, �myBBC�, a service which will allow listeners to make up their own listening schedule based on content from any of the BBC�s online catalog.

I�m grateful to Adrian Wisbey, and Jim Simmons, the BBC�s Senior Product Manager for Audio Services, for their help in compiling this article.

Close