Announcement

Collapse
No announcement yet.

How to record BBC Radio streams from BBC I-Player for mp3 players Improved speed

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to record BBC Radio streams from BBC I-Player for mp3 players Improved speed

    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.
    Running Kubuntu Karmic Koala&nbsp; with KDE 4.3 at home<br /><br />Kubuntu user 24342<br /><br />Running Dell Inspiron 530 Dual Core 3ghz<br /><br />and also running Kubuntu on a Lenovo thinkpad using a live pen drive<br /><br />Still no Microsoft here!

    #2
    Re: How to record BBC Radio streams from BBC I-Player for mp3 players

    very nice write up - thanks a ton, Andy.

    If you are the lucky owner of a full duplex sound card it appears that you can capture the stream straight from your pcm channel using audacity. Alas, I am not and the above is a top workaround
    Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

    Comment


      #3
      Re: How to record BBC Radio streams from BBC I-Player for mp3 players

      Nice writeup - thanks Andy!

      I used audacity about two years ago to record a collection of old analog records, but I've never attempted to record a stream. I opened it last night and poked around a little, but it wasn't obvious how I would go at it. But I'm interested -- I do have a multi-channel Intel HDA sound chip, and a PCM channel, which can probably do the job -- probably the user is the main obstacle to success, in this case. :P

      Comment


        #4
        Re: How to record BBC Radio streams from BBC I-Player for mp3 players

        I have got one of those ( user that gets in the way!)
        Running Kubuntu Karmic Koala&nbsp; with KDE 4.3 at home<br /><br />Kubuntu user 24342<br /><br />Running Dell Inspiron 530 Dual Core 3ghz<br /><br />and also running Kubuntu on a Lenovo thinkpad using a live pen drive<br /><br />Still no Microsoft here!

        Comment


          #5
          Re: How to record BBC Radio streams from BBC I-Player for mp3 players

          I'm the author of iplayerconverter.co.uk - thanks for the mention!

          I've just improved the Convert page (http://www.iplayerconverter.co.uk/convert.aspx to show the URL to the raw .ra file so you can copy/paste that directly after entering the relevant PID.

          One caveat - at the moment it appears the site is serving up some links that are UK-only. You can tell these as they will start rtsp://rm-acl instead of rtsp://rmv8 . I'm working on a fix for this...

          Any comments, suggestions or questions all welcome - hopefully I'll get a proper login for this board once the verification email comes through! In the meantime do email webmaster at iplayer converter dot co dot uk

          Comment


            #6
            Re: How to record BBC Radio streams from BBC I-Player for mp3 players

            Cool

            Cheers I have to say that this has been a real boost for me after discovering your work.

            Did not know what I should mention.....credits etc etc so did a general thanks but in person I would like to thank you as I really missed listening to my favorite radio programmes when and where I wanted to. I just hope the copyright suits do not see this as people stealing ...but choosing how they listen.

            Now I can listen to the programmes way past my bed time ( I am nearly forty!) at a time when my body clock works and I do not want to sit at the pc.

            Let me know if you want any of the how to amending at all and I will do it as soon as I can

            Running Kubuntu Karmic Koala&nbsp; with KDE 4.3 at home<br /><br />Kubuntu user 24342<br /><br />Running Dell Inspiron 530 Dual Core 3ghz<br /><br />and also running Kubuntu on a Lenovo thinkpad using a live pen drive<br /><br />Still no Microsoft here!

            Comment


              #7
              Re: How to record BBC Radio streams from BBC I-Player for mp3 players

              oh by the way ...will this all go pear shaped when the AAC stuff kicks in (which I am looking forward to for increased quality)
              Running Kubuntu Karmic Koala&nbsp; with KDE 4.3 at home<br /><br />Kubuntu user 24342<br /><br />Running Dell Inspiron 530 Dual Core 3ghz<br /><br />and also running Kubuntu on a Lenovo thinkpad using a live pen drive<br /><br />Still no Microsoft here!

              Comment


                #8
                Re: How to record BBC Radio streams from BBC I-Player for mp3 players

                Thanks for the positive vibes! I built the site to use myself as I got so used to downloading radio programmes to put on my iPod for convenient listening that I found when Radio moved to iPlayer that I just couldn't cope ;-)

                I'm intending to keep the Real streams available for as long as they are available. I may additionally add support for AAC / MP3 when it arrives (December for national radio and the New Year for local radio - so I've been told).

                I've no particular copyright worries as it's all being done using BBC Backstage licensed data and various people in the Future Media & Technology team at the Beeb are aware of what I'm doing. Obviously if I started selling access to the data then that's a no-no, but so long as it's free to use and I don't imply it's endorsed by Auntie then there shouldn't be a problem.

                Andrew

                Comment


                  #9
                  Re: How to record BBC Radio streams from BBC I-Player for mp3 players

                  That is the same frustration that I had. It is good to hear that the Beeb is looking to role out AAC sound for December as I am really keen to hear some higher quality sound.

                  I would love to be able to help out with the new stuff if you get stuck....when it comes although I do not know how..but I would love to help put something back.


                  Running Kubuntu Karmic Koala&nbsp; with KDE 4.3 at home<br /><br />Kubuntu user 24342<br /><br />Running Dell Inspiron 530 Dual Core 3ghz<br /><br />and also running Kubuntu on a Lenovo thinkpad using a live pen drive<br /><br />Still no Microsoft here!

                  Comment


                    #10
                    Re: How to record BBC Radio streams from BBC I-Player for mp3 players

                    Auntie has finally gone linux:

                    http://news.bbc.co.uk/1/hi/technology/7787335.stm

                    Am just about to see what it can do now, the article mentioned something about being able to download now
                    Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                    Comment


                      #11
                      Re: How to record BBC Radio streams from BBC I-Player for mp3 players

                      Tried it yesterday and had to download flash 10 but that still did not work hmmm

                      Any joy?
                      Running Kubuntu Karmic Koala&nbsp; with KDE 4.3 at home<br /><br />Kubuntu user 24342<br /><br />Running Dell Inspiron 530 Dual Core 3ghz<br /><br />and also running Kubuntu on a Lenovo thinkpad using a live pen drive<br /><br />Still no Microsoft here!

                      Comment


                        #12
                        Re: How to record BBC Radio streams from BBC I-Player for mp3 players

                        Yep. I got it downloaded although I'm in old Germ. Got my hopes up that I would be able to download stuff as well, but no joy.

                        Did you install adobe air as well? There is a link somewhere well hidden on their site (which really stinks :P).
                        Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                        Comment


                          #13
                          Re: How to record BBC Radio streams from BBC I-Player for mp3 players

                          nope but have just sorted the download of the new flash. Tried 10 + times using the deb file...to no avail

                          Then tried via the tar.gz ( quite the linux expert :P)

                          And it worked for some reason ...clicked on a programme and the download capacity is there...what is this air thing?
                          Running Kubuntu Karmic Koala&nbsp; with KDE 4.3 at home<br /><br />Kubuntu user 24342<br /><br />Running Dell Inspiron 530 Dual Core 3ghz<br /><br />and also running Kubuntu on a Lenovo thinkpad using a live pen drive<br /><br />Still no Microsoft here!

                          Comment


                            #14
                            Re: How to record BBC Radio streams from BBC I-Player for mp3 players

                            scrap that...can now see the download size but still will not download...need to find the right path for the file to download to...as sudo...should this be the firefox plugin in usr/lib?
                            Running Kubuntu Karmic Koala&nbsp; with KDE 4.3 at home<br /><br />Kubuntu user 24342<br /><br />Running Dell Inspiron 530 Dual Core 3ghz<br /><br />and also running Kubuntu on a Lenovo thinkpad using a live pen drive<br /><br />Still no Microsoft here!

                            Comment


                              #15
                              Re: How to record BBC Radio streams from BBC I-Player for mp3 players

                              I got it from here http://get.adobe.com/air/ and downloaded it wherever. It doesn't really matter. If I remember correctly you can even call it up as a user - it'll ask as soon as it wants to get root privileges. The flash also refused to do anything on my machine but that didn't matter on jot as the iplayer installed flawlessly...
                              Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                              Comment

                              Working...
                              X