|
Sep 01 2008
|
Having recently noticed that subtitle support is now widely available on the iPlayer website, I thought I’d have a go at providing the ability for get_iplayer to download them (from version 0.61 onwards). So after some packet sniffing and perl hacking I have added subtitle support. It downloads the subtitles in W3C Timed Text format (see this post) and converts them into a more widely supported format, i.e. SubRip (.srt).
There is a rather annoying caveat though; The iPhone H.264 iplayer streams do not exactly match the flash versions; They often start a few seconds earlier which results n the subtitles being shown too early and out of sync with the audio
So, as a workaround, I’ve added an option to munge the subtitle timestamps during download to add an arbitrary offset in milliseconds 
To use this feature the program must, of course, have subtitles. You need to use the –subtitles option and optionally –suboffset nnnn, e.g:
get_iplayer –get Miller –subtitles –suboffset 3500
SubRip appears to be supported by mplayer, xine and vlc so hopefully you’ll be able to try this out.
The latest version of get_iplayer seems to have broken my ability to download programmes, it says it cannot get the o.gif webbug.
Matches:
INFO: 2 Matching Programmes
217: Helicopter Heroes: Series 2 – Episode 12, ‘BBC One’, Factual,TV, Origina
l
344: Panorama – Can Money Grow on Trees?, ‘BBC One’, Factual,News,TV, Origina
l
INFO: Attempting to Download: Helicopter Heroes: Series 2 – Episode 12
INFO: Programme is reported as ready for download
INFO: Checking existence of Original version
ERROR: Failed to get o.gif web bug from iplayer site
ERROR: Could not whitelist cookie
INFO: Attempting to Download: Panorama – Can Money Grow on Trees?
INFO: Programme is reported as ready for download
INFO: Checking existence of Original version
ERROR: Failed to get o.gif web bug from iplayer site
ERROR: Could not whitelist cookie
@Alex,
I have tried this with v0.65 on Win32 (WindowsXP and ActivePerl – what you are using?) and I can only suspect that get_iplayer cannot write to ‘\Documents and Settings\\.get_iplayer\cookies’. Maybe it has no permissions to create ‘\Documents and Settings\\.get_iplayer\’. I have removed it on my system and it creates the cookies file and/or directory just fine so I am having trouble working out why this may be. The script now uses %USERPROFILE% to determine where to find the .get_iplayer directory. What does ‘echo %USERPROFILE%’ show you?
C:\Documents and Settings\Alex>echo %USERPROFILE%
C:\Documents and Settings\Alex
C:\Documents and Settings\Alex>
I have a custom hosts file, and I just searched that for “bbc”, and stats.bbc.co.uk was listed on there as 127.0.0.1, I have removed that line, and get_iplayer no longer has any problem, (apart from the programme I want to download not being realy for download yet!)
Great feature and great prog too, thanks Phil. I tried the subtitles and they work alright in VLC, albeit with some funky formatting sometimes. I found I was able to use VLC’s feature to begin the subtitles earlier using a trial and error approach.
I’m trying to understand the SRT files a bit more, cause I want to be able to play the shows on my Netgear EVA8000. This has SRT support so I was happy, but it appears that the SRT files that get_iplayer creates are in a slightly different format. If I try and use ‘subtitle workshop’ from UruSoft, it says that the BBC subtitles are in an unsupported format. Can you, or anyone, give me any guidance in being able to use the subtitles on my EVA8000?
Maybe the specific srt file you have been testing with is a bad one. Try another. Every player I have tried that supports this format seems to work just fine with these. The beeb do quite a lot of live subtitling and that can be of rather dubious quality. Also, the srt files downloaded with the iphone format are seldom in sync due to the way that the start times of that format are different than the rtmp/flash versions.
Thanks for the quick response, Phil. It’s not really a sync issue, more of a formatting thing. I have been looking into this a bit more and I find that most media players do not object to this detail, but the format for SRT files is such that “The time format used is hours:minutes:seconds,milliseconds, with the milliseconds field precise to three decimal places” (source: http://en.wikipedia.org/wiki/SubRip). For example “The_Great_British_Wedding” has a format of 0:00:02,280 –> 0:00:05,480 whereby the hour field is only one digit. If I change that to two digits, it’s perfect. Also
“Make_My_Body_Younger_Series_2_-_Bianca_Gascoigne” has a slightly different issue, whereby the millisecond field is only two digits in stead of three: 00:00:02,00 –> 00:00:07,08
I’m really not sure if there’s anything you can do about this, but I thought it would be helpful if you knew about this.
Only a very slight and minor issue for me really and I fully appreciate what you have done with this tool. Great work! Thanks!
BTW: Just found a tool from http://www.nikse.dk/se/ where I can load the Beeps SRT and it will convert it in the proper format. A workaround for now!
Well done! I really couldn’t see that bug! Now we have nn:nn:nn,nnn format regardless. I’ve released 1.90 with that bugfix in it.
Just passing on a ‘thank you very much’ for an excellent program.
I am using it on Ubuntu 9.10 with both the JavaFX GUI and/or the kommander GUI and it works flawlessly.
Yes, the subtitles can be out of sync, but this is very quickly connected using gnome subtitles.
Well done for your excellent work.
The out-of-sync subtitles problem only seems to affect iphone (and maybe n95*) modes as they are from BBC redux and not the usual playout feed used by the rtmp/flash modes.