View Single Post
  #379  
Old 05-26-2016, 11:30 AM
Gunnar Gunnar is offline
Junior Member
 
Join Date: Oct 2015
Posts: 8
Gunnar is on a distinguished road
Default

Re: Adobe HDS Downloader


Quote:
Originally Posted by Gbry View Post
Hi guys,
is it possible to increase the "updating bootstrap info:...." attempts?

Seems to me that after the second one, HDS stop to record.
Yes, same for me, fixed it by adding retries to the script, something like this, search for "$status = $cc->get($bootstrapUrl)", around line 1111? in my abused script

Also added Loginfo text plus beeps (only php-sound easily available is the Bell character for an old console, with delay inbetween)

That is, inserted 2 retries with beeps and delays, straight inline-code without any counter counting the retries.
$cc->get() is the one doing the download.
$status as 200 hex means OK, alll others different kind of problems.

First and last lines unchanged, add, insert the rest.
php.exe complains at reading the script if obvious splelling,etc errors.

$bootstrapPos = 0;
LogInfo("\n STARTSTART Updating bootstrap info, Available fragments: " . $this->fragCount);
$status = $cc->get($bootstrapUrl);
LogInfo("GOT Status: " . $status );
if ($status != 200) {
LogInfo("\n 1111Failed to refresh bootstrap info, Status: " . $status . $bootstrapUrl);
echo chr(7); usleep(10000);
echo chr(7);

$status = $cc->get($bootstrapUrl);
if ($status != 200) {
LogInfo("\n 22222Failed to refresh bootstrap info, Status: " . $status . $bootstrapUrl, true);
$status = $cc->get($bootstrapUrl);
echo chr(7); usleep(10000);
echo chr(7); usleep(10000);
echo chr(7); usleep(10000);

}
}
$bootstrapInfo = $cc->response;
ReadBoxHeader($bootstrapInfo, $bootstrapPos, $boxType, $boxSize);


Gunnar

PS Watch out with the LogError code, changed most of them as they print the error and exits, no retries.
Change them to Loginfo

PPS This helped a lot on capturing live streams, especially when also running torrents or "Cptr doing too much"
Now runs for days without this error-exit, When problems getting fragments just a matter of 6-12s of stream missing

PPPS I have also added beep-info-alerts to missed fragments, TimeStamps getting fixed or negative.
Next will be "warning-beep" when script has launched close to the default 8 simultaneus, parallel "get-fragments", a sign the connection is too slow (Need to slow down other downloads or similar).
2-3 parallel downloads means evrthng is OK for my live streams, some live streams seem to buffer only 7-8 fragments, others more.
(for archived streams I use two parallels going, enough to get full speed with no pauses inbetween)
Reply With Quote