Recent Posts

Pages: 1 ... 8 9 [10]
91
Geek Speak / Download TV or Radio using only the 8-digit PID
« Last Post by Ed on January 02, 2018, 07:12:02 AM »
Here is a method for downloading from iPlayer using only the url address of the iPlayer page. This method works for Radio shows and for TV shows.

This means that -

  • You can download without having to log-in to a BBC account
  • You can download without having to install Adobe's flash player
  • You can download without having to find the broadcast's hidden vpid number



One preliminary step, first. Download the YouTube-dl program (originally developed for downloading from YouTube, but its latest version can download from many websites which use DASH streams including the BBC's iPlayer site) -

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

The program does NOT require installing. Just put it in any convenient folder/directory.



And a second preliminary step. Download the ffmpeg program -

  http://ffmpeg.zeranoe.com/builds/

Put it in the same folder/directory with the YouTube-dl program. That is now your working directory.



For a Radio show, use the following command line (actually two lines in this case!) -

Code: [Select]
    SET url=https://www.bbc.co.uk/programmes/00000000

    YouTube-dl.exe  -f "bestaudio[protocol*=dash]"  --add-metadata  "%url%"


1. Copy-and-paste the command (above) into a batch file (in Windows, a batch file is a plain text file with the extension .bat or .cmd instead of .txt), and put the batch file in the same folder as YouTube-dl.exe and ffmpeg.exe

2. Substitute the actual URL address of the iplayer page which plays the radio show for the one shown in my example. In effect you are just replacing the final 8 zero's in my example with the actual 8-digit PID (Programme ID).

3. Then run the batch file by double-clicking it.

The file which downloads should already have the extension .mp4 or .m4a (but if by chance it has not, you simply add either of those extensions). M4A is the iTunes extension.



For a TV show, use the following command line (actually two lines!) -

Code: [Select]
    SET url=https://www.bbc.co.uk/iplayer/episode/00000000

    YouTube-dl.exe  "%url%"  -f best  --add-metadata


1. Copy-and-paste the command (above) into a batch file (in Windows, a batch file is a plain text file with the extension .bat or .cmd instead of .txt), and put the batch file in the same folder as YouTube-dl.exe and ffmpeg.exe

2. Substitute the actual URL address of the iplayer page which plays the TV show for the one shown in my example. In effect you are just replacing the final 8 zero's in my example with the actual 8-digit PID (Programme ID).

3. Then run the batch file by double-clicking it.

The file which downloads should already have the extension .mp4 (but if by chance it has not, you simply add that extension).

Note that the command does not mention ffmpeg. This is NOT a mistake. The YouTube-dl program calls ffmpeg when it requires to use certain functions of ffmpeg, and calls it automatically so that you don't need to. Just bear in mind that things will go wrong if ffmpeg is not in the same folder as YouTube-dl.

Note that a tv show uses a different url address to that for a radio show, so be sure to use 2 separate batch files, as there is no benefit in trying to use only one. The 2nd line is also different in the case of a tv show.



That's all there is to it. But there are some additional options for a tv show, if you want to be in better control of the file you end up with.

Unlike radio (which usually has only 2 streams, a 128 kbps one and a 320 kbps one), TV has a large number of available streams. You can use the above command to get the default stream.

But if the default stream gets you a file that won't play (many of the available streams use the new avc3 codec, which only Windows 10 can play, so if you use Windows 7 you will instead prefer to have a file containing a stream which has the avc1 codec), then you need to get a list of the available streams ("formats").

Put the following command in a batch file (name it, say, TV_streams.bat) and run it (substitute the TV show's actual url for the one in my example, just as you did above) -

Code: [Select]
    SET url=https://www.bbc.co.uk/iplayer/episode/00000000

    YouTube-dl.exe "%url%" --list-formats > Formats.txt

Wait, then open the text file Formats.txt using Notepad (it will take perhaps a minute to download all the data into it). Then pick a stream: they will be listed by video size, e.g. 640x360, and by codec, e.g. avc1.

The following is a substitute batch file to download the TV stream you choose. This is a simple example (there are many other possibilities); but this is designed to avoid complicating matters -


Code: [Select]
    SET url=https://www.bbc.co.uk/iplayer/episode/00000000

    SET format=stream-uk-iptv_streaming_concrete_combined_sd_mf_akamai_uk_hls_https-1836

    YouTube-dl.exe  "%url%"  -f %format%  --add-metadata


Ideally, you will choose a stream which (as in this example) is a "combined" stream - as stated in the name of the stream. A combined stream is one which contains both audio and video.

I recommend the 1836 stream (shown in this example) because it contains AVC video (a.k.a. avc1 video), UK-style 25 fps (frames per second), an image size of 960x540 pixels, and good quality audio at 128 kbps.

Do NOT choose any video stream containing the avc3 codec, unless you have satisfied yourself that your computer can play that! If you are running Windows XP, Windows Vista, or Windows 7 it's a good bet you can't play a file containing the avc3 codec stream.


1. Copy-and-paste the command into a batch file (in Windows, a batch file is a plain text file with the extension .bat or .cmd instead of .txt), name the file (for example) TV_1836stream.BAT, and put the batch file in the same folder as YouTube-dl.exe and ffmpeg.exe

2. Substitute the actual URL address of the iplayer page which plays the TV show for the one shown in my example. In effect you're just replacing the final 8 zero's in my example with the actual 8-digit PID (Programme ID).

3. Substitute the actual name of your chosen stream, if you are not opting for my choice of the 1836 stream. (If you choose separate audio and video files, instead of a combined file, you'll need to make the necessary changes to line 3 of the batch file - so you'll need to do a Google search on the term ffmpeg to find an appropriate command.)

4. Then run the batch file by double-clicking it.













92
The Pub - Open All Hours / Re: IT'S CHRISTMAS!!
« Last Post by Ironeyes on January 02, 2018, 02:13:38 AM »
Uh oh, I seem to be out of favour again with Truthy.

Never mind, I'll just wish EVERYBODY, a Happy New Year.
93
Radio Matters / Re: Four Seasons - Read by Anton Lesser
« Last Post by Truthyness on January 01, 2018, 02:16:34 PM »
I'll see if I can find a link.
94
The Pub - Open All Hours / Re: IT'S CHRISTMAS!!
« Last Post by Truthyness on January 01, 2018, 02:15:40 PM »
Heya Good Folk of the Beebotron,
Rick, Ivor, Jan, Lady P, TallFor and of course K if he still lurks every now and again.
HAPPY NEW YEAR!

Looking forward to discovering our new member Gran Jan :-)

May 2018 bring you all health, peace, happiness.

Tru.
95
The Pub - Open All Hours / Re: IT'S CHRISTMAS!!
« Last Post by Lady Penelope on December 31, 2017, 03:31:55 PM »
Too late for Christmas, but just popped in to wish everyone all the best for the New Year.

Congratulations Granny Janny!  Btw did you get my email.

96
The Radio 4 Extra listing for the seven days beginning 30/12/17 has been posted at the following permanent link:

http://www.radio-lists.org.uk/4x

This contains the online listing and the pdf: hover the mouse over the 'pdf' button and right-click and 'save as' to download, or left-click to display and then possibly print through the pdf viewer.

The rtf version is no longer produced, but there is a printer-friendly html version under the 'print-frendly' button; download and viewing is as per the procedure above for the pdf.

An archive is being built up - see the 'archive' button. Archive versions are also available under the 'print-friendly' button.

Note that the online version now lands on the current programme; to read next week's list early, use the 'Archive' drop-down list.
97
Help / Re: HLS Links not updating
« Last Post by Janaru on December 29, 2017, 03:01:45 AM »
Good news! Rick is awesome. :D
98
Help / Re: HLS Links not updating
« Last Post by gingerbee on December 28, 2017, 05:27:22 PM »
Yes thanks - a day or so later everything was back to normal and I haven't noticed any similar problem since then.

99
Radio Matters / Re: Four Seasons - Read by Anton Lesser
« Last Post by Janaru on December 28, 2017, 09:29:15 AM »
I blinked. :/
100
Help / Re: HLS Links not updating
« Last Post by Janaru on December 28, 2017, 09:28:39 AM »
I hadn't noticed the glitch. Did it get straightened out?
Pages: 1 ... 8 9 [10]