More changes to the iPlayer
As of last night or so, the Beeb are now using a slightly different XOR scheme to encrypt programmes. The offsets and the pattern are different.
I did a bit of experimentation before breakfast this morning by writing a simple program to parse the individual atoms in the QuickTime file.
The analyser is in my iplayer-dl subversion repository, as bin/analyze-qt.
svn co http://paulbattley.googlecode.com/svn/iplayer-dl
I haven’t yet cracked all the details, but I think I can determine the key fairly reliably by doing the following:
- Find the first atom with a non-ASCII name
- Take the two bytes after the name: these are the key
XORing the name seems to yield an atom of omvo on some files. It’s similar to the expected moov, but I’m not sure of the significance.
In addition, the length of encrypted atoms is wrong. There may be a simple transform to correct these, but XOR doesn’t seem to be it.
Still, I think we’re close to finding, as Irregular Shed put it, the ‘flowerpot that the key is left underneath.’
2008-06-13 11:31 UTC. Comments: 47.
iplayer
Wrote at 2008-06-13 19:55 UTC using Firefox 3.0 on Linux:
fix available here: http://linuxcentre.net/iplayer_decodePaul G
Wrote at 2008-06-13 21:39 UTC using Opera 9.27 on Mac OS X:
Somebody’s playing games here. Just downloaded Panorama and this time it’s XOR’d with alternating 0xCA and 0xC0, and it’s also byteswapped. The offsets are different too – 0×104 bytes in the clear at the end, and not sure at the start. Again I’ve just cleaned this up with a bit of C and then played successfully, apart from a bit of jitter at the start.P Lewis
Wrote at 2008-06-13 21:56 UTC using Firefox 3.0 on Linux:
Yup, but it seems that the final offset is not affecting playback in my case. I kept mine at 0×400 and it doesn’t seem to mind much.BTW: The http://linuxcentre.net/get_iplayer decoder (use the -d option) can now detect the XOR pattern used and auto-byte-swap.
I use the offset from the MDAT atom length added this to the MDAT start offset (fixed it seems) and then the moov atom starts after this.
The perl script looks for where the text ‘moov’ is and then looks for the pattern following it where zeroes exit.
It then tests the XOR on the text ‘moov’ to see if it is byte-swapped.
It then does the XORing and swapping as required on the file.
Paul G
Wrote at 2008-06-13 22:10 UTC using Opera 9.27 on Mac OS X:
Nice. Question is, how’s the iPhone working it out? The offsets are definitely varying, and getting them wrong does cause glitches at the start and end of playing. In any case I doubt the iPhone is using the same method for working out the key. Either there’s information somewhere in the HTML headers (or the mp4 URL?), or as somebody suggested before, this file is just a red herring and the iPhone is getting the clean version. Anybody had chance to trace a real iPhone download to check?Richard
Wrote at 2008-06-13 23:03 UTC using Firefox 2.0.0.7 on Linux:
silly beeb.Oli
Wrote at 2008-06-14 06:52 UTC using Firefox 3.0 on Linux:
Might they be behaviour profiling?From their perspective it would be simple to detect the people that “jump” straight to a video without viewing the main page, and then not navigating with a referrer.
Perhaps you ought to throw some random browsing in there before each download.
Alex
Wrote at 2008-06-14 09:32 UTC using Safari 525.17 on Windows XP:
The get_iplayer -d isn’t working on b00c3rtd (Graham norton show).It still says it cannot understand the file.
Upekshapriya
Wrote at 2008-06-14 13:38 UTC using Firefox 2.0.0.14 on Windows XP:
I get the following trying to deXOR b00c188n (Margaret Thatcher The Long Walk to Finchley) using get_iplayer -d (on Windows)INFO: Swapping bytes required
INFO: Will perform byte-swapping
INFO: (swap) Only processing 2097152 bytes from 10240
98.74%
Reading: at get_iplayer.pl line 682.
Then Quicktime Player gives me error 2048 – saying it’s not a file Quicktime understands
Alex
Wrote at 2008-06-14 16:17 UTC using Safari 525.17 on Windows XP:
I get exactly the same.Irregular Shed
Wrote at 2008-06-14 22:58 UTC using Firefox 2.0.0.14 on Windows XP:
If I weren’t on holiday this week I’d be getting the iPhone SDK running on the office Mac and looking for clues in that. However, I am. Plus does dim amser gyda fi, as they say on this side of the bridge. I would’ve thought, however, that the QuickTime implementation on the emulator that comes with the SDK would show the same characteristics as the actual hardware; otherwise, what’s the point in it?I recall from earlier experiments that there’s a script or something that gets called when you visit an iPlayer page on the iPhone, and I remember thinking at the time that it could be used for more than gathering statistics (which I think is what it claims to be doing, based on file name).
Saturday night, almost midnight, and I’m thinking about iPlayer. Sigh… I have an excuse but it’s tedious.
Richard
Wrote at 2008-06-15 08:16 UTC using Firefox 2.0.0.6 on Linux:
Just in case anyone from the BBC reads this blog, I’d like to point out WHY I’m interested in being able to download files from the iPlayer – namely, I have a linux laptop and I can’t connect to the internet when on the move, eg. on the train, and I have a spare half-hour to watch something.If the beeb made a linux download and playback service that enforced a 7 day limit, then great, that would probably meet my requirements and I’d feel less inclined to faff around with video files in order to get my fix of Dr. Who.!
The beeb argument is that only ~0.05% of people exploit the iphone hack, and at that level, it doesn’t matter in terms of their agreements with third party producers who supply some of their content.
I expect someone at the BBC iPlayer team is tasked with breaking this download function each time it gets as far as an installable product with a simple interface that could be used by significantly more than 0.05% of the population, and in a sense, fair play to them.
I suspect if they weren’t able to break the iplayer-dl and related programs fairly easily, their jobs would come under pressure. I’ve no desire to cause undue stress or hassle to that anonymous person at the BBC, although the nerd in me does enjoy messing around with XORs and TCP and so forth.
I think publishing the code engenders a hostile us-versus-them mentality, whereas what this effort should actually be signaling to the BBC is that they’re not providing the product people want, and so some people are adapting the existing product to meet their idea of what’s wanted.
Please then, bbc, use the time to provide a “proper” solution on linux that matches the windows offering, rather than wasting resources on a tit-for-tat game of hack and patch.
Thomas
Wrote at 2008-06-15 09:04 UTC using Firefox 2.0.0.14 on Windows 98:
Open Source DRM makes no sence im afraid; What video player on linux would make a DRM fork?Chris Warren
Wrote at 2008-06-15 12:19 UTC using Firefox 2.0.0.14 on Windows XP:
A good way of finding the XOR bytes is to find what should be the MOOV atom and XOR the first two bytes by ‘M’ and ‘O’ (no need to rely on any offset remaining 0×00).Some of the chunk offsets for the video track in the STCO atom are encrypted, but they can be recalculated from the chunk offsets and sizes of the audio track and sizes (STSZ) of the video track.
What’s currently flummoxing me is the pattern in which the MDAT is now encrypted. It seems to switch quite regularly. You can get some idea of what’s going on by looking at the first 4 bytes of any audio chunk, which should decrypt to a valid NAL length – in our cases, should be less than 0×0000FFFF, so the first 2 bytes should always decrypt to 0×0000 which you can always by using one of the two orders of the XOR bytes.
The problem is I can’t work out at which point the bytes switch, and without this, there doesn’t seem to be any way of working out how to decrypt the video chunks.
I’m beginning to agree with Paul G – that the iPhone may still be getting a decrypted version and that this is a bit of a wild goose chase to keep us busy. I can’t imagine Apple would code in such a weird XOR encryption scheme into their media player when they’d want to push people into using FairPlay.
P Lewis
Wrote at 2008-06-15 12:22 UTC using Firefox 3.0 on Linux:
@Alex, Hi, I downloaded that show and tried with the latest ‘get_iplayer -d’ and it worked fine. I was using 0.19 (there is a bugfix in there which deals with odd moov atom offsets which didnt work properly in previous versions) – Sorry! Although if you run the new script on the broken file a few times it may well fix it magically :-)P Lewis
Wrote at 2008-06-15 12:27 UTC using Firefox 3.0 on Linux:
@Chris Warren, yes that ‘m’ ‘o’ idea is OK but if you dont know if the bytes are swapped this can hamper the test. ometimes you get ’?omvo?’ after deXORing and sometimes you get ‘m?oo?v’ depending on odd or even byte offsets of the moov location in the file. This is why I use the 0000 test – just becomes a little easier to think about. for me :-)P Lewis
Wrote at 2008-06-15 12:42 UTC using Firefox 3.0 on Linux:
@Upekshapriya, @Alex, I just used get_iplayer-0.19 and it manages that programme just fine now after last night’s bug fix. Thanks for the report.The signed version of this PID (b00c3v66) uses XOR pattern ‘40 c4’ with no swap.
The Original version of this PID (b00c185k) uses XOR pattern ‘c0 ca’ with swap.
Both work now from version 0.19.. Again, sorry for the glaring bug in 0.18 and before.
P Lewis
Wrote at 2008-06-15 12:44 UTC using Firefox 3.0 on Linux:
@Chris Warren, which pids can you not decode – I’d like to download and test.Chris Warren
Wrote at 2008-06-15 13:14 UTC using Firefox 2.0.0.14 on Windows XP:
@P Lewis:I’ve tried the get_iplayer script and that works fine. Must be a bug in my streaming code.
Paul Battley
Wrote at 2008-06-15 14:56 UTC using Firefox 3.0 on Linux:
Something about the wild goose chase hypothesis doesn’t convince me. I think if they were to lead us up the garden path, they could do so far more effectively by serving a file that couldn’t be decrypted at all (i.e. by using a non-reversible transform).I think there’s something in the idea that the iPhone gets something different, though, and I think it may be related to how it skips ahead to fetch the
moovchunk.moovis after the massivemdatchunk that contains the actual movie data, yetmoovis required before it can play the data. I really need to see an actual session, though, to be sure.If you’re reading this and you own an iPhone or iPod Touch, drop me a line and I’ll tell you how to grab a session trace.
Richard
Wrote at 2008-06-15 17:50 UTC using Firefox 2.0.0.6 on Linux:
@Paul – do you know if the iPhone version plays the preface animation of the rabbit running through the field for BBC1 shows / the BBC2 zoetrope with the flying cars? How would we download that animation? My guess is that the key is included with that preface, and the quicktime player on the iphone is loading the key along with the link to the main show by parsing that animation… whereas iplayer-dl derives the URL to the main program directly and so misses out the key / gets a different result.J Bennet
Wrote at 2008-06-15 19:16 UTC using Firefox 2.0.0.14 on Windows Vista:
@PaulI finally got iPlayer working on my iPod touch (multiple restores/resetting to factory settings), and would love to help, so if you let me know how to get a session trace, I’ll do my best.
J Bennet
Wrote at 2008-06-15 19:23 UTC using Firefox 2.0.0.14 on Windows Vista:
Oh btw, if anyone is having the same problem on a jailbroken ipod touch (“This movie cannot be played”), try restoring and setting it up as a new ipod, visiting bbc iplayer site and loading a video (before you do anything else), then running the jailbreaker (ZiPhone in my case). That’s the only way which got BBC iplayer working on a jailbroken ipod for me.Upekshapriya
Wrote at 2008-06-15 23:17 UTC using Firefox 2.0.0.14 on Windows XP:
Unfortunately the new version of get_iplayer (0.19) doesn’t seem to deXOR the programmes I have just downloaded with iplayer-dl 0.12For b00c4v1c (Meta4orce – Episode 3) I get the following:
INFO: Swapping bytes not required
INFO: XOR with ‘0×40c4’ required
INFO: Will perform XOR using 0×40c4
INFO: (xor) Only processing 2097152 bytes from 10240
92.39%
INFO: (xor) Only processing 839579 bytes from 37758976
Reading: at get_iplayer.pl line 730.
And Quicktime Player says again it doesn’t understand it.
and for b00c188n (Margaret Thatcher The Long Walk to Finchley) I get:
INFO: Swapping bytes required
INFO: Will perform byte-swapping
INFO: (swap) Only processing 2097152 bytes from 10240
98.74%
Reading: at get_iplayer.pl line 730.
And a similar misunderstood file.
oldman
Wrote at 2008-06-16 06:00 UTC using Safari 525.20 on Mac OS X:
@P Lewis—having problems downloading b00c194k with get_iplayer, (Content-Length = 247), badly encoded at BBC end?P Lewis
Wrote at 2008-06-16 06:22 UTC using Firefox 3.0 on Linux:
@oldman, b00c194k doesnt even appear to be downloadable yet… I think that measn they havent encoded it yet.P Lewis
Wrote at 2008-06-16 06:26 UTC using Firefox 3.0 on Linux:
@Upekshapriya, b00c4v1c if d/loaded with get_iplayer downloads/decodes fine on v0.19. Maybe iplayer_dl is doing its own decoding attempt – can you stop iplayer_dl attempting to decode?o/wise use ‘get_iplayer -v b00c4v1c’
Sometimes, if you have a munged decoded file you can run ‘get_iplayer -n ’ on it a few times and it will fix it :-)
Upekshapriya
Wrote at 2008-06-16 08:52 UTC using Firefox 2.0.0.14 on Windows XP:
@P Lewis – I seem to be getting the same problem with a fresh download – could it be because I am running the program on Windows?INFO: Attempting to Download: Meta4orce – Episode 3
INFO: Stage 1 URL = http://www.bbc.co.uk/iplayer/page/item/b00c4v1c.shtml
INFO: Types available: b00c4v15, Original
INFO: Stage 2 Type = Original
INFO: Stage 2 URL = http://www.bbc.co.uk/mediaselector/3/auth/iplayer_streaming_
http_mp4/b00c4v15
INFO: File name = Meta4orce – Episode 3 – Original.mov
INFO: Stage 3 URL = http://download.iplayer.bbc.co.uk/iplayer_streaming_http_mp4
/5211712174229295607.mp4?token=iVXexpt7T9gga1B1Hh1%2BMaM2tSnyU6SW6Pn9eTZi8lmqBzP
sq4sk%2BK7tyOhG9R23fctoIPH0SU2U%0A9M74%2BxIGstNAQDgfeQjtq4sr3brQmb6dsOGijIHqtLnF
XQh5Z%2F%2BGNBdQKlw%3D%0A
Content-Length = 38599581252772 kbps 100.3% 0 s remaining
INFO: Downloaded ./Meta4orce – Episode 3 – Original.mov (38599581 bytes)
DEBUG: Decimal value = 38258245
DEBUG: HEX string value = 02 47 c6 45
mdat_end_offset = 02 47 c6 45 = 38258245
mdat_end_offset (decimal) = 38258245
DEBUG: HEX string value = 58 d2 a1 b7
BYTES: XÊíÀ, HEX: 58 d2 a1 b7
DEBUG: HEX string value = aa fb
INFO: Swap Test (moov zeroes for xor) BYTES: ¬¹, HEX: aa fb
DEBUG: HEX string value = aa fb
DEBUG: XOR pattern = aafb
Pattern = ¬¹
Pattern = ¹¬
DEBUG: HEX string value = a3 78 5a 1d
INFO: Swap Test (after XOR on ‘moov’) BYTES: úxZ?, HEX: a3 78 5a 1d
INFO: Swapping bytes required
INFO: Will perform byte-swapping
INFO: Using offsets Begin: 10240, End: 1026
Pattern =
Pattern =
INFO: (swap) Only processing 2097152 bytes from 10240
./Meta4orce – Episode 3 – Original.mov length = 38724873
0.03%, offset = 2800, blksize = 2097152 bytes, (length = 24EE509, start = 2800,
5.44%, offset = 202800, blksize = 2097152 bytes, (length = 24EE509, start = 2800
10.86%, offset = 402800, blksize = 2097152 bytes, (length = 24EE509, start = 280
16.27%, offset = 602800, blksize = 2097152 bytes, (length = 24EE509, start = 280
21.69%, offset = 802800, blksize = 2097152 bytes, (length = 24EE509, start = 280
27.10%, offset = A02800, blksize = 2097152 bytes, (length = 24EE509, start = 280
32.52%, offset = C02800, blksize = 2097152 bytes, (length = 24EE509, start = 280
37.94%, offset = E02800, blksize = 2097152 bytes, (length = 24EE509, start = 280
43.35%, offset = 1002800, blksize = 2097152 bytes, (length = 24EE509, start = 28
48.77%, offset = 1202800, blksize = 2097152 bytes, (length = 24EE509, start = 28
54.18%, offset = 1402800, blksize = 2097152 bytes, (length = 24EE509, start = 28
59.60%, offset = 1602800, blksize = 2097152 bytes, (length = 24EE509, start = 28
65.01%, offset = 1802800, blksize = 2097152 bytes, (length = 24EE509, start = 28
70.43%, offset = 1A02800, blksize = 2097152 bytes, (length = 24EE509, start = 28
75.84%, offset = 1C02800, blksize = 2097152 bytes, (length = 24EE509, start = 28
81.26%, offset = 1E02800, blksize = 2097152 bytes, (length = 24EE509, start = 28
86.67%, offset = 2002800, blksize = 2097152 bytes, (length = 24EE509, start = 28
92.09%, offset = 2202800, blksize = 2097152 bytes, (length = 24EE509, start = 28
00, end = 24EE107)Pattern =
INFO: (swap) Only processing 964871 bytes from 37758976
Reading: at get_iplayer.pl line 730.
P Lewis
Wrote at 2008-06-16 11:12 UTC using Firefox 3.0 on Linux:
@Upekshapriya, I’ve never tested it on windows, although someone said it worked on cygwin for them.Looks like the part reading the ‘moov’ is completely not reading the right bytes (58 d2 a1 b7) although the offset is correct, or the downloaded file is just mangled(less likely)
I’ll have a look into it if I can – I dont have access to windows though so please bear with me on this.
Try revision 22 from SVN – it does more sanity checking – it might uncover the problem ? : (note that this location does not guarantee a workings script – look at the usual download location for the releases) http://getiplayer.svn.sourceforge.net/viewvc/getiplayer/trunk/
P Lewis
Wrote at 2008-06-16 12:21 UTC using Firefox 3.0 on Linux:
@Upekshapriya, That meta4orce program should have md5sum (before decoding) of:d92ade026352effe572cfde2ab4a268f
Can u confirm this?
Mike Trim
Wrote at 2008-06-16 12:55 UTC using Firefox 3.0 on Linux:
To make the Perl script compatible with Windows you may need to add calls to binmode because Windows distinguishes between binary and text files.P Lewis
Wrote at 2008-06-16 13:52 UTC using Firefox 3.0 on Linux:
Hey – funny that – just came to same fix :-) Thanks Mike!P Lewis
Wrote at 2008-06-16 14:35 UTC using Firefox 3.0 on Linux:
@Upekshapriya, thanks for the feedback/trace. Looks like http://linuxcentre.net/get_iplayer/get_iplayer-0.21 will do the trick.Thomas
Wrote at 2008-06-16 15:38 UTC using Firefox 2.0.0.14 on Windows 98:
Run the perl script get_iplayer under cygwin http://www.cygwin.comUpekshapriya
Wrote at 2008-06-16 23:22 UTC using Firefox 2.0.0.14 on Windows XP:
@P Lewis I still get an error when running get_iplayer 0.21 seeC:Documents and SettingsUPMy DocumentsMy Videosiplayer>perl get_iplayer.pl -v -d test.mov
DEBUG: Decimal value = 38258245
DEBUG: HEX string value = 02 47 c6 45
mdat_end_offset = 02 47 c6 45 = 38258245
mdat_end_offset (decimal) = 38258245
DEBUG: HEX string value = a9 2f ab 36
BYTES: ®/½6, HEX: a9 2f ab 36
DEBUG: HEX string value = 40 c4
INFO: Swap Test (moov zeroes for xor) BYTES: @-, HEX: 40 c4
DEBUG: HEX string value = 40 c4
DEBUG: XOR pattern = 40c4
Pattern = @-
Pattern = -@
DEBUG: HEX string value = 6d 6f 6f 76
INFO: Swap Test (after XOR on ‘moov’) BYTES: moov, HEX: 6d 6f 6f 76
INFO: Swapping bytes not required
DEBUG: HEX string value = 40 c4
INFO: Swap Test (moov zeroes for xor) BYTES: @-, HEX: 40 c4
DEBUG: HEX string value = 40 c4
DEBUG: XOR pattern = 40c4
INFO: XOR with ‘0×40c4’
INFO: Using offsets Begin: 10240, End: 1026
Pattern = @-
INFO: (xor) Only processing 2097152 bytes from 10240
test.mov length = 38599581
0.03%, offset = 2800, blksize = 2097152 bytes, (length = 24CFB9D, start = 2800,
5.46%, offset = 202800, blksize = 2097152 bytes, (length = 24CFB9D, start = 2800
10.89%, offset = 402800, blksize = 2097152 bytes, (length = 24CFB9D, start = 280
16.33%, offset = 602800, blksize = 2097152 bytes, (length = 24CFB9D, start = 280
21.76%, offset = 802800, blksize = 2097152 bytes, (length = 24CFB9D, start = 280
27.19%, offset = A02800, blksize = 2097152 bytes, (length = 24CFB9D, start = 280
32.63%, offset = C02800, blksize = 2097152 bytes, (length = 24CFB9D, start = 280
38.06%, offset = E02800, blksize = 2097152 bytes, (length = 24CFB9D, start = 280
43.49%, offset = 1002800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
48.92%, offset = 1202800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
54.36%, offset = 1402800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
59.79%, offset = 1602800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
65.22%, offset = 1802800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
70.66%, offset = 1A02800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
76.09%, offset = 1C02800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
81.52%, offset = 1E02800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
86.96%, offset = 2002800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
92.39%, offset = 2202800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
00, end = 24CF79B)Pattern = @-
INFO: (xor) Only processing 839579 bytes from 37758976
Reading: at get_iplayer.pl line 763.
test.mov is a copy of Meta4orce – Episode 3.mov downloaded with iplayer-dl 0.12
I will attempt to run it under Cygwin as Thomas suggests (just installing Cygwin as I write).
Upekshapriya
Wrote at 2008-06-16 23:44 UTC using Firefox 2.0.0.14 on Windows XP:
A two stage process this time using get_iplayer in downloading and then deXORing all run in cygwin:INFO: Attempting to Download: Meta4orce – Episode 3
INFO: Stage 1 URL = http://www.bbc.co.uk/iplayer/page/item/b00c4v1c.shtml
INFO: Types available: b00c4v15, Original
INFO: Stage 2 Type = Original
INFO: Stage 2 URL = http://www.bbc.co.uk/mediaselector/3/auth/iplayer_streaming_
http_mp4/b00c4v15
INFO: File name = Meta4orce_-_Episode_3_b00c4v15_Original.mov
INFO: Stage 3 URL = http://download.iplayer.bbc.co.uk/iplayer_streaming_http_mp4
/5211712174229295607.mp4?token=iVXexpt%2BQ9kgb1AgHhp%2BY6NktS2mVqmRtKGsfjxm9ljxC
GLsq44kpa69yLxP9E23dZ47dfGjSUyU%0Ap87%2B%2B0IG59MXQGwfIgjuq4Ir3brQmb6dsOGijIHqtL
nFXQh5Z%2F%2BGNBdQKlw%3D%0A
Content-Length = 385995813600kbps 100.0%, 00h:00m:00s remaining
INFO: Downloaded ./Meta4orce_-_Episode_3_b00c4v15_Original.mov (38599581 bytes)
Made a copy of the download to test.mov
UP@Upekshapriya ~
$ perl get_iplayer.pl -d -v test.mov
DEBUG: Decimal value = 38258245
DEBUG: HEX string value = 02 47 c6 45
mdat_end_offset = 02 47 c6 45 = 38258245
mdat_end_offset (decimal) = 38258245
DEBUG: HEX string value = a9 2f ab 36
BYTES: ®/½6, HEX: a9 2f ab 36
DEBUG: HEX string value = 40 c4
INFO: Swap Test (moov zeroes for xor) BYTES: @-, HEX: 40 c4
DEBUG: HEX string value = 40 c4
DEBUG: XOR pattern = 40c4
Pattern = @-
Pattern = -@
DEBUG: HEX string value = 6d 6f 6f 76
INFO: Swap Test (after XOR on ‘moov’) BYTES: moov, HEX: 6d 6f 6f 76
INFO: Swapping bytes not required
DEBUG: HEX string value = 40 c4
INFO: Swap Test (moov zeroes for xor) BYTES: @-, HEX: 40 c4
DEBUG: HEX string value = 40 c4
DEBUG: XOR pattern = 40c4
INFO: XOR with ‘0×40c4’
INFO: Using offsets Begin: 10240, End: 1026
Pattern = @-
INFO: (xor) Only processing 2097152 bytes from 10240
test.mov length = 38599581
0.03%, offset = 2800, blksize = 2097152 bytes, (length = 24CFB9D, start = 2800,
5.46%, offset = 202800, blksize = 2097152 bytes, (length = 24CFB9D, start = 2800
10.89%, offset = 402800, blksize = 2097152 bytes, (length = 24CFB9D, start = 280
16.33%, offset = 602800, blksize = 2097152 bytes, (length = 24CFB9D, start = 280
21.76%, offset = 802800, blksize = 2097152 bytes, (length = 24CFB9D, start = 280
27.19%, offset = A02800, blksize = 2097152 bytes, (length = 24CFB9D, start = 280
32.63%, offset = C02800, blksize = 2097152 bytes, (length = 24CFB9D, start = 280
38.06%, offset = E02800, blksize = 2097152 bytes, (length = 24CFB9D, start = 280
43.49%, offset = 1002800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
48.92%, offset = 1202800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
54.36%, offset = 1402800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
59.79%, offset = 1602800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
65.22%, offset = 1802800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
70.66%, offset = 1A02800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
76.09%, offset = 1C02800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
81.52%, offset = 1E02800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
86.96%, offset = 2002800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
92.39%, offset = 2202800, blksize = 2097152 bytes, (length = 24CFB9D, start = 28
00, end = 24CF79B)Pattern = @-
INFO: (xor) Only processing 839579 bytes from 37758976
Reading: at get_iplayer.pl line 763.
Again the same error.
P Lewis
Wrote at 2008-06-17 08:32 UTC using Firefox 3.0 on Linux:
@Upekshapriya, mysterious! Can you get the md5sum of test.mov before it is decoded? I’d like to see that your download matches mine..P Lewis
Wrote at 2008-06-17 08:40 UTC using Firefox 3.0 on Linux:
@Upekshapriya, Duh! I forgot another file open in the script needed binmode :-|Add this after line 604 (v0.22)...:
binmode FILE;
I’ll put this fix in 0.23 – sorry – better if I had windows to test this I guess :-)
Upekshapriya
Wrote at 2008-06-17 10:16 UTC using Firefox 2.0.0.14 on Windows XP:
@ P Lewis# MD5 checksums generated by MD5summer (http://www.md5summer.org)
# Generated 17/06/2008 10:52:54
d92ade026352effe572cfde2ab4a268f *Meta4orce_-_Episode_3_b00c4v15_Original.mov
Running 0.22 in cygwin and Windows cmd prompt with
binmode FILE;
after line 604 ie at line 605
$ perl get_iplayer.pl -v -d test.mov
syntax error at get_iplayer.pl line 341, near “FILE:”
syntax error at get_iplayer.pl line 364, near ”} else”
Global symbol ”@cache” requires explicit package name at get_iplayer.pl line 365
.
syntax error at get_iplayer.pl line 379, near ”}”
syntax error at get_iplayer.pl line 400, near ”}”
syntax error at get_iplayer.pl line 576, near ”}”
Can’t use global $! in “my” at get_iplayer.pl line 596, near ”$file: $!”
syntax error at get_iplayer.pl line 687, near ”}”
syntax error at get_iplayer.pl line 712, near ”}”
Can’t use global `@_ in “my” at get_iplayer.pl line 718, near ”= @_”
get_iplayer.pl has too many errors.
NB added ` before @ to allow code to display properly
P Lewis
Wrote at 2008-06-17 10:45 UTC using Firefox 3.0 on Linux:
@Upekshapriya, I didn’t get enough sleep clearly. 0.23 looks to be syntactically correct. I managed to bungle 0.22.Upekshapriya
Wrote at 2008-06-17 12:08 UTC using Firefox 2.0.0.14 on Windows XP:
@ P Lewis – Success!Great it works. Thanks for all your work. :-)
Alex
Wrote at 2008-06-17 16:54 UTC using Safari 525.17 on Windows XP:
Well, .023 worked for me on all but one of my files. It didn’t work on Doctor Who but I think that was my fault for running so many decoders on it.Thanks!
Alex
Wrote at 2008-06-17 16:55 UTC using Safari 525.17 on Windows XP:
Oh, and I’m gonna redownload doctor who.Joni Ellenby
Wrote at 2008-06-17 22:56 UTC using Firefox 3.0b5 on Mac OS X:
im getting errors even with update of it not decoding the file.this is the error i get:
joni:~ joni$ /Users/joni/Desktop/ip.pl -o /Users/joni/Desktop/ 339Download List:
339: The Pingu Show – Kindergarten and Journey (6 days left)
INFO: Attempting to Download: The Pingu Show – Kindergarten and Journey
INFO: File name = The_Pingu_Show_-_Kindergarten_and_Journey_b008tsn0_Original.mov
INFO: Downloaded /Users/joni/Desktop//The_Pingu_Show_-_Kindergarten_and_Journey_b008tsn0_Original.mov (53823368 bytes)
INFO: Swapping bytes
INFO: XOR with ‘0xd8e0’
ERROR: Decoding Failed, moov = ‘voom’, HEX: 76 6f 6f 6d
joni:~ joni$
the shows not for me btw LOL but the script was working yesterday and day before :S
Upekshapriya
Wrote at 2008-06-18 12:49 UTC using Firefox 2.0.0.14 on Windows XP:
@P Lewis, I get this for a new download:INFO: Attempting to Download: Summer Heights High – Episode 2
INFO: Stage 1 URL = http://www.bbc.co.uk/iplayer/page/item/b00c4xjx.shtml
INFO: Types available: b00c4xh4, Original
INFO: Stage 2 Type = Original
INFO: Stage 2 URL = http://www.bbc.co.uk/mediaselector/3/auth/iplayer_streaming_
http_mp4/b00c4xh4
INFO: File name = Summer Heights High – Episode 2 b00c4xh4 Original.mov
INFO: Stage 3 URL = http://download.iplayer.bbc.co.uk/iplayer_streaming_http_mp4
/5212950413308793941.mp4?token=iVXexppySNMjalB2Hht%2BMqMxun3wA6Oes6ivKzU08FrxB26
8q90k96%2B8z75Poxvjfp45cfGgSUmU%0A%2Fs6u%2B0UG4osaRmUfd1%2B6rd4p3brQmb2TtOOniobr
trjAXQ52Y%2FmGNBdQKlw%3D%0A
INFO: Content-Length = 113881047 g
INFO: Downloaded ./Summer Heights High – Episode 2 b00c4xh4 Original.mov (113881
047 bytes)
DEBUG: Decimal value = 112869979
DEBUG: HEX string value = 06 ba 42 5b
mdat_end_offset = 06 ba 42 5b = 112869979
mdat_end_offset (decimal) = 112869979
DEBUG: HEX string value = 4b 57 04 8f
BYTES: KW?Å, HEX: 4b 57 04 8f
DEBUG: HEX string value = e4 b4
INFO: Swap Test (moov zeroes for xor) BYTES: õ¦, HEX: e4 b4
DEBUG: HEX string value = e4 b4
DEBUG: XOR pattern = e4b4
Pattern = õ¦
Pattern = ¦õ
DEBUG: HEX string value = ff b3 b0 6b
INFO: Swap Test (after XOR on ‘moov’) BYTES: ¦¦k, HEX: ff b3 b0 6b
INFO: Swapping bytes
INFO: Using offsets Begin: 10240, End: 1026
Pattern =
Pattern =
INFO: (swap) Only processing 2097152 bytes from 10240
./Summer Heights High – Episode 2 b00c4xh4 Original.mov length = 113881047
0.01%, offset = 2800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 2800,
1.85%, offset = 202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 2800
3.69%, offset = 402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 2800
5.53%, offset = 602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 2800
7.38%, offset = 802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 2800
9.22%, offset = A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 2800
11.06%, offset = C02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 280
12.90%, offset = E02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 280
14.74%, offset = 1002800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
16.58%, offset = 1202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
18.42%, offset = 1402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
20.27%, offset = 1602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
22.11%, offset = 1802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
23.95%, offset = 1A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
25.79%, offset = 1C02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
27.63%, offset = 1E02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
29.47%, offset = 2002800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
31.31%, offset = 2202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
33.16%, offset = 2402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
35.00%, offset = 2602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
36.84%, offset = 2802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
38.68%, offset = 2A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
40.52%, offset = 2C02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
42.36%, offset = 2E02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
44.21%, offset = 3002800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
46.05%, offset = 3202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
47.89%, offset = 3402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
49.73%, offset = 3602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
51.57%, offset = 3802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
53.41%, offset = 3A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
55.25%, offset = 3C02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
57.10%, offset = 3E02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
58.94%, offset = 4002800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
60.78%, offset = 4202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
62.62%, offset = 4402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
64.46%, offset = 4602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
66.30%, offset = 4802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
68.15%, offset = 4A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
69.99%, offset = 4C02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
71.83%, offset = 4E02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
73.67%, offset = 5002800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
75.51%, offset = 5202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
77.35%, offset = 5402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
79.19%, offset = 5602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
81.04%, offset = 5802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
82.88%, offset = 5A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
84.72%, offset = 5C02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
86.56%, offset = 5E02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
88.40%, offset = 6002800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
90.24%, offset = 6202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
92.09%, offset = 6402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
93.93%, offset = 6602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
95.77%, offset = 6802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
97.61%, offset = 6A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
00, end = 6C9ABD5)Pattern =
INFO: (swap) Only processing 623573 bytes from 113256448
99.45%, offset = 6C02800, blksize = 623573 bytes, (length = 6C9AFD7, start = 280
0, end = 6C9ABD5)Pattern =
INFO: (swap) processing 2 bytes from 113880021
DEBUG: HEX string value = b4 e4
INFO: Swap Test (moov zeroes for xor) BYTES: ¦õ, HEX: b4 e4
DEBUG: HEX string value = b4 e4
DEBUG: XOR pattern = b4e4
INFO: XOR with ‘0xb4e4’
INFO: Using offsets Begin: 10240, End: 1026
Pattern = ¦õ
INFO: (xor) Only processing 2097152 bytes from 10240
./Summer Heights High – Episode 2 b00c4xh4 Original.mov length = 113881047
0.01%, offset = 2800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 2800,
1.85%, offset = 202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 2800
3.69%, offset = 402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 2800
5.53%, offset = 602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 2800
7.38%, offset = 802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 2800
9.22%, offset = A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 2800
11.06%, offset = C02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 280
12.90%, offset = E02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 280
14.74%, offset = 1002800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
16.58%, offset = 1202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
18.42%, offset = 1402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
20.27%, offset = 1602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
22.11%, offset = 1802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
23.95%, offset = 1A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
25.79%, offset = 1C02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
27.63%, offset = 1E02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
29.47%, offset = 2002800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
31.31%, offset = 2202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
33.16%, offset = 2402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
35.00%, offset = 2602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
36.84%, offset = 2802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
38.68%, offset = 2A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
40.52%, offset = 2C02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
42.36%, offset = 2E02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
44.21%, offset = 3002800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
46.05%, offset = 3202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
47.89%, offset = 3402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
49.73%, offset = 3602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
51.57%, offset = 3802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
53.41%, offset = 3A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
55.25%, offset = 3C02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
57.10%, offset = 3E02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
58.94%, offset = 4002800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
60.78%, offset = 4202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
62.62%, offset = 4402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
64.46%, offset = 4602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
66.30%, offset = 4802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
68.15%, offset = 4A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
69.99%, offset = 4C02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
71.83%, offset = 4E02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
73.67%, offset = 5002800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
75.51%, offset = 5202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
77.35%, offset = 5402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
79.19%, offset = 5602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
81.04%, offset = 5802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
82.88%, offset = 5A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
84.72%, offset = 5C02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
86.56%, offset = 5E02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
88.40%, offset = 6002800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
90.24%, offset = 6202800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
92.09%, offset = 6402800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
93.93%, offset = 6602800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
95.77%, offset = 6802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
97.61%, offset = 6A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
00, end = 6C9ABD5)Pattern = ¦õ
INFO: (xor) Only processing 623573 bytes from 113256448
99.45%, offset = 6C02800, blksize = 623573 bytes, (length = 6C9AFD7, start = 280
0, end = 6C9ABD5)Pattern = õ¦
INFO: (xor) processing 2 bytes from 113880021
DEBUG: HEX string value = 62 b0 b3 65
ERROR: Decoding Failed, moov = ‘b¦¦e’, HEX: 62 b0 b3 65
P Lewis
Wrote at 2008-06-18 13:00 UTC using Firefox 3.0 on Linux:
@Upekshapriya, @Joni Ellenby, etcUse new get_iplayer0.24 – now does unencrypted downloads !! We solved it over the past two days…
Upekshapriya
Wrote at 2008-06-18 13:14 UTC using Firefox 2.0.0.14 on Windows XP:
@P LewisThanks for the new version. However I just tried decoding with it – the last lines show the same error as above:
95.77%, offset = 6802800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
97.61%, offset = 6A02800, blksize = 2097152 bytes, (length = 6C9AFD7, start = 28
00, end = 6C9ABD5)Pattern = ¦õ
INFO: (xor) Only processing 623573 bytes from 113256448
99.45%, offset = 6C02800, blksize = 623573 bytes, (length = 6C9AFD7, start = 280
0, end = 6C9ABD5)Pattern = õ¦
INFO: (xor) processing 2 bytes from 113880021
DEBUG: HEX string value = 62 b0 b3 65
ERROR: Decoding Failed, moov = ‘b¦¦e’, HEX: 62 b0 b3 65
P Lewis
Wrote at 2008-06-18 13:46 UTC using Firefox 3.0 on Linux:
@Upekshapriya, ah sorry, this is a completely different way to download files – the decoder is now deprecated. The XOR/swapping stuff was a red herring it seems. If they hare now ding more than just XOR and byte swapping adjacent pairs (looks liek they are reversing 4 bytes maybe now) then the decoder will not work – and while the new download method works I will not bother with maintaining the decoder option.Thanks