View Single Post
  #381  
Old 05-26-2016, 12:34 PM
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 xNuno View Post
Hi,

loops or repeated stuff on the player...

One thing that I did was to limit parallel connections to 1 only, this reduced the problem a lot but is not mitigated yet.


Best Regards,
Nuno
I have added Loginfo() info-text "here and there" to figure out simialr problems.
Most important to see how the script starts new fragment-downloads and when they are "done and used" (and then update bootstrap to get the new ones)
eight parallell downloads seem to run into the problem that the new next ones are not checked for until all old 8 have "arrived safely".
Some servers dont even keep 8 fragments buffered?

But getting the fragments "one-by-one" with check for new ones inbetween for every fragment wastes a lot of bandwith.

Missed fragments trigger "TImeSTamp fix" when decoding the fragments (or earlier), same for "negative timestamps"

Picking two added info-beeps as example, because I have butchered the script too much to post proper patches
As an example, LogDebug to LogInfo and ring the bell when happens (might be only every fifth hour)

if ($timeShift > $this->fixWindow)
{
echo chr(7); // ring bell
LogInfo("Timestamp gap detected: PacketTS=" . $packetTS . " LastTS=" . $lastTS . " Timeshift=" . $timeShift, $debug);
usleep(100000);
echo chr(7); // and anoher bell
if ($this->baseTS < $packetTS)
$this->baseTS += $timeShift - FRAMEFIX_STEP;
else
$this->baseTS = $timeShift - FRAMEFIX_STEP;
$packetTS = $fixedTS;
}

//--- missed fragment, decoder will have missed 2-6-12 seconds
// note, the audio stream is the "master" for timing

else
{
$this->lastFrag += 1; // bitch and scream
LogInfo("*************** Skipping failed fragment **********" . $this->lastFrag);
echo chr(7); usleep(10000);
LogInfo("*************** XXXXXXXXXXXXXXXXXXXXXXXX **********" . $this->lastFrag);
echo chr(7); usleep(10000);

Gunnar

PS should be some simple argument for debugging, giving info on just

- manifest, bootstrap missed
- how many parallell fragments it tries to download
- BITCH and SCREAM when missing fragments, timestamps,etc

hmm, a test for how many fragments the server actually keeps buffered (something Im halfdone with, but no need to attack it again)

If server only keeps 4-6, using 8 parallell downloads kills the whole thing because script doesnt check for new ones in time,.
Reply With Quote