Listening to BBC Radio with mpv
The BBC publishes high quality 320 kbps HLS AAC streams that can be used to listen to radio from the command-line using mpv. Here are the URLs and some aliases to start listening quickly.
BBC Radio feeds ¶
To the annoyance of some the BBC removed support for Windows Media and have migrated to using the AAC codec and http streaming. The good news is that the AAC streams are high quality and freely available. Matthew Peet shared the links to the 320 kbps HLS AAC streams on his site.
- BBC radio 1 AAC/.m3u8
- BBC radio 2 AAC/.m3u8
- BBC radio 3 AAC/.m3u8
- BBC radio 4 AAC/.m3u8
- BBC radio 4 Extra AAC/.m3u8
- BBC radio 5 live AAC/.m3u8
- BBC radio 5 live sports extra AAC/.m3u8
- BBC radio 6 Music AAC/.m3u8
Listening with mpv ¶
mpv is a fantastic cross-platform media player that can handle most formats thrown at it. It is based on mplayer and mplayer2. Playing a BBC stream is just a case of passing the URL to it. Magic.
mpv 'http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8'
Some useful aliases ¶
I made some aliases for the stations so I can stream with simple command.
Running playbbcr6
for example plays BBC 6 Music.
alias playbbcr1="mpv 'http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_one.m3u8'"
alias playbbcr4="mpv 'http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_fourfm.m3u8'"
alias playbbcr5l="mpv 'http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_five_live.m3u8'"
alias playbbcr5lsx="mpv 'http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_five_live_sports_extra.m3u8'"
alias playbbcr6="mpv 'http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8'"
Listening to iPlayer Radio content ¶
It is also possible to pass any URL from iPlayer (audio and video) to mpv. More magic
mpv http://www.bbc.co.uk/programmes/b07z4djf
Listening from outside the UK ¶
Whilst I was over in the USA (virtually at least) listening to these streams was not possible so there looks to be geo-blocking on these streams. A UK VPN would work I imagine.
playbbc6
Playing: http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8
[ffmpeg] http: HTTP error 403 Forbidden
[lavf] avformat_open_input() failed
Further reading ¶
Tags
Can you help make this article better? You can edit it here and send me a pull request.
See Also
-
Linux and Unix more command tutorial with examples
Tutorial on using more, a UNIX and Linux command for viewing the contents of a file or files one screen at a time. Examples of viewing a file, viewing multiple files, searching using regular expressions and opening the file in a text editor. -
Linux and Unix kill command tutorial with examples
Tutorial on using kill, a UNIX and Linux command for terminating a process. Examples of killing a process, sending a SIGTERM, listing signal names and numbers, and handling 'operation not permitted' errors. -
Linux and Unix touch command tutorial with examples
Tutorial on using touch, a UNIX and Linux command for changing file timestamps. Examples of creating an empty file, updating access and modification time, updating just access time, updating just modification time and setting timestamps in the past.