Posts tagged: Linux

Nov 14 2009

New flvstreamer released

A new major version of flvstreamer has been released. After some testing it would seem that it fixes quite a number of problems that get_iplayer users have been experiencing for the past few weeks since Akamai (one of the BBC’s content delivery network providers) started upgrading all their Flash Media Servers to v3.5.x. BBC Live TV now works better and many other bugs are reported to have been fixed. It also now auto-retries failed streams and fixes the bug where recording 1+ hour BBC radio flash streams always had to be resumed.

If you are using the Windows Installer for get_iplayer then just download it again and re-run it to get the new flvstreamer and ensure you choose the cygwin based flvstreamer.

Sep 12 2009

New Features in get_iplayer and Web PVR Manager

Plenty of new features in get_iplayer and Web PVR Manager. It’s been a while; 18 versions of Web PVR Manager and 29 versions of get_iplayer have been released since I last wrote about them.


I recommend running get_iplayer –long-help to see full help on these new options.

  • Recording History search/indexing support (–history)
  • Ability to list programme Series names for improved readability (–series)
  • Multiple thumbnail sizes support (–thumbsize, –thumbsizemeta)
  • Improved meta-data display (–info)
  • Audio Description support for BBC iPlayer (–versions=audiodescribed)
  • Multi-mode support – i.e. ability to record more than one mode of the same programme (–multimode)
  • Better support for recording BBC iPlayer embedded media URLs (–url)
  • Support of BBC iPlayer short URLs (–url)
  • Ability to specify how long to record a live stream (–stop)
  • Ability to specify stop and start time offsets in BBC iPlayer TV and Radio programmes (–stop, –start)
  • Support for ‘presets’ – predefined sets of options (–preset)

Web PVR Manager:

  • One-click Series recording, playback and PVR queuing of available and recorded programmes
  • Ability to search and play back the Recordings
  • Improved programme info display with thumbnails and clickable URLs
  • Full support for running under Apache as well as the built-in web server (see the README file)
  • Improved navigation
  • Support for streaming under Windows
  • Software Update button
  • Help page and tool-tip improvements
  • Great new logo
Jul 22 2009

Stream High Quality AAC BBC iPlayer Radio and Live Radio to your Squeezebox

Update: See Part II of this post – all this has been improved and simplified…

I’ve been playing with get_iplayer PVR Manager (get_iplayer.cgi) on Linux (although it works on MacOSX and Windows also). It can now also act as an RTMP proxy to allow simple streaming of any flashaac radio or liveradio BBC iPlayer programme to a Slim Devices / Logitech Squeezebox (SBII or better). WARNING: This is still alpha quality experimental code….

All you need to do is:
Install and start the get_iplayer PVR Manager:

  • download get_iplayer.cgi from SVN (see the get_iplayer PVR Manager page)
  • Ensure you have flvstreamer installed and it’s location saved in your options
  • Ensure ffmpeg is installed and in the system PATH
  • Start it on your Linux server:

    perl get_iplayer.cgi –port=1935 –getiplayer=/path/to/get_iplayer –ffmpeg=/path/to/ffmpeg

Now configure the Squeezebox:

  • Go to the Squeezecenter page for your Squeezebox
  • Add a Favourite with the streaming URL. e.g. http://[server_ip_address]:1935/?ACTION=stream&PROGTYPES=liveradio&PID=bbc_radio_one&MODES=flashaac&OUTTYPE=a.wav
  • Go to your Squeezebox remote control or web page and play the favourite you have added.
  • Sit back and listen to much higher quality Radio at up to 192kbps AAC on your Hi-Fi

Similarly you can stream all sorts of programmes and modes on other http based media players. e.g.:

* Stream flash AAC liveradio as 320k mp3 stream:

vlc "http://localhost:1935/?ACTION=stream&PROGTYPES=liveradio&PID=[PID]&BITRATE=320&MODES=flashaac\

* Stream flash livetv as an flv stream:

vlc "http://localhost:1935/?ACTION=stream&PROGTYPES=livetv&PID=[PID]&MODES=flashnormal\

* Stream flash AAC liveradio as a raw wav stream:

vlc "http://localhost:1935/?ACTION=stream&PROGTYPES=liveradio&PID=[PID]&MODES=flashaac\

* Stream tv as a quicktime stream:

mplayer "http://localhost:1935/?ACTION=stream&PROGTYPES=tv&PID=[PID]&MODES=iphone\
  &" -cache 2048

* Stream iphone radio as http mp3 stream:

vlc "http://localhost:1935/?ACTION=stream&PROGTYPES=radio&PID=[PID]&MODES=iphone\

* Stream flash mp3 radio as http flac stream:

vlc "http://localhost:1935/?ACTION=stream&PROGTYPES=radio&PID=[PID]&MODES=flashaudio\

***PLEASE REWRITE THE DOUBLE QUOTES – this blog mangles them***

The valid [PID]s for any programme type can be determined by running:

get_iplayer –info [usual search terms]

Update (July 30th 2009): I changed SEARCH= to PID= in the latest version…Also updated to use new cmdline options. Also now works in Windows with the latest Automated Installer.
Update (September 18th 2009): I changed streaming URLs for the latest version.

Jun 25 2009

Simplified Live BBC TV and Radio Support in get_iplayer

get_iplayer v2.04 now has very much simplified Live TV and Radio support.

Two new programme types have been added: ‘livetv’ and ‘liveradio’. These types, if selected, will list the available programmes in the familiar listing format:

get_iplayer --type=livetv
80000:  BBC Four - live
80001:  BBC News 24 - live
80002:  BBC One - live
80003:  BBC Parliament - live
80004:  BBC Three - live
80005:  BBC Two - live
80006:  CBBC - live
80007:  CBeebies - live

INFO: 8 Matching Programmes

Or you can just search, stream or playback by channel/programme name:

get_iplayer --type=liveradio 'Radio 1'
80132:  BBC Radio 1 - live

INFO: 1 Matching Programmes

To directly stream a selected live programme in all OSes (except Win32) you can use:

get_iplayer --stream 80001 --player='mplayer -cache 256 -'

Where –player can refer to any player command than can play programmes from STDIN. Or simply use:

get_iplayer --stream 80001 | mplayer -cache 256 -

The advantage of the –player option is that it can be saved in your default options as follows:

get_iplayer --prefs-add --player='mplayer -cache 256 -'

Then you can just stream via mplayer using:

get_iplayer --stream 80001

( –stream is just a synonym for –stdout –nowrite )

To record a live stream use:

get_iplayer --get 80001

Specifying modes has changed a little. –amode has become –radiomode and –vmode is now –tvmode. Additionally, –modes=<modelist> can be used to set a general default set of modes for all programme types.

Likewise, embedded media web pages can be played more easily. e.g.:

get_iplayer --stream --type=radio

Or recorded using:

get_iplayer --get --type=radio

The only major thing I’ve not been able to get working is direct streamed playback under native Windows. If anyone knows why it won’t work or has a fix or workaround please let me know! I’ve tried with ‘vlc -‘, ‘ffplay -‘ and ‘mplayer -‘ and all seem to just fail.

Apr 29 2009

get_iplayer now Searches and Records All Standard UK TV Channels

Update 6th May 2009: You might want to read this first…

A milestone has been reached today with the addition of Channel 5’s Demand Five service to the list of DRM-free services that get_iplayer can index, search and record. The following are now supported:

Supported platforms are: Linux, MacOSX, Windows and pretty much any modern OS that can run perl. See the download and installation pages.

To download and search programmes use:

get_iplayer –type=TYPE <other options>

Where TYPE is either ‘tv’ (BBC TV), ‘itv’, ‘ch4’, ‘five’, ‘radio’ (BBC Radio), or ‘podcast’ (BBC).

For full instructions see the documentation page

Now I’m off for a beer….

Dec 15 2008

Don’t Want to Miss that Programme on iPlayer over Christmas?

You know how it gets over the Christmas period; busy visiting relatives and friends, drinking and partying. The last thing you remember to do is to watch that crucial episode on iPlayer within the minute window of seven days the BBC has kindly granted you.
Now is the time to set up get_iplayer to act as a PVR (you know Sky+, TiVo, series-link, etc, etc)! get_iplayer can be easily configured to automatically download your favourite BBC TV programmes just like any other PVR except that there are no limits on how many programmes you can ‘record’ simultaneously (OK, except your broadband speed maybe). You even get seven days grace when you’ve forgotten to setup the PVR.

Here is a quick guide to setting it up. Read more »

Oct 07 2008

get_iplayer RPM and DEB packages now available

You can now install and update get_iplayer using DEB and RPM packages for Linux. I’ve tried to keep them as generic as possible so the RPMs will most likely work just fine on all Redhat/Fedora derived Linux distributions. Same goes for the DEB packages on all Debian derived distros such as Ubuntu.
Please let me know if there are any problems with these.
Note that the –upgrade option of get_iplayer is probably not the best idea if you choose to use RPM and DEB versions.

Sep 24 2008

get_iplayer now downloads BBC iPlayer Radio in glorious 128k MP3 format + other features

It was discovered this evening that the iPhone can get BBC iPlayer radio programmes in higher quality MP3 format. It basically uses the same method used for the iPhone video downloads. get_iplayer v0.74 now supports this fully and can also fallback to RealAudio format for those shows that still have not been made available to the iPhone. The MP3s are 128kbps stereo 44.1kHz – better than the rather sad 64kbps realaudio streams we had before. Shame there are no ID3 tags yet – come on BBC 🙂
For reverting to downloading the realaudio streams in get_iplayer you must use the –amode=realaudio option.

Other New features in get_iplayer lately are:

  • A download history is now maintained which prevents the accidental re-downloading of programmes that you may have deleted
  • Ability to see which programmes have become available since the last cache refresh
  • The –since option which allows you to see programmes added to the cache since a number of hours ago
  • The –list [channel|categories] option which displays a unique list of categories and channels for the specified type of programme

Try using the get_iplayer –help option to see all new options.

Update v0.75:

  • get_iplayer will now automatically try to download the MP3 radio stream and then fallback on RealAudio streams.
  • In radio mode –amode=realaudio option will prevent mp3 streams being downloaded
  • In radio mode –amode=mp3 will ensure that no RealAudio is downloaded – i.e. it disables the default fallback to realaudio
  • –force-download will make get_iplayer ignore the download history

Another update: Classical music appears to be encoded at 192kbps and speech at 80kbps.

Sep 09 2008

Nokia N95/N96 BBC iPlayer Downloads working on Linux with vlc

It would appear that the BBC have already made a stream available which looks like the one going to be used in the upcoming N96 iplayer download service. I may have jumped the BBC’s gun here slightly; I used get_iplayer to extract the media stream data for a programme and fed this to vlc (a media player) in Linux and it plays 🙂 You can even save the stream.
So far there is no need for any white-listed cookies or any User-agent spoofing.
The resolution is not as good as that of the iPhone iplayer version 320×176 compared with the iPhone’s 483×272 but at least its easier to download this one! It will certainly do for mobiles as intended.
I have put full instructions on the Beebhack wiki
I’ve released a new version of get_iplayer which makes this stream information more easily accessible. For example, you can use the following command to get the RTSP url (together with the RTMP flash urls):

get_iplayer –streaminfo 123

Then playback using:

vlc [rtsp URL]

Or save the stream using:

vlc –sout file/ts:stream.mpg [rtsp URL]

Update: I’ve had reports that the stream also works on Realplayer on at least the Nokia N95
Another update: get_iplayer can now download the N96 with the –n96 option
Update: I changes the –n96 option to –n95 (cos that is what the BBC seem to be labelling it as)

Jul 23 2008

Nasty Server Crash

Darn, my server crashed quite badly today (web, email, dns, imap – the lot). It ran Fedora6 with Centos5 on Xen. Looks like it was some hardware problem due to possible overheating 🙁 Maybe it was that additional graphics card I added a few days ago… It caused a whole lot of filesystem corruption and the server was randomly segfaulting and kernel panicking. Anyway, the good news is that the Xen virtual machine which runs the website was very easy to migrate and recover to another server 🙂 All back up within 4 hours. Now for a newer Linux distro I think and some serious hardware testing I reckon.

WordPress Themes