To Thread - Forum Home

The Mudcat Café TM
http://mudcat.org/thread.cfm?threadid=161901
28 messages

Tech: BBC Radio 3 Lossless stream

17 Apr 17 - 06:47 AM (#3850801)
Subject: Tech: BBC Radio 3 Lossless stream
From: Bonzo3legs

The BBC is currently testing a lossless stream of Radio 3 in flac format. The problem is how can this be captured? The obvious choice would be ffmpeg and there is protracted discussion here

Not easy it subjunctively would seem!!


20 Apr 17 - 05:06 PM (#3851494)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: Bonzo3legs

Now successfully captured the BBC lossless stream to file using latest version of i-sound for windows 7/10 - after initial teething troubles. It appears that the BBC will be broadcasting the entire Proms this year in lossless FLAC format for the first time which means that what you hear on line is exactly as it left the studio.

Clever innit!!!


21 Apr 17 - 03:32 AM (#3851547)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: DaveRo

Well I hope it works better than it did for me. I saw that on usenet and hit all the problems they identified - it wouldn't play in Firefox, VLC, or even ffmpeg. The mime-type was arguably wrong (reminded me of trying to get realplayer streams like Britfolk working on Linux). But I learned a lot!

Radio 3 Concert Sound


21 Apr 17 - 03:55 AM (#3851549)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: Bonzo3legs

I'll try to help, first of all you must have latest version of Firefox - v53, and I seem to be running a 32bit version on my 64bit PC! Cheapest capture software is Audacity. Now you need to eliminate the missing "stereo mix" problem first, so set left button under mic icon to Windows WASAPI (don't ask!) then both recording and playback device to speakers. Audacity will then record the FLAC stream and you can export the file as FLAC.

I use i-sound for Windows 7/10 which I paid for but does the job very well.


21 Apr 17 - 04:16 AM (#3851556)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: DaveRo

Yes, I saw how to fix it - I just wasn't sufficiently motivated. I'll try it again when I get Fx53 - it wasn't in the SuSE-Moz repo yesterday. (For various reasons I don't want Moz's own builds.)

I shall listen to the proms on DAB. Yes, I know - but I'm too old to notice - and the rooftop VHF aerial blew down. More importantly I now have a couple of nice Pure receivers with separate stereo speakers off ebay.


21 Apr 17 - 04:42 AM (#3851565)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: Thompson

Well, you can always do the kludgy old thing of using an audio program like Audacity or Wiretap Pro to "listen" to the stream and record it!


21 Apr 17 - 04:50 AM (#3851566)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: Bonzo3legs

It's the recording side that I'm more interested in, and would like to be able to record the lossless stream using ffmpeg which will not process the digital audio in any way without being so commanded! I would like to know if the Audacity FLAC output is identical ti the FLAC input.


21 Apr 17 - 05:20 AM (#3851574)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: DaveRo

When I looked at that thread ffmpeg needed an upstream patch - I would have had to do that and recompile it myself. Presumably that patch will arrive in the Packman repos eventually. I'll refresh Packman and try it later. If not you'll have to follow ffmpeg bugzilla, or whatever. Or ask on the NG.


21 Apr 17 - 12:19 PM (#3851685)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: DaveRo

The_stream plays with Firefox developer edition (54a). No luck with updated ffmpeg.


21 Apr 17 - 01:29 PM (#3851695)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: Bonzo3legs

I'm hoping to catch the Tinariwen Concert during World on 3 at 11pm this evening, I'll record a safety copy from the HLS stream as well on my spare PC.


21 Apr 17 - 02:21 PM (#3851704)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: DaveRo

Yes, that looks good:
Lopa Kothari - Tinariwen in Concert


22 Apr 17 - 04:02 AM (#3851798)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: Bonzo3legs

100% success, superb lossless recording of a superb concert!!!


15 Jul 17 - 03:59 AM (#3866195)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: Bonzo3legs

I recorded World on 3 from BBC lossless webstream last night, which has returned for Radio 3 for duration of the Proms!


15 Jul 17 - 06:37 AM (#3866211)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: GUEST

Here's a post from the BBC about this:
Summer of Sonic Love: Introducing Radio 3 Concert Sound

Click the 'Find out more...' link at the bottom of that piece to listen. You need an up-do-date version of Firefox on a desktop mahine. (But not ESR I find.)

I updated VLC (v2.2.4) and ffmpeg (v3.3.6): neither works. So you still need that patch it seems.

OT: I particularly enjoyed last week's Words_and_Music


15 Jul 17 - 06:44 AM (#3866212)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: Bonzo3legs

I'll check that out, thanks.

No word from the ffmpeg development crowd yet. I'm using i-sound for Windows 7/10 to capture the flac stream. I don't know if that is ffmpeg based or not. I dare say that now the flac stream is running again, a mpeg- dash supporting version of ffmpeg will surface.


15 Jul 17 - 11:57 AM (#3866243)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: DaveRo

I compiled the latest ffmpeg source with the (adjusted) patch from the NG back in April (your link in the OP). I got the same result that AF did (his post 6 April 20:46).

ffmpeg recognises the stream and starts copying it
Stream #0:0 -> #0:0 (flac (native) -> flac (native))
but immediately stops.

Looking inside Firefox I can see that the actual sound is in a continuous serious of numbered 'chunks' with addresses like this:
https://vs-dash-ww-rd-live.bbcfmt.hs.llnwd.net/al/lossless/A1/390659324.m4s
These files only exist momentarily, and when I tried to catch one it was a 404.

So I think that patch adds the demuxer OK, but doesn't address the streaming process.

If you see any further patches mentioned, I'll have another go.


15 Jul 17 - 12:30 PM (#3866249)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: Bonzo3legs

Thank Dave, I'll keep a lookout. Early days yet so maybe even ffmpeg folks will issue a compatable version before the second trial ends in a couple of months.


15 Jul 17 - 01:14 PM (#3866263)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: DaveRo

It's interesting. I found a way of copying the stream.
There's a single 'header' file:
https://vs-dash-ww-rd-live.bbcfmt.hs.llnwd.net/al/lossless/A1/IS.mp4
and then a series of files which contain the sound:
https://vs-dash-ww-rd-live.bbcfmt.hs.llnwd.net/al/lossless/A1/390659324.m4s
https://vs-dash-ww-rd-live.bbcfmt.hs.llnwd.net/al/lossless/A1/390659325.m4s
https://vs-dash-ww-rd-live.bbcfmt.hs.llnwd.net/al/lossless/A1/390659326.m4s
which come into existence as they're broadcast, are around for a while (minutes?), and then vanish

If I concatenate all these I can copy the result with my dash-ified ffmpeg.
size=    2599kB time=00:00:22.94 bitrate= 928.0kbits/s speed=2.28e+03x
The result plays nicely. Each chunk is about three seconds long - that 22 seconds was 7 chunks.

This is all pretty straightforward - I imagine that ffmpeg already handles streams like this so it should be fixable. But not by me!

What I might try is a Firefox addon that captures and copies the chunks as they arrive. I think Rule Britannia will be a distant memory by the time I manage that though!


15 Jul 17 - 01:35 PM (#3866269)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: Bonzo3legs

I just had latest "Nightly Build" of VLC (no install required) playing the Lossless FLAC stream, which it recorded simply by clicking the red record button.


15 Jul 17 - 02:40 PM (#3866275)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: DaveRo

I saw that, on Hydrogen Audio. That's much easier:)


30 Jul 17 - 04:08 PM (#3869115)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: GUEST,HughJarres

Bonzo, could you bear to give some guidance to a complete amateur? I have VLC but no idea how to add "nightly builds", within one of which, I assume, comes the ability to play the BBC's lossless stream. What do I have to do to use this nightly build? (You say no install is necessary.)


31 Jul 17 - 12:29 PM (#3869248)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: DaveRo

'Nightly builds' of VLC (or any other software) include the latest features and patches. They exist for testing and may not work well - or at all. You can download VLC nightly builds here:
https://nightlies.videolan.org/

Select your operating system - e.g. 32- or 64-bit Windows - and download the latest version in an appropriate format: I suggest zip since you'll almost certainly be able to unpack that.

Create a folder to keep VLC in, move the zip file there, unzip it (right-click, extract here?) find vlc.exe (it may be called vlc in Windows, the actual program, or 'executable') and double-click it. That should open VLC. If it doesn't, try an earlier version.

Select 'media' then 'open network stream' and enter
http://vs-dash-ww-rd-live.bbcfmt.hs.llnwd.net/al/lossless/client_manifest.mpd
Click 'play'.

Good luck!


31 Jul 17 - 01:37 PM (#3869268)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: Bonzo3legs

Thank you, saved me the trouble. I would just add that VLC will record the lossless stream if you click the red record button - you will need to tell VLC where to save the file.


03 Aug 17 - 03:23 PM (#3869746)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: GUEST,HughJarres

Thanks, both. I found a version that works and I'm almost there. But the red button doesn't seem to do anything. Well, the background goes light- blue when I click it and white when I click a second time, as though something is happening. But VLC doesn't ask where I want to save any file it's created, and there's no evidence it's created anything. Does this ring any bells, or should I start again by downloading a different nightly build? (Sorry, I did say I was a real amateur!)


03 Aug 17 - 03:42 PM (#3869748)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: DaveRo

I haven't used the Windows version, but ISTR VLC has a default location for saving the file. I think it'll only save it when you stop recording. I would look in 'downloads' if you have such a folder. What version of Windows, if it is Windows, do you have?

Or search in 'recent files' - in the start menu. I think it may produce an 'ogg' file (ogg/flac).


03 Aug 17 - 03:44 PM (#3869750)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: GUEST,HughJarres

Sorry, guys. I just discovered that VLC dumped the files in My Music, so I didn't have the choice, but that's fine. (I expect there's a default setting I need to change.) Oddly, they play back silently in VLC but OK in WMP. Still, I can work on that. Thanks for your help, both.


03 Aug 17 - 04:02 PM (#3869751)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: DaveRo

GUEST,HughJarres wrote: Oddly, they play back silently in VLC
When it plays - silently - what codecs does VLC detect? Somewhere in the menus.

You want it to mention 'lossless' or 'flac'. On Linux it encapsulates it in ogg file - which is a 'container format' - i.e. a way of including audio, video, subtitles, pictures, what-have-you, in a single file.

(Just listening to Brahms #2 here - but on DAB, not the interbet.)


03 Aug 17 - 04:28 PM (#3869755)
Subject: RE: Tech: BBC Radio 3 Lossless stream
From: GUEST,HughJarres

I was hoping to record the Brahms as a test, but I've been faffing about trying to play back recorded files from the first half of the concert! First, to clarify, I have Win10. Second, yes I found the files OK and they're .ogg and the detected codec in playback is flac. Still silent, though. However, I ran them through a conversion from .ogg to .flac and they play fine.

The reason for all this is that the sound from my PC is rubbish and I wanted to transfer the files to USB or CD and play though hi-fi.

Anyway, thanks again for your help.