Discussion:
Signed programmes not downloading
Rob Dixon
2012-02-23 08:53:56 UTC
Permalink
I have noticed recently that signed television programmes are breaking
get_iplayer. An interim fix that seems to work (there may be a better
indicator than the one I have chosen) is to add the line

$url .= '/sign' if $prog->{channel} and $prog->{channel} eq 'Signed';

after line 4939 in the 2.80 release of get_iplayer.pl which reads

$url .= '/ad' if defined $opt->{versionlist} && $opt->{versionlist}
ne 'default';

Rob
dinkypumpkin
2012-02-23 11:41:28 UTC
Permalink
Post by Rob Dixon
I have noticed recently that signed television programmes are breaking
get_iplayer. An interim fix that seems to work (there may be a better
indicator than the one I have chosen) is to add the line
$url .= '/sign' if $prog->{channel} and $prog->{channel} eq 'Signed';
after line 4939 in the 2.80 release of get_iplayer.pl which reads
$url .= '/ad' if defined $opt->{versionlist} && $opt->{versionlist} ne
'default';
I've just downloaded several signed programmes without a hitch, so
please expand on "breaking get_iplayer". Does it actually fall over, or
do you just not get the programme you expected? If it falls over, does
it print an error message? More helpful would be to show us your
command line and the output (from release version) when run with
--verbose. Ordinarily, the choice of playlist URL with non-default
versions wouldn't make a difference. If the change you described
actually has an effect, it suggests there may be something unusual with
BBC metadata for your programmes, but we don't know what those
programmes are.
Rob Dixon
2012-02-23 13:38:41 UTC
Permalink
Post by dinkypumpkin
Post by Rob Dixon
I have noticed recently that signed television programmes are breaking
get_iplayer. An interim fix that seems to work (there may be a better
indicator than the one I have chosen) is to add the line
$url .= '/sign' if $prog->{channel} and $prog->{channel} eq 'Signed';
after line 4939 in the 2.80 release of get_iplayer.pl which reads
$url .= '/ad' if defined $opt->{versionlist} && $opt->{versionlist} ne
'default';
I've just downloaded several signed programmes without a hitch, so
please expand on "breaking get_iplayer". Does it actually fall over, or
do you just not get the programme you expected? If it falls over, does
it print an error message? More helpful would be to show us your command
line and the output (from release version) when run with --verbose.
Ordinarily, the choice of playlist URL with non-default versions
wouldn't make a difference. If the change you described actually has an
effect, it suggests there may be something unusual with BBC metadata for
your programmes, but we don't know what those programmes are.
If I use, for instance

get_iplayer --pid b01b45zh -g

to retrieve the Horizon programme "2011-2012: 7. Playing God", it
correctly shows me the info line and then says

WARNING: No programmes are available for this pid

This is because it is pulling the XML metadata from

http://www.bbc.co.uk/iplayer/playlist/b01b45zh

which has a <noItems reason=""/> element instead of from

http://www.bbc.co.uk/iplayer/playlist/b01b45zh/sign

which is valid for signed programmes.

Rob
dinkypumpkin
2012-02-23 14:13:02 UTC
Permalink
Post by Rob Dixon
If I use, for instance
get_iplayer --pid b01b45zh -g
to retrieve the Horizon programme "2011-2012: 7. Playing God", it
correctly shows me the info line and then says
WARNING: No programmes are available for this pid
This is because it is pulling the XML metadata from
http://www.bbc.co.uk/iplayer/playlist/b01b45zh
which has a <noItems reason=""/> element instead of from
http://www.bbc.co.uk/iplayer/playlist/b01b45zh/sign
which is valid for signed programmes.
Thanks for the info. Your problem has nothing to do with the playlist
XML. You need to specify that you want the signed version by adding
"--versions signed" to the command line. See the man page or --longhelp
output.

get_iplayer only attempts to download the "default" version unless you
specify otherwise. The '<noItems reason=""/>' is correct in this case
since there is no "default" version of the programme available. This is
true for programmes which are, e.g., only broadcast in the Sign Zone and
are thus only available in signed and/or audiodescribed versions.
Rob Dixon
2012-02-23 14:49:32 UTC
Permalink
Post by Rob Dixon
If I use, for instance
get_iplayer --pid b01b45zh -g
to retrieve the Horizon programme "2011-2012: 7. Playing God", it
correctly shows me the info line and then says
WARNING: No programmes are available for this pid
This is because it is pulling the XML metadata from
http://www.bbc.co.uk/iplayer/playlist/b01b45zh
which has a <noItems reason=""/> element instead of from
http://www.bbc.co.uk/iplayer/playlist/b01b45zh/sign
which is valid for signed programmes.
Thanks for the info. Your problem has nothing to do with the playlist
XML. You need to specify that you want the signed version by adding
"--versions signed" to the command line. See the man page or --longhelp
output.
get_iplayer only attempts to download the "default" version unless you
specify otherwise. The '<noItems reason=""/>' is correct in this case
since there is no "default" version of the programme available. This is
true for programmes which are, e.g., only broadcast in the Sign Zone and
are thus only available in signed and/or audiodescribed versions.
OK, but it seems counterintuitive that if I enter

get_iplayer Horizon

without specifying any specific version, I get

328: Horizon - 2009-2010: 4. Who's Afraid of a Big Black Hole?, BBC Two, Audio Described,Factual,Science & Nature,Science & Technology,TV, default,audiodescribed
329: Horizon - 2011-2012: 7. Playing God, Audio Described, Audio Described,Factual,Science & Nature,Science & Technology,Sign Zone,TV, audiodescribed,signed

but then I use

get_iplayer 329 -g

and it tells me

WARNING: No programmes are available for this pid

So I have to notice that the listing is of a signed version and say so
when I ask for the download, when get_iplayer knows the version is has
displayed is a signed one all along! The fix I made was just to modify
the URL if the programme selected from the match list happened to be signed.

Rob
dinkypumpkin
2012-02-23 15:54:26 UTC
Permalink
Post by Rob Dixon
OK, but it seems counterintuitive that if I enter
get_iplayer Horizon
without specifying any specific version, I get
328: Horizon - 2009-2010: 4. Who's Afraid of a Big Black Hole?, BBC Two, Audio Described,Factual,Science& Nature,Science& Technology,TV, default,audiodescribed
329: Horizon - 2011-2012: 7. Playing God, Audio Described, Audio Described,Factual,Science& Nature,Science& Technology,Sign Zone,TV, audiodescribed,signed
but then I use
get_iplayer 329 -g
and it tells me
WARNING: No programmes are available for this pid
So I have to notice that the listing is of a signed version and say so
when I ask for the download, when get_iplayer knows the version is has
displayed is a signed one all along! The fix I made was just to modify
the URL if the programme selected from the match list happened to be signed.
It's not counterintuitive given the default behaviour. To be fair, that
default behaviour isn't explicitly referenced in the help screen, a
situation which I can remedy when I have a moment. I should also point
out that if you always want signed programmes when they're available,
just use --prefs-add to make --versions=signed a permanent setting, or
add it to your options file directly.

As to whether the default behaviour should be changed to automatically
fall back to an alternate version if the default version isn't
available, some questions immediately arise: If both audiodescribed and
signed versions are available, which one do you download? What if the
user wants audiodescribed but only signed is available? It seems to me
like this is a place where the user needs to explicitly declare a
preference based on availability, as shown in the search output listing.
FWIW, such a fallback mechanism would affect a tiny number of
programmes (26 out of 905 in today's count), so the utility would be
limited.

If you want to pursue this, I would suggest surfacing the issue in a new
thread on this list to see if any other useful input emerges. If you
take it as far as proposing a patch for get_iplayer, your fix referenced
above is not the way to go. All you've done is silently force an
override of the expected behaviour, which isn't a good idea. The task
you're trying to accomplish should be done earlier in the processing,
e.g., by manipulating the version list based on cache contents.
Bill Denton
2012-02-23 16:03:17 UTC
Permalink
Post by Rob Dixon
OK, but it seems counterintuitive that if I enter
  get_iplayer Horizon
without specifying any specific version, I get
  328:    Horizon - 2009-2010: 4. Who's Afraid of a Big Black Hole?, BBC
Two, Audio Described,Factual,Science&  Nature,Science&  Technology,TV,
default,audiodescribed
  329:    Horizon - 2011-2012: 7. Playing God, Audio Described, Audio
Described,Factual,Science&  Nature,Science&  Technology,Sign Zone,TV,
audiodescribed,signed
but then I use
  get_iplayer 329 -g
and it tells me
  WARNING: No programmes are available for this pid
So I have to notice that the listing is of a signed version and say so
when I ask for the download, when get_iplayer knows the version is has
displayed is a signed one all along! The fix I made was just to modify
the URL if the programme selected from the match list happened to be signed.
It's not counterintuitive given the default behaviour.  To be fair, that
default behaviour isn't explicitly referenced in the help screen, a
situation which I can remedy when I have a moment.  I should also point out
that if you always want signed programmes when they're available, just use
--prefs-add to make --versions=signed a permanent setting, or add it to your
options file directly.
As to whether the default behaviour should be changed to automatically fall
back to an alternate version if the default version isn't available, some
questions immediately arise:  If both audiodescribed and signed versions are
available, which one do you download?  What if the user wants audiodescribed
but only signed is available?  It seems to me like this is a place where the
user needs to explicitly declare a preference based on availability, as
shown in the search output listing.  FWIW, such a fallback mechanism would
affect a tiny number of programmes (26 out of 905 in today's count), so the
utility would be limited.
If you want to pursue this, I would suggest surfacing the issue in a new
thread on this list to see if any other useful input emerges.  If you take
it as far as proposing a patch for get_iplayer, your fix referenced above is
not the way to go.  All you've done is silently force an override of the
expected behaviour, which isn't a good idea.  The task you're trying to
accomplish should be done earlier in the processing, e.g., by manipulating
the version list based on cache contents.
_______________________________________________
get_iplayer mailing list
http://lists.infradead.org/mailman/listinfo/get_iplayer
Sorry emailed to Rob directly by accident rather the list...

I have just tested with your earlier modifications and am still unable
to fetch the programme:
get_iplayer Horizon
Matches:
329: Horizon - 2009-2010: 4. Who's Afraid of a Big Black Hole?, BBC
Two, Audio Described,Factual,Science & Nature,Science & Technology,TV,
default,audiodescribed
330: Horizon - 2011-2012: 7. Playing God, Audio Described, Audio
Described,Factual,Science & Nature,Science & Technology,Sign Zone,TV,
audiodescribed,signed

get_iplayer -g 330
Matches:
330: Horizon - 2011-2012: 7. Playing God, Audio Described, Audio
Described,Factual,Science & Nature,Science & Technology,Sign Zone,TV,
audiodescribed,signed

INFO: 1 Matching Programmes
WARNING: No programmes are available for this pid

So how can I get this programme?

Thanks.
dinkypumpkin
2012-02-23 16:13:16 UTC
Permalink
Post by Bill Denton
So how can I get this programme?
See my earlier response:

http://lists.infradead.org/pipermail/get_iplayer/2012-February/002606.html
Bill Denton
2012-02-23 18:42:35 UTC
Permalink
Post by dinkypumpkin
Post by Bill Denton
So how can I get this programme?
http://lists.infradead.org/pipermail/get_iplayer/2012-February/002606.html
Thanks. Got it now using:
get_iplayer --versions signed --type=tv --mode=flashhd,flashvhigh
--pid b01b45zh --pvr-queue
followed by a PVR run.

Should have read the earlier messages more carefully.

Bill.

Rob Dixon
2012-02-23 13:48:35 UTC
Permalink
Post by dinkypumpkin
Post by Rob Dixon
I have noticed recently that signed television programmes are breaking
get_iplayer. An interim fix that seems to work (there may be a better
indicator than the one I have chosen) is to add the line
$url .= '/sign' if $prog->{channel} and $prog->{channel} eq 'Signed';
after line 4939 in the 2.80 release of get_iplayer.pl which reads
$url .= '/ad' if defined $opt->{versionlist} && $opt->{versionlist} ne
'default';
I've just downloaded several signed programmes without a hitch, so
please expand on "breaking get_iplayer". Does it actually fall over, or
do you just not get the programme you expected? If it falls over, does
it print an error message? More helpful would be to show us your command
line and the output (from release version) when run with --verbose.
Ordinarily, the choice of playlist URL with non-default versions
wouldn't make a difference. If the change you described actually has an
effect, it suggests there may be something unusual with BBC metadata for
your programmes, but we don't know what those programmes are.
Update, the output with --verbose enabled is below.

Cheerrs,

Rob


C:\Program Files (x86)\get_iplayer>get_iplayer --overwrite --force --verbose --pid b01b45zh -g
get_iplayer v2.80, Copyright (C) 2008-2010 Phil Lewis
This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.
This is free software, and you are welcome to redistribute it under certain
conditions; use --conditions for details.

INFO: User prefs dir: C:\Users\Rob/.get_iplayer
INFO: System options dir: C:\ProgramData/get_iplayer/options
Current options:
atomicparsley = .\AtomicParsley\AtomicParsley\AtomicParsley.exe
fatfilename = 1
ffmpeg = .\FFmpeg\ffmpeg-0.8-win32-static\bin\ffmpeg.exe
flvstreamer = .\RTMPDump\rtmpdump.exe
force = 1
lame = .\LAME\lame.exe
metadata = generic
mmsnothread = 1
mplayer = .\MPlayer\MPlayer-1.0rc2\mplayer.exe
nopurge = 1
output = \\synology\download\iPlayer
outputradio = \\synology\download\iPlayer\Radio
outputtv = \\synology\download\iPlayer\TV
overwrite = 1
pid = b01b45zh
subdir = 1
subdirformat = <nameshort>
subtitles = 1
thumb = 1
verbose = 1
vlc = .\VLC\vlc-1.1.11\vlc.exe
whitespace = 1

INFO: Search args: '.*'
INFO: Will try prog types: tv
INFO: Got 901 file cache entries for tv
INFO Trying to stream pid using type tv
INFO: pid found in cache
Matches:
329: Horizon - 2011-2012: 7. Playing God, Audio Described, Audio Described,Factual,Science & Nature,Science & Technology,Sign Zone,TV, audiodescribed,signed

INFO: 1 Matching Programmes
INFO: Getting page http://feeds.bbc.co.uk/iplayer/episode/b01b45zh
INFO: Getting page http://www.bbc.co.uk/programmes/b01b45zh.rdf
http://www.bbc.co.uk/iplayer/playlist/b01b45zh
INFO: iPlayer metadata URL = http://www.bbc.co.uk/iplayer/playlist/b01b45zh
INFO: Getting page http://www.bbc.co.uk/iplayer/playlist/b01b45zh
WARNING: No programmes are available for this pid
ERROR: Could not get version pid metadata
ERROR: Could not get programme metadata

C:\Program Files (x86)\get_iplayer>
Continue reading on narkive:
Loading...