Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't control live DASH stream download duration (Exoplayer offline features) #3949

Closed
kvillnv opened this issue Mar 6, 2018 · 1 comment
Assignees

Comments

@kvillnv
Copy link

kvillnv commented Mar 6, 2018

Hi,
I am working with the latest commits from dev-v2, my device runs Nougat.
I have no errors in my logs and no bugs.
I've been working for a while on Exoplayer with live streams playback (DASH with DRM Widevine encryption).

Now I am working on downloading live stream.
I was able to successfully download with DashDownloader and play my file with a DrmSession, but the problem is that the downloaded content is always 59sec. (and the Downloader.ProgressListener went up to 100%)
-I suppose it just downloads the segments from the cached manifest or buffered stream.
-I can not set any parameters about duration.
-I tried using ProgressiveDownloader as well, (it seems this class is not finished) and I am having the same result, except that the ProgressListener is not accurate.
-(the download output is a lot of small *.exo files and one *.exi)

I started by following the example:

SimpleCache cache = new SimpleCache(mediaFolder, new NoOpCacheEvictor()); DefaultHttpDataSourceFactory factory = new DefaultHttpDataSourceFactory(userAgent); DownloaderConstructorHelper constructorHelper = new DownloaderConstructorHelper(cache, factory); DashDownloader dashDownloader = new DashDownloader(uri, constructorHelper); //dashDownloader.selectRepresentations(new RepresentationKey[] {new RepresentationKey(0, 0, 0)}); dashDownloader.download(new ProgressListener() { {@literal @}Override public void onDownloadProgress(Downloader downloader, float downloadPercentage, long downloadedBytes) { // Here I just Log the progression } });

I didn't use the dashDownload.selectRepresentations()

Of course my source is fine: if I play the Live Dash Uri in Exoplayer, it never stops.

Did anybody have success trying to keep downloading a live stream for an undefined time and manually stop it? or set a download duration? or maybe manage to set the Downloader do relaunch for each buffered data?

Or could you give me a hint on what objects and methods I should be using?
And why using SimpleCache?

Any help would be appreciated.
Thanks.

(By the way I have another question, it is about the DownloadManager: I was not able to use it, I think my issue is with the Deserializer, How should I initialize it? Can you show me an example)

@ojw28
Copy link
Contributor

ojw28 commented Mar 7, 2018

We do not support downloading live streams, so if you want this functionality you'd currently need to build it yourself, I'm afraid. Supporting this use case is tracked by #3877.

@ojw28 ojw28 closed this as completed Mar 7, 2018
@ojw28 ojw28 added the duplicate label Mar 7, 2018
@google google locked and limited conversation to collaborators Aug 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants