Re: Downloading Subtitles

2018-10-08 Thread RS

On 08/10/18 10:22, I wrote:



That is not quite the whole story.  There were a few programmes whose 
subtitle XML files (TTML?) were corrupt.  They included some NUL 
characters and, I am told, NUL is not a valid character in XML.


The code was changed to ignore NUL characters.  As an additional measure 
downloading of subtitles was delayed until the end to reduce the risk 
that errors in subtitles could cause the whole download to fail.




I haven't got it quite right either.  The 3.07 release notes say,

"Fixed a bug that caused get_iplayer to exit (and skip metadata tagging) 
when corrupt subtitles were provided by the BBC. Corrupt subtitles will 
now generate an error message, but get_iplayer will not exit. As an 
extra precaution, subtitles download now occurs after tagging is complete."


They also say,

"Subtitles are now trimmed according to --start and --stop, if 
specified. The actual subtitles start and/or stop times are calculated 
to the nearest chunk boundary in the HLS or DASH stream. The value of 
--suboffset is still applied. This trimming is not supported for 
--subtitles-only. You can use --subtitles-only to re-download the full 
subtitles for a programme if desired. (@notnac)"


I am guessing, but it is possible that a change in download order was 
needed to implement that.


The 3.09 release notes say,

"Null characters are now removed from subtitles before processing. This 
should prevent at least some problems caused by corrupt subtitle files. 
(@notnac)"


Best wishes
Richard



___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles

2018-10-08 Thread CJB
Thank Alan and everyone else.

This did it

get_iplayer --subtitles-only --pid b0bkvw2l

Huh - never could get used to the Ozzie accent!!!

Cheers - Chris B.

On 08/10/2018, Alan Milewczyk  wrote:
> On 08/10/2018 00:32, Alan Milewczyk wrote:
>> On 08/10/2018 00:05, CJB wrote:
>>> Please - is there a way of downloading subtitles after the respective
>>> video file has been downloaded? The latter file is a large one and I
>>> don't wont to download it again. But trying to watch the video the
>>> sound is not clear. The pid is b0bkvw2l BTW. Many thanks. Chris B.
>>>
>>> ___
>>> get_iplayer mailing list
>>> get_iplayer@lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/get_iplayer
>>>
>> |The following will do the job: get_iplayer --subtitles-only |pid
>> b0bkvw2l
>>
>
> Don't know what happened there. it should have read:
> get_iplayer --subtitles-only --pid b0bkvw2l
>
> A
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>
> ___
> get_iplayer mailing list
> get_iplayer@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/get_iplayer
>

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles

2018-10-08 Thread RS

On 08/10/18 03:02, Vangelis forthnet wrote:

On Mon Oct 8 00:18:40 BST 2018, Peter S Kirk wrote:


Until recently, subtitles were downloaded first
thus get_i pvr could be stopped once done.

Now they are downloaded after video. Why?


... Because the powers that be (i.e. the one and only
person still maintaining the code of GiP) decreed so:

https://github.com/get-iplayer/get_iplayer/commit/35d8e7b4d23815b85937727868bd9364ae829f0a 



The logic behind that change appears to be

# Get subtitles if they exist and are required and media download 
succeeded


i.e. the author ASSUMES you wouldn't want the subs
(only) if the actual media download failed...

The status quo ante was:


# Get subtitles if they exist and are required
# best to do this before streaming file so that the subtitles can be 
enjoyed while recording progresses




Hi Vangelis

That is not quite the whole story.  There were a few programmes whose 
subtitle XML files (TTML?) were corrupt.  They included some NUL 
characters and, I am told, NUL is not a valid character in XML.


The code was changed to ignore NUL characters.  As an additional measure 
downloading of subtitles was delayed until the end to reduce the risk 
that errors in subtitles could cause the whole download to fail.


Best wishes
Richard


___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles

2018-10-08 Thread RS

From: chrisjbr...@gmail.com
Sent: 8 October 2018 00:05
To: get_iplayer@lists.infradead.org
Subject: Downloading Subtitles

Please - is there a way of downloading subtitles after the respective
video file has been downloaded? The latter file is a large one and I
don't wont to download it again. But trying to watch the video the
sound is not clear. The pid is b0bkvw2l BTW. Many thanks. Chris B.


Try
--subtitles-only

See
https://github.com/get-iplayer/get_iplayer/wiki/subtitles



___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles

2018-10-08 Thread Mark Carroll
On 08 Oct 2018, Alan Milewczyk wrote:

> Don't know what happened there. it should have read:
> get_iplayer --subtitles-only --pid b0bkvw2l

That's how I do it -- just yesterday afternoon in fact. Took me a while
because I forgot to check --long-help which is off where the option is
hiding.

-- Mark

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles

2018-10-07 Thread Alan Milewczyk

On 08/10/2018 00:32, Alan Milewczyk wrote:

On 08/10/2018 00:05, CJB wrote:

Please - is there a way of downloading subtitles after the respective
video file has been downloaded? The latter file is a large one and I
don't wont to download it again. But trying to watch the video the
sound is not clear. The pid is b0bkvw2l BTW. Many thanks. Chris B.

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer

|The following will do the job: get_iplayer --subtitles-only |pid 
b0bkvw2l




Don't know what happened there. it should have read:
get_iplayer --subtitles-only --pid b0bkvw2l

A

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles

2018-10-07 Thread Vangelis forthnet

On Mon, 8 Oct 2018 00:24:29 BST, Ray Penn wrote:


I always used to make use of the
--subsonly
option.
Does that still work?


On Mon, Oct 8 00:41:00 BST 2018, J K.Eason wrote:


but there's no mention of --subsonly
on the page I linked to. I assume
it's been superseded by
--subtitles-only.


According to

https://github.com/get-iplayer/get_iplayer/blob/57ac0a5b92c926277d53d591e0d46659321583e2/get_iplayer#L144

--subsonly should still be valid!

(As should be

--subtitlesonly
--subs-only )

Best regards,
V. 



___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles

2018-10-07 Thread Vangelis forthnet

On Mon Oct 8 00:18:40 BST 2018, Peter S Kirk wrote:


Until recently, subtitles were downloaded first
thus get_i pvr could be stopped once done.

Now they are downloaded after video. Why?


... Because the powers that be (i.e. the one and only
person still maintaining the code of GiP) decreed so:

https://github.com/get-iplayer/get_iplayer/commit/35d8e7b4d23815b85937727868bd9364ae829f0a

The logic behind that change appears to be

# Get subtitles if they exist and are required and media download 
succeeded


i.e. the author ASSUMES you wouldn't want the subs
(only) if the actual media download failed...

The status quo ante was:


# Get subtitles if they exist and are required
# best to do this before streaming file so that the subtitles can be 
enjoyed while recording progresses


In any case, even back when the subs were fetched
before media download completion, they still had
the ".partial.srt" suffix and that was only removed
when the video itself was fully dumped to file...

And it wasn't a "recent"change, 't was more than a year ago...
(... I couldn't help noticing the comment
to the aforelinked commit:

https://github.com/get-iplayer/get_iplayer/commit/35d8e7b4d23815b85937727868bd9364ae829f0a#commitcomment-25039704

which, of course, remains unanswered to this day...)

Best regards,
Vangelis. 



___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles

2018-10-07 Thread J K.Eason
I've never actually used subtitles, but there's no mention of --subsonly
on the page I linked to. I assume it's been superseded by
--subtitles-only.
Actually the link at
https://github.com/get-iplayer/get_iplayer/wiki/subtitles#examples
takes you straight to the Example section of that page. I posted the
wrong link in my first message although it does go to the correct page.

In case anyone wants to know how to actually use a separate subtitle
(.srt) file, the instructions for using one (in VLC) are here:
http://www.tomsguide.com/faq/id-1892893/srt-file-vlc-player.html

> *From:* Ray Penn 
> *To:* m...@john-eason.co.uk
> *Date:* Mon, 8 Oct 2018 00:24:29 +0100
> 
> I always used to make use of the
> 
> --subsonly
> 
> option.
> 
> Does that still work?

-- 
Regards
   John

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles

2018-10-07 Thread J K.Eason
 
> Please - is there a way of downloading subtitles after the 
> respective
> video file has been downloaded? The latter file is a large one and I
> don't wont to download it again. But trying to watch the video the
> sound is not clear. The pid is b0bkvw2l BTW. Many thanks. Chris B.

https://github.com/get-iplayer/get_iplayer/wiki/subtitles#raw

 Look under the Examples section.
-- 
Regards
   John

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles

2018-10-07 Thread Peter S Kirk
Until recently subtitles were downloaded first thus get_i pvr could be 
stopped once done.

Now they are downloaded after video. Why?

On 8 Oct 2018 at 0:08, Graham Temple Graham Temple 
 wrote:

> I've often wondered that
> 
> Graham Temple
> +44 (0)1502 533433
> +44 (0)7508 578446
> 
> 
>   Original Message  
> From: chrisjbr...@gmail.com
> Sent: 8 October 2018 00:05
> To: get_iplayer@lists.infradead.org
> Subject: Downloading Subtitles
> 
> Please - is there a way of downloading subtitles after the respective
> video file has been downloaded? The latter file is a large one and I
> don't wont to download it again. But trying to watch the video the
> sound is not clear. The pid is b0bkvw2l BTW. Many thanks. Chris B.
> 
> ___
> get_iplayer mailing list
> get_iplayer@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/get_iplayer
> ___
> get_iplayer mailing list
> get_iplayer@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/get_iplayer



___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles

2018-10-07 Thread Graham Temple
I've often wondered that

Graham Temple
+44 (0)1502 533433
+44 (0)7508 578446


  Original Message  
From: chrisjbr...@gmail.com
Sent: 8 October 2018 00:05
To: get_iplayer@lists.infradead.org
Subject: Downloading Subtitles

Please - is there a way of downloading subtitles after the respective
video file has been downloaded? The latter file is a large one and I
don't wont to download it again. But trying to watch the video the
sound is not clear. The pid is b0bkvw2l BTW. Many thanks. Chris B.

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer
___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles-Only

2013-01-11 Thread Kapitano

get_iplayer is working as intended.

The programme metadata used for searching
does not include any indicator of whether or
not a particular programme has subtitles.

I see, fair enough.

I'm actually trying to use BBC subtitles as a text corpus for linguisic 
analysis, and was hoping to avoid downloading duplicates. But if the 
metadata doesn't indicate subtitle presence, there's no (easy) way for 
GiP to keep track of which srt files have already been downloaded. I'll 
just use duplicate file removal software.


On a different note, can I ask why I don't get this list in my email - 
only on the infradead site? Or am I again missing that things are 
working as intended :-)?



___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Downloading Subtitles-Only

2013-01-10 Thread dinkypumpkin

On 10/01/2013 15:05, Kapitano wrote:

When I run this:

get_iplayer --type tv --subtitles-only --terse --search .*
--file-prefix=name - episode - dldate

...GiP doesn't just list what subtitles are available, it downloads the
srt files. And if I run it again, it downloads them again.

If I run it on different days, I get identical srt files with different
datestamps in the filenames. If I do that with only
--file-prefix=name - episode, it overwrites the previous downloads
without asking.

Is there a way to prevent all of these happening? Or am I missing
something incredibly obvious?


The only thing you're missing is that get_iplayer is working as 
intended.  From the man page:


--subtitles-only
  Only download the subtitles, not the programme

The --subtitles-only option means download only the subtitles for the 
programmes which match the search condition or programme ID.  You can't 
search for only those programmes which have subtitles.  The programme 
metadata used for searching does not include any indicator of whether or 
not a particular programme has subtitles.  To get that information 
requires retrieving the stream information for each programme, which 
would mean another ~1000 web requests for BBC TV, 3000+ for BBC radio - 
not practical or efficient.  Instead, you just add the --subtitles 
option to --get or --pid and get_iplayer will grab the subtitles if they 
exist.  The --subtitles-only option effectively works the same way.





___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer