GetiPlayerAutomator / get-iplayer-automator

Moved to https://github.com/Ascoware/get-iplayer-automator! The goal of Get iPlayer Automator is to allow iTunes and your Mac to become the hub for your British Television experience regardless of where in the world you are. Currently, Get iPlayer Automator allows you to download and watch BBC and ITV shows on your Mac. Series-Link/PVR functionality ensures you will never miss your favourite shows. Programmes are fully tagged and added to iTunes automatically upon completion. It is simple and easy to use, and runs on any machine running Mac OS X 10.7 or later. And since the shows are in iTunes, it is extremely easy to transfer them to your iPod, iPhone, or Apple TV allowing you to enjoy your shows on the go or on your television.
https://github.com/Ascoware/get-iplayer-automator
GNU General Public License v3.0
127 stars 54 forks source link

v1.7.2 fails to download certain shows. #407

Closed TheoDW closed 10 years ago

TheoDW commented 10 years ago

Hi. I've been trying to download some stuff, but the downloader crashes with an "unknown error". Any ideas?

In this case, it happens with Arthur (it grabs the subtitles, but can't grab the video), but it works fine with Doctor Who.

I'll include the log.

dinkypumpkin commented 10 years ago

If you're seeing an "Unknown Error" message, it's not crashing. See wiki: Verbose Log

TheoDW commented 10 years ago

Sorry. That happens to newbies like me.

Anyhoo, here's the gist: https://gist.github.com/TheoDW/8fd5072bdd639c731a56

dinkypumpkin commented 10 years ago

I think GiA is discarding some useful output from rtmpdump. Generate another verbose log for the same programme episode, but don't post it. Assuming the download fails again, look for the first line in the log that begins with:

INFO: Command: "/Applications/Get iPlayer Automator.app/Contents/Resources/rtmpdump-2.4"

Copy everything after "INFO: Command: " (it's long) and paste it at a command prompt, then hit Return to run the command. This will run rtmpdump outside of GiA so that all its output is visible. You must do this immediately after generating the verbose log since the command string contains a time-limited token. Copy the command output from your terminal window and paste it in a new Gist, then post the link in your reply.

TheoDW commented 10 years ago

Done.

https://gist.github.com/TheoDW/6412267c8e7ed09028e9

dinkypumpkin commented 10 years ago

You also need to delete the .partial.mp4.flv referenced in the command string before running rtmpdump. It is choking on what it sees as a bad pre-existing file (that's what "Failed to get last keyframe" means). When you create the verbose log, GiA may be creating a zero-length file. Whatever the size, delete the file after running GiA and before running rtmpdump at a command prompt.

TheoDW commented 10 years ago

Done.

https://gist.github.com/TheoDW/eba02d2f81628227d56d

dinkypumpkin commented 10 years ago

OK, that surfaced the actual error: "handshake failed", which usually means rtmpdump couldn't contact the media server. Try the process a few more times over the next couple of days to confirm you get that error consistently. It may be due to poor upstream connectivity with particular CDNs, but you wouldn't necessarily expect that to occur so consistently. It may also be the result of geo-blocking. I suspect you managed to download Doctor Who in HD. Other people have seen cases where HD content - which comes from a different CDN - can be downloaded while content that isn't available in HD - like Arthur - cannot be downloaded. That could be due to different geo-blocking measures at different CDNs. There is no way for me to know, but I can say that I have no trouble downloading your episode of Arthur from the UK.

There is nothing GiA can do about any of this. If, for whatever reason, rtmpdump cannot access the media servers - no download. If you can download other programmes at less than HD quality, then there may simply a problem with Arthur. You should also keep trying for a few days to make sure it isn't some temporary issue with the CDN servers.

TheoDW commented 10 years ago

I was thinking it was something like that. (Strange thing, I can still download the SD episodes if I use the official BBC downloader, but that's another can of worms).

Thanks for the help!

dinkypumpkin commented 10 years ago

The iPlayer downloader is a separate system, completely unrelated to how GiA and get_iplayer operate.