Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   rtmpdump (http://stream-recorder.com/forum/forumdisplay.php?f=54)
-   -  

Adobe HDS Downloader

(http://stream-recorder.com/forum/showthread.php?t=14823)

Gunnar 05-26-2016 12:34 PM

Re: Adobe HDS Downloader


 
Quote:

Originally Posted by xNuno (Post 84488)
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,.

joejones15 05-26-2016 05:23 PM

Re: Adobe HDS Downloader


 
Quote:

Originally Posted by Gunnar (Post 84500)
From my Finland YLE (BBC) experience the script and detector (together) can do some encrypted streams.

That is, when it "works" there is a lot of --author, etc and cookie, etc arguments added (by HDS detector plugin frm web page) needed for the script to get the (one) encryption syst recently added.
(for garbage US action series so have not bothered checking in detail)

The (humongous) link also needs to be used within some 30-60seconds or "cant access Key"

Gunnar

PS That is, your command line didnt include any of the "humongous stuff"

Thanks Gunnar, I was using detector and after the change sit did not find the "humongous link" anymore. Should I attempt manually based on what I see listed under developer->network view?

xNuno 05-27-2016 04:24 AM

Re: Adobe HDS Downloader


 
Quote:

Originally Posted by Gunnar (Post 84502)
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,.

Thanks! It's not possible to dont allow VLC to play the repeated fragment?

Manual 05-27-2016 12:40 PM

Re: Adobe HDS Downloader


 
Does anyone know if it's possible to decrypt Adobe HDS with provided key file and how?

zapac 05-30-2016 10:35 AM

Re: Adobe HDS Downloader


 
hi I need a way to compress a 1080p mp4 video file to store. but at same I need a way to decompress it to get orignal video quality and size (Just like a paper we fold a paper to take smaller size.and unfold it to make it original in size) same I need to do with a video hope you understand plzz reply

Quaraxkad 05-31-2016 08:22 AM

Re: Adobe HDS Downloader


 
Quote:

Originally Posted by zapac (Post 84563)
hi I need a way to compress a 1080p mp4 video file to store. but at same I need a way to decompress it to get orignal video quality and size (Just like a paper we fold a paper to take smaller size.and unfold it to make it original in size) same I need to do with a video hope you understand plzz reply

This is impossible. If you want to compress a video, you will lose quality and can not "decompress" back to original quality.

zapac 05-31-2016 09:42 AM

Re: Adobe HDS Downloader


 
Quote:

Originally Posted by Quaraxkad (Post 84575)
This is impossible. If you want to compress a video, you will lose quality and can not "decompress" back to original quality.

ok...can I reduce video resolution without loosing quality (eg: 1080p to 360)

Quaraxkad 06-01-2016 08:05 AM

Re: Adobe HDS Downloader


 
Quote:

Originally Posted by zapac (Post 84576)
ok...can I reduce video resolution without loosing quality (eg: 1080p to 360)

No, of course not. Think about it. If that was possible, why would there ever be a need for higher resolutions in the first place?

Liphtier 06-19-2016 04:23 AM

Re: Adobe HDS Downloader


 
Hello!

Is it possible with HDS format to get the final movie file size when starting the download.

AFAIU, it should be in the moov box in the bootstrap. I have checked several videos on moonwalk.cc and apollocdn.cc like sites and there's no moov box in their bootstraps. Only abst, asrt and afrt boxes.

here's sample bootstrap and metadata tags from the manifest
http://pastebin.com/0f9zVL25

May be they remove it for some reason? Or am I missing something? Or may be the file size could be read by some other means

It may be useful to add the AdobeHDS.php script ability to stream the video being downloaded to the DLNA renderer device, however it is not possible without knowing the final file size - cause it should be specified in Content-Length header of HTTP response serving the file for DLNA. Of course we could wait till the download is finished before starting DLNA - but it is not a solution, just a compromise.

KSV 06-20-2016 10:01 AM

Re: Adobe HDS Downloader


 
@Liphtier

You won't find 'moov' box in client side fragments. it's not possible to accurately know the filesize before all fragments are downloaded and decoded. some websites do inject the same in metadata stored in bootstrap file but it's not necessary that the final filesize generated after decoding will match that. why don't you just try sending an arbitrary large size like some major CDN's do. for example Akamai HD streaming (over plain http) sends 2 GB as content-length header although the actual video data is normally larger or smaller than that.


All times are GMT -6. The time now is 12:43 PM.