Research & Development

Posted by Dave Evans on , last updated

In April, BBC Radio 3 and BBC R&D launched what we believe is another world-first for a classical radio network: audio delivered directly to your web browser with completely lossless compression. We've brought together various technologies including MPEG DASH, FLAC compression, HTML5 and the Media Source Extensions to offer you a bit-perfect representation of Radio 3's live output, exactly as it left the studio. Radio 3 makes considerable investment in music performance and technical excellence, and this pilot enables the most transparent listening experience possible.

This post describes BBC R&D's involvement in bringing this pilot to our audiences.

Update - August 2017 - Google Chrome now supports this trial alongside Firefox. Details below.

BBC Taster - Hear the whole BBC Proms 2017 season in High FLAC Fidelity

We’ve blogged about our work with MPEG-DASH a number of times, and it is our streaming technology of choice on which to innovate.

Lossless audio is something we’ve been talking about with other parts of the BBC for some time and here at R&D we had been doing some exploratory work around possible formats, but were unable to find a format totally suitable for delivery to the wide range of target devices the BBC serves.

Open, royalty-free and well supported in both software and hardware, FLAC was an obvious choice for compression.

MPEG-DASH requires media to be encapsulated using either the ISO Base Media File Format (ISOBMFF), the format that underlies MP4, or MPEG2 Transport Stream. In reality only ISOBMFF has seen wide adoption, and that is the file format we use to distribute our existing video and audio streams. Unfortunately, until recently, there was no way to carry FLAC in a DASH-compliant manner. Additionally, without ISOBMFF encapsulation, we’d have to standardise, register and encourage implementation of a new bytestream format for use with the Media Source Extensions.

We shared our frustrations with some contacts from Mozilla when they were in London last year, and they kindly agreed to do the standardisation work required. This has subsequently been published by Xiph as part of the latest release of FLAC in January 2017.

Technical Details
We are taking a raw uncompressed feed of Radio 3 from the BBC’s Audio Factory project and we’ve built a prototype that performs the FLAC encoding and ISOBMFF packaging in the cloud before forwarding the resulting stream to our standard media distribution platform.

Distributing uncompressed Radio 3 to the home would require bandwidth of around 1.5Mbit/s, considerably more than is typically used even for high quality audio distribution over broadcast or the Internet.

To reduce the data rate to something more practical for distribution, we have traditionally used a compression codec, AAC, that delivers high quality audio at much lower bitrates.  For Radio 3, we offer a very high quality stream at a fixed rate of 320kbit/s for internet listeners,  which is a significant saving both in terms of bandwidth and storage compared to the 1.5 Mbit/s original. Experts expect that, for the vast majority of material, this should be indistinguishable from the uncompressed source.

Lossy codecs such as AAC do change the audio signal, and there is the potential for noticeable artifacts with some material, whereas FLAC will always encode the signal transparently by employing a combination of channel decorrelation, linear prediction and residual and run-length encoding.

Our FLAC stream appears to average around 550kbit/s over an extended period, though this is highly variable, peaking up to around 1Mbit/s, and is dependant on the average complexity of the input. This is significantly lower than the uncompressed source, but some way off even the high bitrate AAC version.

Several modern browsers now feature a built-in FLAC decoder and, once the audio data has been removed from its ISOBMFF wrapper, the decoder reconstitutes the original linear PCM samples bit-for-bit.

A Radio 3 Microphone

How To Listen
Mozilla have implemented the FLAC encapsulation specification provided by Xiph, and this is publicly available from Firefox 51 upwards, on the desktop. Other browsers are considering support for FLAC in ISOBMFF and we hope that in time they will follow suit, and that mobile devices will also add the necessary functionality.

To demonstrate implementation on embedded devices, we’ve also contributed a patch to the GStreamer open source multimedia framework. This is available in 1.11 releases and above, which can be downloaded as pre-built binaries from the GStreamer website or built from source. We’ve had great success playing the stream with a Raspberry Pi with a digital output board.

We’re also in discussions with internet radio manufacturers, many of whom have expressed an interest in supporting lossless streaming.

Update - 11 August 2017

We noted above our hope that other browsers and mobile devices would add the necessary functionality to support our lossless streams, so we're really excited to report that, this week, Google have shipped a version of Chrome which does just that - Chrome 62. As well as desktop support, this brings Concert Sound to mobile devices for the first time via Chrome for Android.
Chrome 62 should be available to all around mid-October, but the brave amongst you can try it out now using the bleeding edge Chrome Canary build for Windows, OSX and Android.

Future Work
The purpose of the pilot is to determine whether listeners in real-world listening environments find any perceptible difference listening to the lossless stream compared to our standard high-quality streams, and whether they attribute value to that. We are also keen to find out how they are listening. There’s a questionnaire accompanying the pilot on BBC Taster, and feedback on your experience is really important to us.

Whilst we currently have no plans to launch any service using lossless compression, data from this pilot will inform future strategy.

We’re really grateful to Mozilla and Foundation for their efforts standardising FLAC encapsulation and providing support and early implementation in Firefox.

Tweet This - Share on Facebook

BBC Taster - Hear the whole BBC Proms 2017 season in High FLAC Fidelity

Mozilla Tech - Mozilla and the BBC Team up to Deliver Concert Quality Audio from Royal Albert Hall over the Web

BBC R&D - Binaural Audio at the BBC Proms

BBC Internet Blog - Audio Factory - FLAC - Free Lossless Audio Codec

Gramophone - The BBC Proms Have Begun... Hear Them in Even Higher Quality

Rhinegold - Radio 3 to Offer Proms as Lossless Audio Stream

What Hi-Fi - BBC Proms to be Broadcast in Lossless Audio for the First Time

Radio Today - Radio 3 Ups the Online Streaming Quality

Tech Radar - BBC Radio 3 Streaming the Proms in Crisp Lossless Audio This Year

This post is part of the Broadcast and Connected Systems section