|
Apr 27 2009
|
Update 6th May 2009: You might want to read this first…
You are now able to search, index, record and watch Channel4’s 4oD without Adobe flash on most platforms using the latest release of the open source get_iplayer. And, best of all – it is DRM free…
This is possible thanks to today’s release of rtmpdump v1.5 by Andrej Stepanchuk which now supports adobe’s obfuscated RTMPE protocol.
To get this working do the following:
- Use the download page to get a new version of rtmpdump and update get_iplayer to the latest version (1.73). (use get_iplayer –update)
- Re-install the new Windows Automated Installer from here – it will then update to a working ffmpeg and rtmpdump v1.5.
- Search for a programme:
get_iplayer –type=ch4 Shameless
- Record the programme that is number 40123 in the resulting index:
get_iplayer –type=ch4 –get 40123
You can also record a programme if you suplly a 4oD url:
- Find the programme on the Channel4 4oD web site and copy the link location of the programme.
- Run get_iplayer as follows:
get_iplayer –pid=ch4:http://www.channel4.com/programmes/shameless/catch-up#2872545
- Or just: get_iplayer –pid=ch4:2872545
Seems to be there now – sometimes the beeb take a few hrs to put the programme on the feed. Also you could try to force a flush of the cache using –flush option.
get_iplayer –nocopyright Perrin
Matches:
436: Reggie Perrin – Episode 1, BBC HD, Comedy,Entertainment,Sitcoms,TV, default
INFO: 1 Matching Programmes
Thank you, I just figured this out. I was using get_iplayer –flush –type=tv and is it seems that –type=tv somehow prevented it from working correctly.
Many thanks for the C4 stuff, my son will be very pleased! But, I’m having a few problems, mainly because I cannot seem to get rtmpdump to compile on my Intel OSX (Leopard) Mac.
Does anyone have a compiled version of the correct stuff?
I was gonna ask the same thing. I had a play around trying to compile it but it just wasn’t happening…
Excellent work thanks for the great script. And thanks to Andrej Stepanchuk for the rtmpdump program.
Will you be adding support for Demand five to the script – that seems to use RTMPE too.
I certainly have that on my list. I won’t be making many changes for the next week – I’m going to be working at the Reading Beer festival this week though so I will be out of action…. Come find me behind the beer bar if you want a few free tasters on me 🙂
Has anyone noticed ffmpeg conversion failing sporadically on these 4oD flv’s? Same ffmpeg build never has problems with bbc downloads. So far i’ve only noticed it happen with the smaller 384×288 streams.
FFmpeg version SVN-r18374-snapshot, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: –enable-shared –cc=cc –mandir=/usr/local/man –disable-debug –disable-optimizations –enable-gpl –enable-pthreads –enable-postproc –enable-libfaac –enable-libfaad –enable-libmp3lame –enable-libtheora –enable-libvorbis –enable-libx264 –enable-x11grab –extra-libs=’-L/usr/local/lib -L/usr/X11R6/lib’ –extra-cflags=’-I/usr/local/include -I/usr/X11R6/include’ –disable-decoder=cavs –disable-altivec –disable-armv6 –disable-armvfp –disable-iwmmxt –disable-neon
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.25. 0 / 52.25. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Apr 8 2009 14:39:27, gcc: 3.3.5 (propolice)
[flv @ 0x206920000]negative cts, previous timestamps might be wrong
Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (25/1)
Last message repeated 13 times
Input #0, flv, from ‘./Father_Ted/Father_Ted_Flight_into_Terrors02e10_2871743.partial.mp4.flv’:
Duration: 00:23:51.08, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 384×288 [PAR 1:1 DAR 4:3], 25 tbr, 1k tbn, 50 tbc
Stream #0.1: Audio: aac, 24000 Hz, stereo, s16
Output #0, mp4, to ‘./Father_Ted/Father_Ted_Flight_into_Terrors02e10_2871743.partial.mp4’:
Stream #0.0: Video: libx264, yuv420p, 384×288 [PAR 1:1 DAR 4:3], q=2-31, 1k tbn, 1k tbc
Stream #0.1: Audio: libfaac, 24000 Hz, stereo, s16
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[NULL @ 0x204a67c00]error, non monotone timestamps 40 >= 40
av_interleaved_write_frame(): Error while opening file
WARNING: flv conversion failed – retaining flv file
I use FFmpeg version SVN-r15261 (Fedora9/10) and FFmpeg revision number: 16573 on WindowsXP with no probs. I’ve not heard any other reports on OpenBSD – maybe try an older rev??
I get the same problem on every ch4 programme, not on bbc ones. I’m also using a nightly build rather than the default ffmpeg (the one that came with Ubuntu 9.04 didn’t work at all!). I wonder if there’s a build flag we’ve missed or included in error?
I found the solution to the ffmpeg conversion error, ffmpeg needs to be compiled with the following options:
–enable-libfaac –enable-libmp3lame –enable-libtheora –enable-libvorbis –enable-libx264 –enable-libxvid –enable-gpl –enable-nonfree –enable-postproc –enable-avfilter –enable-avfilter-lavf
I can’t seem to get the program list off channel 4 website at the moment. Anybody else experiencing the problem? It worked last night.
Yes, me too. Presumably a temporary glitch.
Still not working. Doesn’t work using pid either. Do you suppose Channel 4 are blocking it?
Captured the xml file with Wireshark (while browsing with firefox), ran rtmpdump with -r and -u parameters, seemed to authenticate, and then got error.
Try updating get_iplayer now. You were right!
Brilliant. Many thanks for the quick fix. Was beginning to wonder if it was something to do with the user agent string, but couldn’t make sense of it. You’re obviously way ahead of me. Thanks again.
It’s obfuscation 🙂
Try updating get_iplayer now.
update get_iplayer now…
It doesn’t seem to work again, am I the only one? Love the script by the way Phil!
Tried with 1.74 just now, not getting a scrape.
WARNING: Failed to get programme index feed for from 4oD site
Have they changed it again?
Failing for me again too.
Working again with v1.75. Thanks again.
4od scraping down here too.
Tried again just now with latest version (Ubuntu)
INFO: Current version is 1.75
INFO: Getting ch4 Programmes List
WARNING: Failed to get series list from from channel4 site
WARNING: Failed to get series list from from channel4 site
WARNING: Failed to get series list from from channel4 site
I can’t get this to work either, just updated to 1.75 too 🙁
They seem to be discriminating against anything containing Connection: TE and just dropping the connection.
see
http://www.yuri.org.uk/~murble/get_iplayerfix.patch.txt
for a quick fix!
Good catch, that sorted it.
can someone explain how and what exactly you do with this script? iam so new to all this!
cheers
http://www.yuri.org.uk/~murble/get_iplayerfix.patch.txt
Thanks – I’ve added that pathch now 🙂
There appears to be a bug with Ch4 (version 1.76). Whichever program I try to download, I get a specific episode of the Countdown show.
When using the get_iplayer –get XXXXX
command, it creates a file with the program name, however it’s that Countdown episode.
When using the pid:XXXXXXXXX notation for any XXXXXXXXX, it gets again the same Countdown episode, and put the name Countdown_s2009e70_2871745.mp4
I’m seeing the same problem, with both version 1.76 and version 1.75 (just to check it wasn’t a problem specific to 1.76).
Adding Accept: */* to the HTTP request seems to fix this.
How and where did you add Accept?
Try inserting the following line into the create_ua subroutine:
$ua->default_header( ‘Accept’ => “*/*” );
By the way, if the people at Channel 4 that keep changing their system read this, at least the idea of always downloading Countdown was quite amusing (made me chuckle anyway).
Thanks Alan! I’ve patched get_iplayer v1.77 to make it more closely simulate a standard browser now inclusing the Accept header.
I just tried again with 1.86 and I get again the Countdown episodes ;-(.
I always get Countdown with v1.82 too..
If they did this on purpose it’s quite amusing indeed 😀
The funny thing is though, that I get Countdown on my browser too !?
Even on my laptop that has never been on 4oD or run get_iplayer ever before !?
They are not doing this based on IPs are they??
Hmmm, I have found that if I fetch the xml file for the asset info I always get the Countdown one, unless I use a proxy server that results in the request going from a different IP address, and then I get the correct xml file. Does sound like they have, maybe, black-listed some IP addresses. Guess I will have to find a way of sending that request from a selection of different IP addresses.
Hi Alan,
Did you manage to solve this problem?
It would appear that channel 4 is broken again :(:
INFO: Getting ch4 Programmes List
WARNING: Failed to get series list from from channel4 site
WARNING: Failed to get series list from from channel4 site
WARNING: Failed to get series list from from channel4 site
I’m running the latest SVN (216)
The svn versions aren’t always the latest 😐
Oh right…I assumed they would be. I’ll try one of the proper releases.
Nah – use the ‘get_iplayer –update’ I cannot always vouch for the state of the svn one.
Hi I’m using v1.85 of get_iplayer but ch4 seems to be broken. the response is ‘Invalid type ‘ch4′ specified. Valid types are: itv,tv,podcast,radio’
please disregard…just saw the post stopping ch4 support
The “ch4” type doesn’t work. I know you said that you have moved to a plugin approach, but where can I get a working plugin? Can you link to a plugin that I can use? Also, how do you add a plugin?
WHEN IS IT GOING TO WORK ?
How do i find the PID of a CH4 program?
Thanks
The problem has been resolved, for more info please visit our help desk.
Is this ever going to work with CH4, I really need to record stuff off channel 4.