How to record BBC Radio streams from BBC I-Player to listen on other devices such as mp3 players
Edited 3rd February 2009 with shorter scripts to make it less complicated!
Intro
After successfully managing this thanks to help from people on the kubuntu forums I thought we needed a HOW TO and this is my first one so might be more of a how not to. However thanks to positive support both here and over on the ubuntu forums I can updated the script to show a method of downloading the wav faster. This greatly speed things up ( ie takes a few minutes not hours for a 2 hour programme!) and does not seem to mess up the quality as previous methods have done. SO thanks to all those on the ubuntu forums who came up with this edit
Reasoning
Used to listen to bbc on my mp3 via a recorded stream from the BBC but with I-player that stopped.
Then this page came up:
http://www.iplayerconverter.co.uk/
This page gets the info needed for the radio stream to be unlocked so we can record it using a Programme ID (PID)
Getting the stream
Ok here we go. I will give an example of a BBC radio 3 programme : Late Junction for a Tuesday night (Dec 2nd 2008) .
The software I needed for this was mplayer.You can get this via adept/synaptic or via the terminal:
sudo apt-get install mplayer
Now you need to find the PID of the programme you would like to listen to.
http://www.iplayerconverter.co.uk/
Or you can browse directly here:
http://www.iplayerconverter.co.uk/choose_aod.aspx
Each one has the relevant PID code on the right hand side of the page and in my case they are all blue which is helpful. The PID for this programme was b00fs4pm.
When I click on this link it fires up with mplayer trying to access via radiobridge the rtsp for the programme.
You will see you browser has a normal web address of something like :
http://www.bbc.co.uk/iplayer/aod/pla...adio_three.ram
However mplayer is trying to actually play the broadcast and so it has to access the rtsp address. The rtsp address is like the http address but stands for Real Time Streaming Protocol. So in plain English it is trying to access the streaming address for the programme.
When it has finished buffering you will see a long rtsp address like this one
rtsp://rm-acl.bbc.co.uk:554/radio3coyopa/radio_3_-_tuesday_2315.ra?timestamp=1228271295&pid=b00fs4pm &BBC-UID=342932fd17889cae882969d011ec4a5ec443feec0020a1 09db2b431277fd59de&SSO2-UID=
Here you only need this bit
rtsp://rm-acl.bbc.co.uk:554/radio3coyopa/radio_3_-_tuesday_2315.ra So select and right click, copy etc.
Here, Mplayer is now trying to get the file and play it. When it has done this it should start playing the programme and bingo you can hear the stream (make sure your speakers are on! I did not )
Press pause on the left hand side at the bottom of the mplayer page and right click and select copy the rtsp link address.
Now to record!
Fire up a terminal screen and type in the following commands
mplayer -cache 2048 -bandwidth 9999999 "” -vc null -vo null -ao pcm:fast:waveheader:file=latejunction.wav
Here, in-between the speech marks you insert or paste the rtsp address.Then hit return.
So again for clarity you insert
rtsp://rm-acl.bbc.co.uk:554/radio3coyopa/radio_3_-_tuesday_2315.ra
so the full command in CLI is
mplayer -cache 2048 -bandwidth 9999999 "rtsp://rmv8.bbc.net.uk:554/radio3coyopa/radio_3_-_tuesday_2315.ra" -vc null -vo null -ao pcm:fast:waveheader:file=tuesdaylatejunction.wav
As an explanation ( as it confused me) you are telling it to make a .wav file by recording the file found at the rtps address. It then saves this in your home folder as a .wav file. You need to give them a name better then file.wav etc so here as you can see I have labelled it latejunctiontue.wav. These are large (1gig files) so make room.
Straight away it starts to cache some of the programme and then record. It does not slow your system down or hog the internet so you can confine it to another desktop. Your terminal will at first say it cannot resolve the names and then start to connect to the BBC and start to record.
In your home folder you will see the .wav file you have created which will get bigger and after maybe a few minutes dependent upon your download speed the file will be complete and will stop running in your terminal.Your .wav file is now ready to play or convert using soundkonvertor to mp3/ogg etc to transfer to your portable device. You may of course use any other wav to whatever convertor
You can then reuse the same basic script
mplayer -cache 2048 -bandwidth 9999999 "insertyourrtspaddressherebetweenthespeechmark s” -vc null -vo null -ao pcm:fast:waveheader:file=latejunction.wav
for which ever programme and remember to replace the .wav name or it rewrites it! AGGHH. The sound quality is not perfect and not cd quality but good enough for podcasts and means I can listen to the BBC where I want to and do not miss their excellent programmes.
Thanks to all who have helped here especially toad and in particular to the people at iplayerconverter.
If you are more interested in this there is more info about this at here:
http://www.iplayerconverter.co.uk/about.aspx
Which is more than just credits
and the BBC here:
http://www.bbc.co.uk/blogs/radiolabs..._with_pro.shtm
There is also the same topic discussed on the ubuntu forums (after here too :P)
http://ubuntuforums.org/showthread.php?t=914971
Please feel free to contact me if you get problems or have suggested changes.
Edited 3rd February 2009 with shorter scripts to make it less complicated!
Intro
After successfully managing this thanks to help from people on the kubuntu forums I thought we needed a HOW TO and this is my first one so might be more of a how not to. However thanks to positive support both here and over on the ubuntu forums I can updated the script to show a method of downloading the wav faster. This greatly speed things up ( ie takes a few minutes not hours for a 2 hour programme!) and does not seem to mess up the quality as previous methods have done. SO thanks to all those on the ubuntu forums who came up with this edit
Reasoning
Used to listen to bbc on my mp3 via a recorded stream from the BBC but with I-player that stopped.
Then this page came up:
http://www.iplayerconverter.co.uk/
This page gets the info needed for the radio stream to be unlocked so we can record it using a Programme ID (PID)
Getting the stream
Ok here we go. I will give an example of a BBC radio 3 programme : Late Junction for a Tuesday night (Dec 2nd 2008) .
The software I needed for this was mplayer.You can get this via adept/synaptic or via the terminal:
sudo apt-get install mplayer
Now you need to find the PID of the programme you would like to listen to.
http://www.iplayerconverter.co.uk/
Or you can browse directly here:
http://www.iplayerconverter.co.uk/choose_aod.aspx
Each one has the relevant PID code on the right hand side of the page and in my case they are all blue which is helpful. The PID for this programme was b00fs4pm.
When I click on this link it fires up with mplayer trying to access via radiobridge the rtsp for the programme.
You will see you browser has a normal web address of something like :
http://www.bbc.co.uk/iplayer/aod/pla...adio_three.ram
However mplayer is trying to actually play the broadcast and so it has to access the rtsp address. The rtsp address is like the http address but stands for Real Time Streaming Protocol. So in plain English it is trying to access the streaming address for the programme.
When it has finished buffering you will see a long rtsp address like this one
rtsp://rm-acl.bbc.co.uk:554/radio3coyopa/radio_3_-_tuesday_2315.ra?timestamp=1228271295&pid=b00fs4pm &BBC-UID=342932fd17889cae882969d011ec4a5ec443feec0020a1 09db2b431277fd59de&SSO2-UID=
Here you only need this bit
rtsp://rm-acl.bbc.co.uk:554/radio3coyopa/radio_3_-_tuesday_2315.ra So select and right click, copy etc.
Here, Mplayer is now trying to get the file and play it. When it has done this it should start playing the programme and bingo you can hear the stream (make sure your speakers are on! I did not )
Press pause on the left hand side at the bottom of the mplayer page and right click and select copy the rtsp link address.
Now to record!
Fire up a terminal screen and type in the following commands
mplayer -cache 2048 -bandwidth 9999999 "” -vc null -vo null -ao pcm:fast:waveheader:file=latejunction.wav
Here, in-between the speech marks you insert or paste the rtsp address.Then hit return.
So again for clarity you insert
rtsp://rm-acl.bbc.co.uk:554/radio3coyopa/radio_3_-_tuesday_2315.ra
so the full command in CLI is
mplayer -cache 2048 -bandwidth 9999999 "rtsp://rmv8.bbc.net.uk:554/radio3coyopa/radio_3_-_tuesday_2315.ra" -vc null -vo null -ao pcm:fast:waveheader:file=tuesdaylatejunction.wav
As an explanation ( as it confused me) you are telling it to make a .wav file by recording the file found at the rtps address. It then saves this in your home folder as a .wav file. You need to give them a name better then file.wav etc so here as you can see I have labelled it latejunctiontue.wav. These are large (1gig files) so make room.
Straight away it starts to cache some of the programme and then record. It does not slow your system down or hog the internet so you can confine it to another desktop. Your terminal will at first say it cannot resolve the names and then start to connect to the BBC and start to record.
In your home folder you will see the .wav file you have created which will get bigger and after maybe a few minutes dependent upon your download speed the file will be complete and will stop running in your terminal.Your .wav file is now ready to play or convert using soundkonvertor to mp3/ogg etc to transfer to your portable device. You may of course use any other wav to whatever convertor
You can then reuse the same basic script
mplayer -cache 2048 -bandwidth 9999999 "insertyourrtspaddressherebetweenthespeechmark s” -vc null -vo null -ao pcm:fast:waveheader:file=latejunction.wav
for which ever programme and remember to replace the .wav name or it rewrites it! AGGHH. The sound quality is not perfect and not cd quality but good enough for podcasts and means I can listen to the BBC where I want to and do not miss their excellent programmes.
Thanks to all who have helped here especially toad and in particular to the people at iplayerconverter.
If you are more interested in this there is more info about this at here:
http://www.iplayerconverter.co.uk/about.aspx
Which is more than just credits
and the BBC here:
http://www.bbc.co.uk/blogs/radiolabs..._with_pro.shtm
There is also the same topic discussed on the ubuntu forums (after here too :P)
http://ubuntuforums.org/showthread.php?t=914971
Please feel free to contact me if you get problems or have suggested changes.
Comment