This should be easy to follow on *nix systems (linux/osx); on Windows, we would need a separate set of instructions though these should not be far away from what is documented below.
Requirements:1) pmsencoder plugin
2) channel plugin
Instructions:1) download and unpack
get_iplayer from
http://www.infradead.org/get_iplayer/ht ... layer.html (preferably into PS3MS Java folder - OSX)
2) download flvstreamer from
http://download.savannah.gnu.org/releases/flvstreamer/; save it so its name is
flvstreamer into above get_iplayer folder; if you are on *nix system you might want to chmod +x ./flvstreamer
3) within get_iplayer folder create a file called
update with the following content
- Code: Select all
#!/bin/sh
# working directory is Java folder
./get_iplayer/get_iplayer --xml-alpha --mythtv /tmp/list
exit 0
4) make the file executable (chmod +x ./update)
5) place the following
channel_bbciplayer.groovy script in pmsencoder folder (on OSX it is PS3 Media Server.app/Contents/Resources/Java/scripts)
- Code: Select all
script {
profile ('BBC iPlayer') {
pattern {
//this URL must match the URL from bbciplayer.ch (channel) script
match $URI: '^http://channel/bbc/(?<pid>........)'
}
action {
//working folder is Java folder
def GETIPLAYER_PATH = "./get_iplayer"
def SHELL = "/bin/sh"
def PERL = "/usr/bin/perl"
//def mode = "flashhd"
def mode = "flashhigh,flashstd,flashvhigh"
$DOWNLOADER = [ "${SHELL}", "-c", "${PERL} ${GETIPLAYER_PATH}/get_iplayer --pid ${pid} --mode=${mode} --flvstreamer ${GETIPLAYER_PATH}/flvstreamer --overwrite --stream >> ${DOWNLOADER_OUT}"]
}
}
}
6) place the following
bbciplayer.ch script in channels folder (on OSX it is PS3 Media Server.app/Contents/Resources/Java/channels)
- Code: Select all
version=0.1
channel BBC iPlayer {
folder {
name=A-Z
type=ATZ
#the url below has to be absolute; relative physical (file) url are known not to work with URLConnection class which is used in channels
url=file:///tmp/list
folder {
#the url below must match the url in channel_bbciplayer.groovy file and must be valid as per RFC 1738 (though pmsencoder allows for RFC 2396)
url=http://channel/bbc/
matcher=<Name>([^<]+)</Name>\s*<index>[^<]*</index>\s*<type>[^<]*</type>\s*<Url>(........).mov</Url>\s*<StreamImage>([^<]+)</StreamImage>\s*<Subtitle>[^<]*</Subtitle>\s*<Synopsis>[^<]*</Synopsis>
order=name,url,thumb
type=normal
media {
escript=dummy
prop=script.no_format
format=video
}
}
}
folder {
name=UPDATE
type=normal
#the working path is set to Java folder
pre_script=./get_iplayer/update
# this below does not work, somehow channels ignores it if the script has any arguments
# pre_script=./channels/bbciplayer/get_iplayer/get_iplayer --xml-alpha --mythtv /tmp/list
}
}
7) Switch on PS3MS and a renderer, navigate to Channels/BBC iPlayer folder and you should see A-Z folder and UPDATE folder; first enter UPDATE folder; this should invoke update script and create /tmp/list file with list of channels
8) if this above is a case you can navigate back to A-Z folder, select a channel and enjoy!
Consideration:/tmp/list path - bear in mind privileges
get_iplayer location and relation to Java folder
Need to change quality? - Edit bbciplayer.groovy script and search/replace 'flashstd' into one of the following: flashhd,flashvhigh,flashhigh,flashstd,flashnormal,flashlow
Troubleshooting:1) from shell level execute file and verify that /tmp/list is created and contains channel information
2) run get_iplayer from your command line/shell and verify that you are able to download an FLV movie
When debugging please post:
channels.log and pmsencoder.log