Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.


Topics - Ed

Pages: [1] 2 3
1
Paul Temple and the Gregory Affair, starring Crawford Logan, begins today on 4 Xtra.

This is in the 6am slot, with repeats at 1pm, 8pm and 1am.

A ten parter! The longest Paul Temple serial ever broadcast. And probably too long: the fact that this experimental length - an early experiment, in 1946 - was never tried again suggests that the BBC actually realised that at the time.

When broadcast on Radio 4 FM, five years ago, I found this one very hard to follow, because by the time they'd reached episode 8 - and buggered about by taking a week off in the middle to broadcast something else - I had completely lost the plot.

Hopefully, it may be easier to follow when broadcast as a daily serial, over 2 weeks instead of 11.

Link -
http://www.bbc.co.uk/programmes/b0368fwf

2
This is a brief note intended to help listeners to the BBC iPlayer service, following recent changes to it that have hidden many of the audio streams that run at more than 128 kbps.



BBC iPlayer DASH audio streams

I have, with regret, abandoned the FFMPEG program entirely.

The BBC now use two types of audio stream, HLS and DASH. FFMPEG can only download HLS, but I cannot find any HLS on-demand streams that are genuinely running at more than 128 kbps (i.e. the entire 'Listen-again' service is only running at 128 kbps, even streams that are advertised as having a higher bitrate).

Solutions I've suggested in the past on Beebotron for HLS streams will still work. And the live streams can still be accessed at the 320 kbps bitrate. Even the On-demand streams can be accessed, but only at 128 kbps, not at 320 kbps.

But I would now recommend Livestreamer.exe as the best program for accessing all of those streams, not ffmpeg.

Livestreamer is here:

https://github.com/chrippa/livestreamer/releases/download/v1.12.2/livestreamer-v1.12.2-win32-setup.exe

And for anyone who wants the 320 kbps bitrate, only the DASH streams now provide that, for the On-demand streams (and the BBC seem to be moving gradually towards using only DASH). So welcome to the world of YouTube-dl.



YouTube-dl

This is a downloader program which downloads DASH streams. It runs on Windows (and other platforms), and was originally developed to download videos from YouTube.com (hence the fact that it's called YouTube Downloader), but it also works with other sites that use DASH.

Get YouTube-dl here:

  https://rg3.github.io/youtube-dl/

The Firefox script by Andrea has been rewritten from scratch for the new version (version 4), to cope with the latest changes to iPlayer. The version 4 script doesn't use FFMPEG, instead it takes advantage of YouTube-dl : a program which has DASH recording capability.

Get Andrea's script (currently v4.0.5), for Firefox, here:

  https://greasyfork.org/en/scripts/8161-bbc-iplayer-video-download


The audio streams are downloaded in their original formats. Usually this results in an .MP4 file for tv shows, and .M4A for radio shows. The file plays in GOM media player (and, in my tests, in most media players that run on Windows - except, sadly, Winamp).

The script enables you to download (i.e. record) video or audio in the DASH format, by providing the necessary command line. You also need to use youtube-dl to actually record the streams (https://rg3.github.io/youtube-dl/).


So all you need is the YouTube-dl.exe program, in order to download a DASH audio file using the new type of command line, which Andrea's script will give you (currently the script is version 4.0.5).

I use Firefox 39, with the Greasemonkey add-on. Andrea's script installs in Firefox as a Greasemonkey script, as described in my other posts on Beebotron about the iPlayer 320 kbps streams.

Here's an example of the command line that appears on the iPlayer page when you open it in Firefox. This is an episode of 'To the Manor Born' (from the radio series) -

Code: [Select]
youtube-dl -f bestaudio "http://aod-dash-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_audio/648c91-b0059prl/vf_b0059prl_3e1c3c39-8dd1-4b21-9b3b-a3a7656fc519.ism/pc_hd_abr_v2_uk_dash_master.mpd?__gda__=1501970164_f704cf749be1d3bcabe59ff62e003d1a" -o To_the_Manor_Born_The_Rhythms_of_the_Earth
Copy-and-paste the command line from Firefox into a batch file (a .bat or .cmd file in Windows), put the batch file in the same folder as YouTube-dl.exe, then run the batch file. The file which downloads must then be given the extension .mp4 or .m4a by you.



MPEG-DASH

Dynamic Adaptive Streaming over HTTP (DASH), also known as MPEG-DASH, works by breaking the content into a sequence of small HTTP-based file segments, each segment containing a short interval of playback time of content.

MPEG-DASH should not be confused with a transport protocol — the transport protocol that MPEG-DASH uses is TCP.

It can use content encoded with any codec. The BBC currently use both HLS and MPEG-DASH.




3
Today I listened to The Lives of Harry Lime starring Orson Welles: an episode entitled Blackmail is a Nasty Word.

Or perhaps I should say, 'Today I listened to The Half-life of Harry Lime'.

Thanks are due to the BBC cretin who arranged to broadcast this 28 minute episode in a 19 minute timeslot.

4
Geek Speak / Download a 64 kbps Podcast at 384 kbps using FFMPEG
« on: July 11, 2017, 04:47:12 PM »
Whilst listening to a "Listen Again" radio show on BBC iPlayer, I noticed that it had a button marked DOWNLOAD. This was the first time I'd seen such an option on iPlayer.

Turns out it's a fairly common feature on science programmes (I was listening to a broadcast about botany), albeit one which is completely unknown on Light Entertainment programmes. (This may tell you more about me than about the iPlayer!)

Investigating further, I discovered that it is what the BBC term a 'podcast'. They define this as being an mp3 file, recorded at 64 kbps, downloadable on demand. Probably, therefore, everything I'm about to mention will apply to all BBC podcasts.

You've opened this thread because of what you read in its title, so it won't surprise you to learn that I'm about to describe a method for violating the 64 kbps limitation, and instead downloading the podcast of interest at the standard on-demand bitrate of 384 kbps.


Software required -

FFMPEG.exe (Static build recommended)
https://ffmpeg.zeranoe.com/builds/



Procedure -

1.  Create a batch file (a plain-text file with the extension .bat or .cmd)
     (name it, say, download.bat).
2.  Put FFMPEG.exe in the same directory/folder as the batch file.
3.  Copy-and-paste the command line, below, into the batch file (for this,
     open the batch file in a text editor, e.g. Notepad, not a word processor).
4.  Then save the file (be sure to save it with the extension .bat not .txt).
5.  (Optional) Modify the file extension specified on the command line:
     change it from .mp2 to whatever you want (only mp2 gives 384 kbps output).
6.  Copy-and-paste into the batch file the url address of the mp3 podcast file
     (found by right-clicking on the podcast's "Download" button).
7.  Run the batch file.



Here is the command line for Step 3 (actually, 2 lines), which you copy-and-paste into the batch file:

Code: [Select]
SET url=

ffmpeg  -v 16  -stats  -i  %url%  output.mp2



In Step 6, when you copy-and-paste the url address into the batch file, the SET command should resemble this example (I've added colours: the part in silver is the part you insert) -

SET url=http://open.live.bbc.co.uk/mediaselector/5/redir/version/2.0/mediaset/audio-nondrm-download/proto/http/vpid/p02qjf77.mp3

Important:  Do not modify the url address. Although it is an mp3 address, and you aim to download an mp2 file, it is essential that the target url is EXACTLY the same as the iPlayer page specifies. My command line, above, handles the necessary technical jiggery-pokery.




The above method should be capable of downloading any podcast that does not use DRM (but I've never come across a DRM podcast on the BBC site). What you get for your trouble is a download of the podcast show, at 384 kbps, as a 44.1kHz mp2 file (instead of as 64 kbps 44.1kHz mp3).




Technical Note

On the 'Listen Again' service, FFMPEG fetches whichever audio stream you specify.

If the command line specifies .mp2 the program will fetch the .mp2 stream (which, on BBC iPlayer, is a 384 kbps stream); or if the command line specifies .m4a the program will fetch the .m4a stream (which, on BBC iPlayer, is a 128 kbps stream).

There are lots of different file types (e.g. .mp3, .mp2, .m4a, .mp4, .mpeg, .ts, .flac, .wav). FFmpeg will fetch a different stream (i.e. a different bitrate and/or sample rate) for each of the different file types.

The highest bitrate is for uncompressed .wav (approx 1,500 kbps). The highest bitrate I've yet come across for a compressed format is 384 kbps for the .mp2 file type.






5
Geek Speak / Screenscraping - A technique to find the vpid
« on: July 03, 2017, 09:29:06 PM »
When I am completely stuck, I use the following website to look up url's for the 'Listen Again' programmes on the radio iPlayer:

  http://www.iPlayerConverter.co.uk/convert.aspx

I can use ffmpeg.exe to download high quality streams from these url's (higher bitrates than I typically get from using programs such as get_iplayer, e.g. 320 kbps and 384 kbps streams).

It used to be trivial to use iPlayerConverter.co.uk because all it needed was the 8-digit PID (Programme ID) included in the Listen Again page's url.

But recently iPlayerConverter.co.uk changed over to using the vpid instead of the pid. I thought it was still trivial to get the vpid because, when you play the 'Listen Again' radio show, you can right-click on the playing window in the browser, and a pop-up window opens and displays both the PID and the VPID.

Now, however, the iPlayer has disappeared behind a pay-wall, and you can't play the show, so can't right-click on the playing window. (Yes, I know no money changes hands, but the technology being deployed against us is nonetheless what's known in the trade as a 'paywall'.)

Yes, it is still trivial to get the vpid. You can still play the show in older browsers: if you play it in Internet Explorer 8, the newer javascript on the iplayer website is ignored by the browser, which only understands older forms of javascript. So the show plays, and the player window appears, and can be right-clicked.

And in any browser, you can view the page source and do a 'find' search for "vpid" to find it.

I thought it would be better to write a short batch file routine to extract the 8-digit vpid from the page automatically, using just the ordinary PID. So here it is. The only contribution made by the user is to insert the PID (replacing the example PID shown as a row of 8 zero's).

This is a demo script, really, because it can readily be adapted to extract any desired information from a .html web page (that is, an ordinary webpage, one which does not use xml). The javascript runs in Internet Explorer, and downloads the target webpage specified, as a text string, which it then searches: using a javascript technique called Regular Expressions to specify the text to be extracted. It then displays any matching text found.


Click 'Select' to highlight the code, then copy-and-paste it into a plain text file with the file extension .bat instead of .txt (e.g. vpid.bat). Then open the .bat file (using, say, Notepad.exe), and replace the 8 zero's with the actual 8-digit PID of the target iplayer page. Then double click the .bat file to run it.



Code: [Select]
@echo off

::  *** Get the VPID : BBC Radio on-demand ***

::  ** Programme ID **
SET PID=00000000

::  -------------------------------------------------------------------------------------------------------------------------------------------  ::

::  *** User Variables ***
    SET temp_dir=C:\\Users\\dg\\AppData\\Local\\Temp

::  -------------------------------------------------------------------------------------------------------------------------------------------  ::

ECHO ^<html^>                                                                                                                    > %temp%\temp.htm
ECHO ^<head^>                                                                                                                   >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO ^<title^>Download BBC iPlayer HTML page and extract Text^</title^>                                                         >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO ^<SCRIPT language="javascript" type="text/javascript"^>                                                                    >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO // Target HTML file's URL address                                                                                          >> %temp%\temp.htm
ECHO    var url = "http://www.bbc.co.uk/programmes/%PID%" ;                                                                     >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO window.open('','_self'); // This prevents the browser window prompting before closing                                      >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO var http_request = false;                                                                                                  >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO function makeRequest(url) {  // URL = iPlayer page                                                                         >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO   http_request = false;                                                                                                    >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO   try {                                                                                                                    >> %temp%\temp.htm
ECHO     http_request = new ActiveXObject("Msxml2.XMLHTTP");                                                                    >> %temp%\temp.htm
ECHO   } catch (e) {                                                                                                            >> %temp%\temp.htm
ECHO     try {                                                                                                                  >> %temp%\temp.htm
ECHO       http_request = new ActiveXObject("Microsoft.XMLHTTP");                                                               >> %temp%\temp.htm
ECHO     } catch (e) {}                                                                                                         >> %temp%\temp.htm
ECHO   }                                                                                                                        >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO   if (!http_request) {                                                                                                     >> %temp%\temp.htm
ECHO     alert ('Giving up - Cannot create an XMLHTTP instance');                                                               >> %temp%\temp.htm
ECHO     return false;                                                                                                          >> %temp%\temp.htm
ECHO   }                                                                                                                        >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO   http_request.onreadystatechange = alertContents;                                                                         >> %temp%\temp.htm
ECHO   http_request.open('GET', url, true);                                                                                     >> %temp%\temp.htm
ECHO   http_request.send(null);                                                                                                 >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO }  // Close FUNCTION                                                                                                       >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO function alertContents() {                                                                                                 >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO   if ( http_request.readyState == 4 ) {                                                                                    >> %temp%\temp.htm
ECHO     if ( http_request.status == 200 ) {                                                                                    >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO        var fso  = new ActiveXObject("Scripting.FileSystemObject");                                                         >> %temp%\temp.htm
ECHO        var fh  = fso.CreateTextFile("%temp_dir%\\%PID%.html",true);         // Create Text File                            >> %temp%\temp.htm
ECHO        var fh1 = fso.CreateTextFile("%temp_dir%\\%PID%_vpid.txt",true);     // Create Text File                            >> %temp%\temp.htm
ECHO        var fh2 = fso.CreateTextFile("%temp_dir%\\%PID%_vpid_2.txt",true);   // Create Text File                            >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO        // Save contents of HTML page to text file as a String                                                   // line 50 >> %temp%\temp.htm
ECHO           fh.WriteLine( "<base href='http://www.bbc.co.uk'>" );             // Add BBC domain's href address               >> %temp%\temp.htm
ECHO           fh.WriteLine( http_request.responseText );                        // Add HTML contents of target webpage         >> %temp%\temp.htm
ECHO           // alert ( http_request.responseText );                                                                          >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO        // Use RegEx [Regular Expression] to find data in responseText (HTML)                                               >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO           // Input String (HTML from target URL)                                                                           >> %temp%\temp.htm
ECHO              var input = http_request.responseText;                          // Input                                      >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO           // Define the Pattern                                              // Pattern                                    >> %temp%\temp.htm
ECHO           // 8 literals + 8 chrs (mixed letters and digits) + 1 literal      // Example: "vpid":"b006bm2h"                 >> %temp%\temp.htm
ECHO              var pattern = /"vpid":"[A-Z0-9]{8}"/gi;                                                                       >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO           // Create OUTPUT string holding ALL matches                                                                      >> %temp%\temp.htm
ECHO              var str1 = input.match(pattern);                                // Match String with Pattern                  >> %temp%\temp.htm
ECHO              // alert ( str1 );                                                                                            >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO           // Save the data to a text file -                                                                                >> %temp%\temp.htm
ECHO              fh1.WriteLine( str1 );                                          // %PID%_vpid.txt                  // line 70 >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO           // Adjust the data -                                                                                             >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO              // Replace some text                                                                                          >> %temp%\temp.htm
ECHO                 var str2 = fso.OpenTextFile("%temp_dir%\\%PID%_vpid.txt");   // Open a text file                           >> %temp%\temp.htm
ECHO                 var str3 = str2.ReadAll();                                   // Read file's contents into a variable       >> %temp%\temp.htm
ECHO                 var str4 = str3.replace(/^"/g, "").replace(/^:/g, ": ");     // Replace all quotes and semicolons          >> %temp%\temp.htm
ECHO              // var str4 = str3.replace(/^"/g, "").replace(/^,/g, "\n");     // Replace all quotes and all commas          >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO              // Split the data into sections seperated by the specified symbol                                             >> %temp%\temp.htm
ECHO                 var str5 = str4.split(",");                                                                                >> %temp%\temp.htm
ECHO                 // alert ( str5[0] ) ;                                                                                     >> %temp%\temp.htm
ECHO                 // alert ( str5[1] ) ;                                                                                     >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO              // Save the adjusted data to a text file -                      // Save to %PID%_vpid_2.txt                   >> %temp%\temp.htm
ECHO                 fh2.WriteLine( "pid:  %PID%" );                                                                            >> %temp%\temp.htm
ECHO                 fh2.WriteLine( str5[0] );                                    // Save only the FIRST (discard str5[1])      >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO     } else { alert ('There was a problem with the request') };                                                             >> %temp%\temp.htm
ECHO   }                                                                                                                        >> %temp%\temp.htm
ECHO }     // Close FUNCTION                                                                                                    >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO ^</SCRIPT^>                                                                                                                >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO ^</head^>                                                                                                                  >> %temp%\temp.htm
ECHO.                                                                                                                           >> %temp%\temp.htm
ECHO ^<body onload="makeRequest(url);setTimeout('window.close()',4000)"^> ^</body^>                                             >> %temp%\temp.htm
ECHO ^</html^>                                                                                                                  >> %temp%\temp.htm

::  The function setTimeout gives TEMP.HTM enough time to access the Internet
::  before the scripts in it run (which need the data drawn from the Internet)

::  -------------------------------------------------------------------------------------------------------------------------------------------  ::

::  *** Run temp.htm ***
"C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE" %temp%\temp.htm

::  *** Open file : VPID ***
START ""  "C:\Windows\SYSTEM32\Notepad.exe" "%temp_dir%\\%PID%_vpid_2.txt"






6
Geek Speak / How to listen to iPlayer without signing-in
« on: July 01, 2017, 02:17:12 PM »
As I thought this topic would potentially have quite wide interest, I've started it in the main forum at -

  https://forum.beebotron.org/index.php?topic=66093.0


7
As of July 1st, any attempt to listen to the BBC Radio iPlayer is met with a refusal, unless you are signed-in to a BBC account.

To listen without signing in, there are various options.



If you are running any version of the Windows operating system, edit the HOSTS file.

Add the following line (blocks the script which forces you to sign-in):

  127.0.0.1   ssl.bbc.co.uk

  Note: How to edit a HOSTS file - Edit HOSTS file




Listen to the live stream, using Winamp (or any media player of your choice), with one of these URLs -

  http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4extra_mf_p

  http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4extra_mf_q

  http://www.radiofeeds.co.uk/bbcradio4extra.pls




Listen to the live stream, using VLC Media Player, with one of these URLs -

128 kbps stream:
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/high/llnw/bbc_radio_four_extra.m3u8
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_med/llnw/bbc_radio_four_extra.m3u8

320 kbps stream:
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/llnw/bbc_radio_four_extra.m3u8
http://as-hls-uk-live.akamaized.net/pool_6/live/bbc_radio_four_extra/bbc_radio_four_extra.isml/bbc_radio_four_extra-audio%3d320000.m3u8

VLC media player is here:  http://www.videolan.org/vlc/




Download one of the live streams, using the program FFMPEG.EXE, with one of these commands (at a command prompt, or in a batch file) -

Code: [Select]
  ffmpeg -v 16 -stats -i "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4extra_mf_p" Out.mp2
Code: [Select]
  ffmpeg -v 16 -stats -i "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4extra_mf_q" Out.mp2



Listen to an on-demand Listen Again programme (but not the live stream), using Internet Explorer 8.

Because IE8 uses an old version of javascript, it does not recognise the newer forms of javascript used in iPlayer. It in effect ignores them, and so the audio stream plays normally.

Just turning off javascript won't work. The iPlayer refuses to stream any audio if the browser has no javascript support at all.


To listen in this way in Internet Explorer, you must use a url in this format:

  http://www.bbc.co.uk/programmes/b01mbztt

(because the trick won't work if you use a url in the older format: http://www.bbc.co.uk/radio/player/b01mbztt).




Here's how to download an on-demand programme from the Listen Again service, to listen to it off-line -


FFMPEG command line from Greasemonkey script

These instructions are for use in Windows XP / Vista / 7 / 8 / 10. There are links below to obtain the software mentioned.


A.  To obtain the command line -

1. Open the Firefox browser (must have the Greasemonkey extension installed, and the iPlayer greasemonkey script installed).

2. Open the iPlayer page which plays the radio show, using Firefox. After a few moments, an FFMPEG command line will be displayed immediately below the area where the radio show plays.


B.  To run the command line -

3. Create a batch file (a plain-text file with the extension .bat or .cmd).
4. FFMPEG.exe must be copied into the same directory/folder as the batch file.
5. Copy-and-paste the command line into the batch file.
6. Modify the file extension specified on the command line: change it from .mp3 to whatever you want (see below).
7. Run the batch file.


Software required -

FFMPEG.exe (Static build recommended)
https://ffmpeg.zeranoe.com/builds/

Firefox 39
https://ftp.mozilla.org/pub/firefox/releases/39.0/win32/en-US/Firefox%20Setup%2039.0.exe

Greasemonkey extension for Firefox 39
https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/

Greasemonkey script 'BBC iPlayer video download', for Firefox 39
https://greasyfork.org/en/scripts/8161-bbc-iplayer-video-download/

Addendum :  You might need to replace the .js file installed by the current version of the installer with an older version of that file (version 3.6.3) to get the script to work in Windows. Here's a link to v3.6.3:

BBC iPlayer video download v 3.6.3 -
https://www.mediafire.com/?awx3o4v2l49yceg

In Windows 7, the .js file is in this folder -
C:\Users\%Username%\AppData\Roaming\Mozilla\Firefox\Profiles\<ProfileName>\gm_scripts\BBC_iPlayer_video_download


Notes -

The above procedure can download a file in various formats, including (for radio): .mp3, .mp2, .m4a, .ts

For instance, .MP2 files have a 384 kbps stream, of better audio quality than the MP3 stream.

  •    M4A   : Variable KBPS rate, up to 200 kbps; 48 kHz; Stereo; MPEG-4 AAC LC
  •    MP3   : Fixed  128 kbps rate; 48 kHz; Stereo; MPEG-1 layer 3
  •    MP2   : Fixed  384 kbps rate; 48 kHz; Stereo; MPEG-1 layer 2
  •    TS     : Fixed  384 kbps rate; 48 kHz; Stereo; 16 bit per sample
  •    WAV  : Fixed 1536 kbps rate; 48 kHz; Stereo; Signed 16 bit PCM

  •    M4A is downloaded if the command line specifies an output file with the extension .M4A
  •    MP3 is downloaded if the command line specifies an output file with the extension .MP3
  •    MP2 is downloaded if the command line specifies an output file with the extension .MP2
  •    TS is downloaded if the command line specifies an output file with the extension .TS
  •    FLAC is downloaded if the command line specifies an output file with the extension .FLAC
  •    WAV is downloaded if the command line specifies an output file with the extension .WAV

By default, the Greasemonkey script adds .mp3 to the command line; but you can replace that with any of the above alternatives (or some other). I recommend replacing it with .mp2 because of the superior bitrate.


I developed this solution on my laptop, which happens to be running the Firefox 39 browser. The solution will probably work in other versions of Firefox; but if it doesn't (some add-ons only work on particular Firefox versions), be aware that you can always force it to work - by installing Firefox version 39.

If you are running Internet Explorer, don't uninstall IE. On Windows 7, there are no problems arising if you also install Firefox. The most that might happen is all urls start opening in Firefox (which is easy to fix): both browsers co-exist happily on my laptop, and have done for years.


Read this article (by Andrea Lazzarotto) for further information -
https://andrealazzarotto.com/2015/02/20/how-to-download-bbc-iplayer-videos/

I only understand Windows! But Andrea develops this software in the Linux operating system. So Andrea's webpage has information for anyone wishing to download from iPlayer using a computer running on Linux.




Andrea's solution is the easiest way to get the necessary url. But if it doesn't work for you (even when you replace the latest version with version 3.6.3), you can get the necessary url from the following site:

  http://www.iplayerconverter.co.uk/convert.aspx

To get the vpid which that site needs (an 8-digit text string):

  1. Open the iPlayer page for the radio show, in Firefox.
  2. Without playing that show, right-click on that page, and select 'View Page Source'.
  3. Search (on the toolbar: Edit > Find) the resulting text for the phrase: "vpid"

The vpid is also available, but only for the most recent broadcasts, from the station's xml page (where it is described as the "version_pid") -

  http://www.bbc.co.uk/radio/aod/availability/radio4extra.xml




Alternatively, once you have the vpid you could simply modify the following url (a HLS stream) (by substituting the 8-digit vpid for the 8 zero's), without needing to use the iPlayerConverter.co.uk site -

http://open.live.bbc.co.uk/mediaselector/5/redir/version/2.0/vpid/00000000/mediaset/audio-syndication/proto/http

That url, once it includes the 8-digit vpid, will work successfully as the url to use with ffmpeg.




Alternatively, you can get a working url from the following Beebotron page (a HLS stream):

  https://beebotron.org/listings/radio4extra/hls/

  Warning -  The Beebotron DASH links do not work with this method
                  (FFMPEG can't download the audio stream from a DASH url in this format).

Note that a HLS stream is an mpeg stream. The .bat file should only be used to download a stream in the .mp3 or .mp2 or .mpeg or .ts format. It might throw a wobbly if you use it to download in .mp4 or .m4a or .aac format.




Here is a 2-line batch file (name it, say, download.bat) which can be used with ffmpeg to download from iPlayer, using the url obtained by any of the above methods (put ffmpeg.exe in the same folder as the .bat file) -


  SET url=

  ffmpeg  -v 16  -stats  -i  %url%  output.mp2



Copy-and-paste the url address into the batch file, so that the SET command looks like this example -

SET url=http://aod-hls-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_audio/dc7feb-b006bm2h/vf_b006bm2h_8c83614a-8af7-4054-a60c-13241d62d475.ism/mobile_wifi_main_sd_abr_v2_uk_hls_master.m3u8?__gda__=1499036530_28808d5a86fb76d13d26039fc83f8cc5

This .bat file should cope with any stream which is a HLS stream (but won't work with any type of DASH stream). HLS streams often have the term 'hls' included somewhere in the url (but not always).

Note that a HLS stream is an mpeg stream. This .bat file should only be used to download a stream in the .mp3 or .mp2 or .mpeg or .ts format. It might throw a wobbly if you use it to download in .mp4 or .m4a or .aac format.




This is the URL address of the xml page for a radio programme available on the 'Listen Again' service (replace the 8 zero's with the 8-digit vpid):

http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/mobile-phone-main/transferformat/hls/vpid/00000000


The xml page displays 6 links (all .m3u8 playlist links) (and all of them HLS links), ALL six of which will download the target "Listen Again" radio show (using ffmpeg.exe and the file download.bat, above).

Note: In each url, replace all occurances of the character & with ^& to make the url work in a .bat file.

ALL six give a 384 kbps stream when an .mp2 stream is requested, even though the page says they are only 128 kbps or 320 kbps links. ALL give an .mp2 stream when that stream is requested, even though the page says they are only mp4/aac links. Presumably both effects are a consequence of these being *playlist* links (i.e. behind the scenes - hidden from us - they give branching access to a wide range of differing streams, branches which ffmpeg can follow without additional input from you!).

(That level of sophistication is something you only get with ffmpeg.exe - a well established leader in its field, with ten years plus of substantial development effort behind it. Don't expect to duplicate these results with any other program.)


The six links differ only in that 4 of them give a faultless download, while 2 show errors (and of those 2, each throws different errors) -

  Faultless:  (http)    akamai_hls_open
                 (https)   akamai_hls_open_https
                 (https)   af_akamai_uk_hls_https
                 (https)   af_limelight_uk_hls_https
 
  Errors:    (http)     af_akamai_uk_hls
                (http)     af_limelight_uk_hls


So the secure connections (_https), and the open connections (_open), fare best. The faults occur on UK connections (_uk) that are NOT secure (don't use https, i.e. no _https), which is perhaps a consequence/indication of heavier traffic on those links.

Easily the worst performance is Limelight's UK connection over http (af_limelight_uk_hls) - which lost so much data, on some occasions, that the radio show was actually incomplete.

In my tests, the very best performance (perfect download) was given ONLY by the two _open links:  akamai_hls_open and akamai_hls_open_https.

I expect the two _open links to work internationally, i.e. for listeners outside the UK. (All six links work for listeners within the UK, or who connect to iPlayer through a proxy node that's within the UK.)






This is the URL address of an alternative xml page (replace the 8 zero's with the 8-digit vpid):

http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/apple-ipad-hls/vpid/00000000

This xml page displays 3 links (all .m3u8 playlist links) (and all of them HLS links), ALL three of which will download the target "Listen Again" radio show (using ffmpeg.exe and the file download.bat, above).

Note: In each url, replace all occurances of the character & with ^& to make the url work in a .bat file.






8
Geek Speak / Download 384 kbps LIVE stream
« on: June 30, 2017, 03:41:58 PM »
It is trivial to download the LIVE stream for Radio 4 Extra, because the url never changes (and the Beeb make no attempt to obfuscate that url).

To download the 384 kbps live stream, run a .bat file (a plain text file with the extension .bat instead of .txt) containing these two lines -

Code: [Select]
  set ffmpeg=C:\Program Files\FFMPEG\ffmpeg.exe

  "%ffmpeg%" -v 16 -stats -i "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4extra_mf_p" R4Extra.mp2


To get the ffmpeg.exe program, see this link: http://ffmpeg.zeranoe.com/builds/

The program does not need installing. Just put the .exe file in the directory you specified in the .bat file.

If you prefer a lower bitrate, a 128 kbps stream is available instead: in the .bat file change .mp2 to .m4a so that ffmpeg gets the m4a stream instead (it's actually a variable bitrate, centered on 135 kbps).

If you prefer the mp3 stream, change .mp2 to .mp3 so that ffmpeg gets the mp3 stream instead (which is a fixed bitrate of 128 kbps).


These are the two live stream urls for Radio 4 Extra (either of which can be used in the .bat file):

  http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4extra_mf_p

  http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4extra_mf_q



9
I have become increasingly annoyed by the number of times this month I've opened a listen-again page on BBC iPlayer, only to find that the programme has either its start or end missing.

As you know, programmes are added by an automatic system, based on the scheduled broadcast time. If the broadcast actually starts early on Radio 4 Extra, the start will be missing on iplayer; or if it ends late, the end will be missing on iplayer.

I'd like to urge everyone to complain whenever this happens. Only complaints will get this problem remedied.

I'd suggest you base any complaint on a request for a return to the former system, of putting up on iPlayer a 36 minute extract - including the end of the previous show, and the start of the next. Under that arrangement, the iplayer NEVER used to miss off part of the show.

I recently found a new BBC page for reporting technical errors with iplayer -

  https://ssl.bbc.co.uk/faqs/forms/?eid=comment_appreciation&mid=contact

10
Paul Temple and the Margo Mystery with Peter Coke and Marjorie Westbury will begin its latest repeat on Monday 24th April next, at the usual times.

http://www.bbc.co.uk/programmes/b007t1kg

11
Radio Programmes - Info \'n\' Reviews / The Frankie Howerd Show
« on: March 28, 2017, 10:09:34 PM »
Frankie Howerd: BBC Radio Collection

Radio 7 used to air, more or less at random, various episodes of The Frankie Howerd Show (Radio 2, 1973-75), that had been released on cassette in the 1990s as two double-cassette box sets, i.e. 8 episodes in all.

A little research in the BBC Genome revealled that these are the episodes as they appeared in the two box sets (oddly, the BBC sleeve notes were in error: according to the BBC Genome the following are actually the episodes included) -

Frankie Howerd Show - Side 1 - 1966-08-07 - [The Post Office Queue]
Frankie Howerd Show - Side 2 - 1973-06-17 - Illustrious Memoirs [At the Races]
Frankie Howerd Show - Side 3 - 1974-11-17 - Illustrious Memoirs [Flight to Morocco]
Frankie Howerd Show - Side 4 - 1975-11-02 - [Cyril the Squirrel]

Frankie Howerd Show 2 - Side 1 - 1973-06-10 - Illustrious Memoirs [Chapter 1]
Frankie Howerd Show 2 - Side 2 - 1973-07-01 - Illustrious Memoirs [Trip to Russia]
Frankie Howerd Show 2 - Side 3 - 1974-10-27 - Illustrious Memoirs [In the Police]
Frankie Howerd Show 2 - Side 4 - 1974-12-08 - Illustrious Memoirs [In Court]

Some of these episodes can currently be listened again to (.flv or .mp3) at -
https://www.mediafire.com/?c16rt8ron12jj

12
I was disappointed that Barry Cryer's Christmas Selection Box - once again! - was not aired at Christmas on Radio 4 Extra. It originally aired on BBC Radio 7 in 2009.

Anyone interested in hearing Barry Cryer's Christmas Selection Box, Part 1 can listen to it here -
https://www.mediafire.com/?9le47f4nbd83x87

Anyone interested in hearing Barry Cryer's Christmas Selection Box, Part 2 can listen to it here -
https://www.mediafire.com/?hgp54zb3jnk7d54


Part 2 includes the 1976 Christmas Special from Hello Cheeky, a pantomime written by Barry Cryer and John Junkin called Cheeky Whittington and His Magic Ballpoint (1976-12-25).

Part 2: Six more festive favourites from the jovial host -

  After Henry
  Christmas Eve with The Shuttleworths
  People Like Us
  Dead Ringers
  Hello Cheeky (Cheeky Whittington and His Magic Ballpoint)
  Hancock's Half Hour


More Christmas favourites from Radio 7 are here (as .flv rather than .mp3):

  https://www.mediafire.com/?t53v5ywqnff7b

Includes -

And Yet Another Partridge in a Pear Tree - Sat 1440 2011-12-24
Barry Cryer's Christmas Selection Box - Part 1 - Sat 0900 2011-12-17
Barry Cryer's Christmas Selection Box - Part 2 - Sat 0900 2011-12-24
David Jason's Comedy Christmas - Radio 2 - Sun 1800 2011-12-25
Hamish and Dougal - Hogmanay Special - Sat 1430 2011-12-31
Hancock's Half Hour - 1956-12-30 - The Diary - Wed 0800 2011-12-28
Hancock's Half Hour - 1958-12-25 - Bill and Father Christmas - Wed 1900 2011-12-21
ISIRTA - 1970-12-31 - Christmas Pantomime - Sat 1400 2011-12-31
Just A Minute - s05e16 1970-12-22 - Stuffing Your Christmas Bird 2011-12-26
Old Harry's Game - 2010-12-23 - Christmas Spirit - Fri 2230 2011-12-23
Old Harry's Game - 2010-12-30 - Ring in the New - Fri 2230 2011-12-30
Steptoe and Son - 1976-12-25 - Away for Christmas - Sat 1400 2011-12-24
Take It From Here - 1954-12-23 - Sun 0800 2011-12-25
The Scarifyers - Special - Mr Crowley's Christmas - Sun 1830 2011-12-25
The Scarifyers - Special - The Curse of the Cult of Thoth - Mon 0050 2011-12-26
The Scarifyers - Special - The Yule Lads - Sun 1835 2011-12-25


13
Geek Speak / Download High Bitrate TS files (320 kbps Live Stream)
« on: July 30, 2016, 02:55:36 PM »
How to download a BBC radio programme in HIGH RESOLUTION (320 kbps) from BBC Radio 4 Extra, in Windows 7.

You can download the latest 11 hours of programmes, hence this procedure will work for any programme for up to 11 hours after it is broadcast.


Utils for downloading 320kbps files, and instructions:

Download link for file AAC_320_kbps_HLS_streams.zip


 �  First, put the file WGET.EXE on the Desktop.

 �  Then create a sub-directory (a new folder) on the Desktop,
    and put the five .BAT batch files in it (NOT wget.exe)


 � STAGE 1 : DOWNLOAD THE .TS FILES

   Run the .bat batch files in the following order:-

     1. Run batch file 1. This will download a .m3u8
        playlist file, containing text.


     2. Open the playlist file downloaded above, using
        Notepad. It will contain a list of filenames
        in the following format:

         bbc_radio_four_extra-audio=320000-229208808.ts

        There will be hundreds of these entries in the
        playlist file. They represent all the available
        .ts files, for the last three hours: each such
        file contains 6 seconds of audio. The first
        entry in the playlist file is the oldest.


     3. This part of the filename is irrelevent:

         bbc_radio_four_extra-audio=320000-

        You take the 9 digit number at the END of the
        filename, and you type it into batch file 2.

        Choose your own starting point: Pick any point in
        the 3 hours immediately before you downloaded the
        .m3u8 playlist file. Or do it the easy way: download
        the whole 3 hours, by taking the 9 digit number from
        the first entry in the playlist file.

        But you can go back 11 hours by editing the 9 digit
        number to choose your own starting point.

        Run batch file 2, to download the .TS files containing
        the audio (MPEG-2 TS Video files, 6 seconds long, and
        containing audio only; each typically 262 KB in size).


 � STAGE 2 : JOIN THE .TS FILES INTO A SINGLE FILE

   Run the .bat batch files in the following order:-

     4. Make SURE the sub-directory containg all the downloaded
        .TS files has its header line set to show these columns:

           Name
           Type
           Size
           Length
           Date
           Date Created
           Date Modified

        The critical values are DATE and LENGTH which show
        the air date and time of each audio file, and its
        length in seconds.

        You can play these files using MEDIA PLAYER CLASSIC,
        or VLC Media Player, or GOM Player. This is the key
        to locating the start and end of the radio show you
        want.


     5. Delete any .ts files that are not part of the radio
        show you want.

        Perhaps, at first, delete them to the Recycle bin
        in case you make a mistake.


     6. Run batch file 3, then batch file 4, to rename the
        .ts files you have chosen to keep.


     7. Type the 9 digit number from the .m3u8 file into
        batch file 5, to modify the following line:

          SET number=000000000

        (Replace the 9 zero\'s with the 9 digit number)


     8. Run batch file 5, in the sub-directory.

        This will create a new batch file, batch file 6, containing the
        list of files to be merged.


     9. Run batch file 6, in the sub-directory.

        All files in that directory with a higher number
        than the 9 digit number you took from the .m3u8
        playlist are merged into a single file.


    10. Delete all the remaining 6-second long files,
        and just keep the output file (which will be
        obvious from its file size).

        You can play the file using MEDIA PLAYER CLASSIC,
        or VLC Media Player, or GOM Player, or Windows
        Media Player. This is an audio-only file, even
        though .ts is a video format.

14
I noticed this week that the recent change in the live stream for Radio 4 Extra, to an mp3 stream, has made downloading the live stream really easy.

To start saving it, just copy-and-paste one of the following url addresses into the url address bar in Internet Explorer, then click on the 'go' button next to that bar -

  http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4extra_mf_p

  http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4extra_mf_q

Then copy the downloading file from your internet cache folder to any permanent folder, e.g. the desktop (do this BEFORE you stop the download). The cache folder for Internet Explorer, on Windows 7, is normally a hidden sub-directory of the following folder -

  C:\Users\%username%\AppData\Local\Temporary Internet Files\Content.IE5\

The live stream is 128 kbps, 44.1 kHz, stereo - in mp3 format.


ADDENDUM:

This still works, as of today, but the connection is pretty unstable. I've never managed to keep it running more than about 15 minutes.

You can use the same url, either of them, to download more stably with, say, MPLAYER.EXE (I experimented with using WGET.EXE but that was not as stable as MPLAYER with these live streams).

Command line in a batch file, using MPLAYER, in Windows 7 -

SET url=http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4extra_mf_p

mplayer.exe %url% -dumpstream -dumpfile "%~dp0_R4Extra.mp3"


15
My sources tell me that the BBC Trust has now received the detail of proposals from the BBC Executive to close BBC Three as a broadcast channel and re-invent it as an online only proposition. Alongside this, the Executive also propose launching a BBC One+1 channel, extending the hours for CBBC, and enhancing BBC iPlayer.

What the changes to the iPlayer will be are not yet clear.

Pages: [1] 2 3