[PATCH] updated URL for BBC flash player, added --swfurl

dinkypumpkin dinkypumpkin at gmail.com
Sun Apr 24 20:11:21 EDT 2011


It has been 10 days and requests for the BBC flash player are still
being redirected, so I have committed a patch with the updated URL
into my master branch at github.  I have also added a --swfurl
command-line option to enable overriding the built-in URL if it
changes again.  This only really affects HD TV programme downloads.
Radio and non-HD TV programme downloads continue to work OK even
though an error message is generated by rtmpdump.  Reply to this
thread if any problems.

Updated get_iplayer script here:

https://github.com/dinkypumpkin/get_iplayer/

Patch follows -

BBC is redirecting requests to the old flash player URL.
However, rtmpdump cannot follow the redirects.  For radio
and non-HD TV programmes, rtmpdump issues a "RTMP_HashSWF"
but continues downloading.  HD TV programme downloads fail
after a short time with a "Client Verification" error.  This
patches updates the flash player URL to the new location (see
Programme::bbciplayer::get_stream_date_cdn).  It also implements
a new --swfurl command-line option to enable overriding the flash
player URL if it should change again (see Streamer::rtmp::get and
see Streamer::rtmp::opt_format).  Also updated man page source.
---
 get_iplayer   |    4 +++-
 get_iplayer.1 |    3 +++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/get_iplayer b/get_iplayer
index 433267d..108dbaf 100755
--- a/get_iplayer
+++ b/get_iplayer
@@ -5852,7 +5852,7 @@ sub get_stream_data_cdn {
 		# Common attributes
 		# swfurl = Default iPlayer swf version
 		my $conn = {
-			swfurl		=> "http://www.bbc.co.uk/emp/10player.swf?revision=18269_21576",
+			swfurl		=> "http://www.bbc.co.uk/emp/revisions/18269_21576_10player.swf?revision=18269_21576",
 			ext		=> $ext,
 			streamer	=> $streamer,
 			bitrate		=> $mattribs->{bitrate},
@@ -7998,6 +7998,7 @@ sub opt_format {
 		ffmpeg		=> [ 0, "ffmpeg=s", 'External Program', '--ffmpeg <path>', "Location of ffmpeg binary"],
 		rtmpport	=> [ 1, "rtmpport=n", 'Recording', '--rtmpport <port>', "Override the RTMP port (e.g. 443)"],
 		flvstreamer	=> [ 0, "flvstreamer=s", 'External Program', '--flvstreamer <path>', "Location of flvstreamer binary"],
+		swfurl	=> [ 1, "swfurl=s", 'External Program', '--swfurl <url>', "Override built-in URL of BBC flash player"],
 	};
 }
 
@@ -8014,6 +8015,7 @@ sub get {
 	my $tcurl 	= $streamdata{tcurl};
 	my $authstring 	= $streamdata{authstring};
 	my $swfurl 	= $streamdata{swfurl};
+	$swfurl = $opt->{swfurl} if $opt->{swfurl};
 	my $playpath 	= $streamdata{playpath};
 	my $port 	= $streamdata{port} || $opt->{rtmpport} || 1935;
 	my $protocol	= $streamdata{protocol} || 0;
diff --git a/get_iplayer.1 b/get_iplayer.1
index 3917f36..d4bb9b3 100644
--- a/get_iplayer.1
+++ b/get_iplayer.1
@@ -480,6 +480,9 @@ Location of lame binary
 \fB\-\-mplayer <path>
 Location of mplayer binary
 .TP
+\fB\-\-swfurl <url>
+Override built\-in URL of BBC flash player
+.TP
 \fB\-\-vlc <path>
 Location of vlc or cvlc binary
 .SH AUTHOR
-- 
1.7.4.4




More information about the get_iplayer mailing list