Posts tagged: mplayer

Jul 23 2009

VLC Media Player BBC iPlayer Integration using get_iplayer PVR Manager

With the latest experimental release of get_iplayer PVR Manager you can now use to browse and play almost any BBC iPlayer programme directly from VLC‘s playlist. This functionality of get_iplayer PVR Manager should work on Linux/Unix, MacOSX and Windows.

Just download and run get_iplayer PVR manager as described in yesterdays post

Next, using VLC to open a URL such as:

http://127.0.0.1:1935/playlist?PROGTYPES=liveradio

You will get an automatically generated playlist for the programme type you selected.

Valid programme types are:

  • tv
  • radio
  • livetv
  • liveradio

Open the playlist in the vlc GUI and you will see all of the available programmes.

Just click on one and it will start playing after a few seconds.

There are many more examples and detailed usage in the comments at the top of the get_iplayer.cgi script if you are interested.

I haven’t tried opening the playlists in anything other than mplayer and vlc so far. When I get a chance I’ll try them out on the Squeezebox also.

Let me know if you get this working on any other players or if you find any other novel uses for it.

Update: Now works on windows except for realaudio channels. Ensure you use flvstreamer v1.8h or later.

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
Matches:
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'
Matches:
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
  --url="http://www.bbc.co.uk/robertburns/works/a_bards_epitaph/"

Or recorded using:

get_iplayer --get --type=radio
  --url="http://www.bbc.co.uk/robertburns/works/a_bards_epitaph/"

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.

Jun 09 2009

get_iplayer gets Live BBC iPlayer Stream Support

After many requests I have eventually given in and added Live stream support for BBC iPlayer TV and Radio. So now you don’t need to playback TV in a browser – you can use the video player of your choice. The Radio streams are of fantastic quality especially when not played back in adobe flash player – well done BBC! The Flash AAC radio quality is between 128-192 kbps and the TV is either 512×288 or 640×360 resolution at between 512-800 kbps.

Remember that you do need a TV License to legally record or watch any Live TV streams in the UK. The Live support does require flvstreamer v1.8 or later(rtmpdump v1.6 is not as reliable with these streams). The below examples assume that the tool is in your path already. If not then add it using ‘–flvstreamer=/path/to/flvstreamer’. As a side note, rtmpdump 1.5/1.5a, albeit somewhat unreliable, will work only if you want to record the live streams or listen to Live Radio – direct TV playback does not want to work on those older versions.

Live BBC iPlayer TV

To watch BBC iPlayer TV channels via mplayer, for example, use:

get_iplayer –pid tv:bbc_one –stdout –nowrite | mplayer -cache 512 –

Or

get_iplayer –pid tv:<iPlayer Channel URL> –stdout –nowrite | mplayer -cache 512 –

Or to record a Live programme:
Where <iPlayer Channel URL> is a URL like: http://www.bbc.co.uk/iplayer/radio/bbc_radio_one or http://www.bbc.co.uk/iplayer/playlive/bbc_radio_one/

get_iplayer –pid tv:bbc_one

The ‘vmode’ used by the BBC iPlayer TV Live streams in ‘flashnormal’ so you may need to add ‘–vmode=flashnormal’ if you don’t normally have that in your vmode list.

Live BBC iPlayer Radio

To listen to BBC iPlayer Radio channels via mplayer, for example, use:

get_iplayer –pid radio:bbc_radio_one –amode=flashaac –stdout –nowrite | mplayer -cache 128 –

Or

get_iplayer –pid radio:<iPlayer Channel URL> –amode=flashaac –stdout –nowrite | mplayer -cache 128 –

Or to record a Live programme:

get_iplayer –pid radio:bbc_one –amode=flashaac

Please not that the recording and streaming will not stop after the end of a programme – it is perpetual.

Other Media Players

The recorded live streams will playback on any media player that can decode flv streams. So far I’ve successfully managed to get them playing back on xine, vlc and mplayer on Linux. I’ve not tried the various players on Windows or MacOSX.
I tried to playback th live TV streams directly with those players and found that both mplayer and xine were successful. I had trouble getting vlc to work without stuttering because I couldn’t figure out how to set the buffer/cache size. For xine use: ‘| xine stdin:/’.
The direct audio playback seems to work on mplayer and vlc only although vlc does result in slightly glitchy playback compared with mplayer.
Let me know below if you manage to get other media players to work.

Converting flv Streams

Convert Audio losslessly:

ffmpeg -i infile.flv -vn -acodec copy -y outfile.m4a

Convert video flv to avi losslessly:

ffmpeg -i infile.flv -vcodec copy -acodec copy -y outfile.avi

Mar 11 2009

New and Improved Automated Windows Installer for get_iplayer

Today I managed to get access to a Windows XP desktop and thought I’d try out the latest get_iplayer Windows Automated Installer. I have to say I am really quite impressed. The Installer is maintained and put together by Simon Dible. I just downloaded it, ran it and it automatically downloaded and installed all of the get_iplayer support packages such as rtmpdump, mplayer, lame, ffmpeg and Strawberry Perl (an open source perl for Windows that is not broken like ActivePerl!).
This really takes all the pain out of using get_iplayer on Windows. I just had to fire up get_iplayer from the Start menu and I had a shell with get_iplayer primed and ready.
The even better part about the new installer is that it now supports get_iplayer updates from the menu, which is good news because the release frequency is higher than the average. The update only usually takes a second or two because you are no longer forced to re-download the whole installer again – only the perl script. I suppose it might be worth looking for installer updates now and then in case you want updated support packages.

WordPress Themes