BBC Radio Goes FLAC: Lossless service trial may herald new audio standards
20th April 2017
BBC Radio 3 and BBC R&D has launched audio delivered directly to your web browser with completely lossless compression. It has 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,” said the BBC. “This pilot enables the most transparent listening experience possible.”
Lossless audio is something the BBC has been talking about with other parts of the company for some time including exploratory work around possible formats, but it was 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,” said the company. “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.”
The BBC shared its frustrations with some contacts from Mozilla when they were in London last year, and they 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.
“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,” it said.
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. Observers 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 artefacts with some material,” said the BBC “whereas FLAC will always encode the signal transparently by employing a combination of channel decorrelation, linear prediction and residual and run-length encoding.”
The BBC’s 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.
How To Listen
Mozilla has 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 the BBC hopes 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, said the BBC. “We’re also in discussions with internet radio manufacturers, many of whom have expressed an interest in supporting lossless streaming.”
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. The BBC is also keen to find out how users are listening. There’s a questionnaire accompanying the pilot on BBC Taster, and feedback on your experience is encouraged.
Whilst the BBC currently have no plans to launch any service using lossless compression, data from this pilot will inform future strategy.
You can listen to BBC Radio 3 right now at FLAC standard via the current trial which, as of this posting, has 12 days to run.
Click www.bbc.co.uk to listen (but only if you have the right browser).