[DONE] Add option to make get_iplayer fail over if segment cannot be downloaded
#1
Recently I have had a spate of 'WARNING: Segment not found' errors in hlslhd mode. The resulting files are not really usable due to audio sync issues. 
It would be good if there was an option to allow get_iplayer to abort if one of these errors was encountered to prevent download continuing (as the resulting file is not usable).
#2
Already planned for next release, and it won't be optional. Missing segments don't per se mean a file is unusable (assuming you don't mind a few seconds missing). However, since the same problem manifests with the garbage files the BBC has been producing this week, it will be an error instead of a warning and treated as a failed download. The only exception will be if the final segment of a radio programme appears to be missing. Some programmes have bad manifests with a segment list that is off by one.
#3
That sounds good, I originally didn't think missing a segment would be much of a problem until the recent spate of 'garbage' (as you succinctly put it).
#4
I'm having the same problem (i.e. as described here: http://lists.infradead.org/pipermail/get...09373.html ) except that in my case I'm fairly certain the cause is my iffy Internet connection

So, rather than requesting the "add option to abort if segment not found" - I would hope for a 'pause and retry getting the missing segment (once or maybe twice more only) before continuing' option. And making it a default feature would probably be better than making it available as an option.
#5
RE: Already planned for next release, and it won't be optional. Missing segments don't per se mean a file is unusable (assuming you don't mind a few seconds missing).

Yes, that's been my experience (Missing segments don't per se mean a file is unusable) and I can put up with a few missing seconds - provided the remaining / next parts of the file aren't ruined by being out of sync. That's also been my experience, i.e. seeing 2 or 3 missing segments reported and then finding that the downloaded file can be viewed ok but is ruined by being badly out of sync from some point on.

If the solution planned for the next release is to have the download abort when there is a missing segment, would it be possible to make "start downloading again from the beginning" the default - rather than requiring the user to discover the failure and enter a restart?

(As mentioned earlier, I think the best solution of all would be if the response to a missing segment was to pause and try getting the segment again - maybe 2 or 3 times - and aborting and restarting only if the retry failed).
#6
Quote:[color=#333333][size=medium]If the solution planned for the next release is to have the download abort when there is a missing segment, would it be possible to make "start downloading again from the beginning" the default - rather than requiring the user to discover the failure and enter a restart?[/size][/color]

[color=#333333][size=medium](As mentioned earlier, I think the best solution of all would be if the response to a missing segment was to pause and try getting the segment again - maybe 2 or 3 times - and aborting and restarting only if the retry failed).[/size][/color]

I prefer the way that has already been implemented in the development version, if a segment cannot be retrieved then the download errors and fails over to the next mode specified. I don't want to download nearly 1 gB get a "Segment missing error" near the end, download it all again just to have the same thing happen!
I very much doubt the segment errors you are seeing are anything to do with your internet connection, these are http downloads after all, not streams. Does your browser miss out pages when you are surfing the web?
#7
(13-08-2016, 03:59 AM)rodf Wrote: If the solution planned for the next release is to have the download abort when there is a missing segment, would it be possible to make "start downloading again from the beginning" the default - rather than requiring the user to discover the failure and enter a restart?
No chance. "Segment not found" means it doesn't exist on the server. It cannot be recovered by get_iplayer.
(13-08-2016, 06:55 AM)errfmt Wrote: I very much doubt the segment errors you are seeing are anything to do with your internet connection, these are http downloads after all, not streams. Does your browser miss out pages when you are surfing the web?
"Segment not found" has nothing to do with your internet connection, but you may also receive "Failed to download segment" warnings. Those could be the by-product of a flakey connection, but they could just as easily be due to some problem with upstream connectivity, a problem on your machine, server timeouts, or any number of other things. There is nothing that get_iplayer can do about such problems. Failed segment downloads are retried twice.
#8
How about an option to make get_iplayer try the next mode in the comma separated list of modes when segment cannot be downloaded is detected.
#9
(14-08-2016, 01:34 PM)robcamstone Wrote: How about an option to make get_iplayer try the next mode in the comma separated list of modes when segment cannot be downloaded is detected.

Since commit 1564276 on the development version, that is exactly what get_iplayer does:

get_iplayer Output:

Matches:
2344: Versailles - Episode 10, BBC Two, b07p0q0j

INFO: 1 Matching Programmes
INFO: Checking existence of original version
INFO: hlshd1,flashhd1,flashhd1 modes will be tried for version original
INFO: Trying hlshd1 mode to record tv: Versailles - 10. Episode 10
INFO: File name prefix = Versailles_-_10._Episode_10_b07p0q0j_original                  
INFO: Begin recording file: D:\get_iplayer_temp\Versailles_-_10._Episode_10_b07p0q0j_original.partial.mp4.ts

ERROR: Segment not found (3)
http://cp401489-vh.akamaihd.net/i/iplaye...t3_2_av.ts
ERROR: Download aborted at 20 secs in programme
INFO: skipping hlshd1 mode
INFO: Trying flashhd1 mode to record tv: Versailles - 10. Episode 10
INFO: File name prefix = Versailles_-_10._Episode_10_b07p0q0j_original                  
INFO: Begin recording file: D:\get_iplayer_temp\Versailles_-_10._Episode_10_b07p0q0j_original.partial.mp4.flv
RTMPDump v2.4-102-ga3a600d-get_iplayer
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
It is also probably worth noting that the TV hls recording modes have been removed completely in commit 78e253d as they have become unreliable, quote 'left to rot'.
#10
(14-08-2016, 08:21 PM)errfmt Wrote:
(14-08-2016, 01:34 PM)robcamstone Wrote: How about an option to make get_iplayer try the next mode in the comma separated list of modes when segment cannot be downloaded is detected.

Since commit 1564276 on the development version, that is exactly what get_iplayer does.

That's great for developers, do we have an ETA on when it will be implemented for all users?

I'll also like to thank all that have worked to keep the get_iplayer project going over the years.
#11
See this link https://squarepenguin.co.uk/wiki/gipdev/ if you want to see how to use the development version ahead of general release.
Usual caveats:
If you don't understand the instructions DON'T install it.
There is NO support for the development version on this forum.

Tip: Search forum using keyword: development to see lots of other posts relating to using the development version.

Only Dinky will know the ETA of the next general release.


Possibly Related Threads…
Thread Author Replies Views Last Post
  [DONE]  Make --type work with --pid-recursive GrahamCobb 4 1,314 14-07-2019, 02:25 AM
Last Post: dinky