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

Cache HLS, Dash or SmoothStreaming? #19

Closed
nano92 opened this issue Sep 28, 2015 · 11 comments
Closed

Cache HLS, Dash or SmoothStreaming? #19

nano92 opened this issue Sep 28, 2015 · 11 comments
Labels

Comments

@nano92
Copy link

nano92 commented Sep 28, 2015

Hello, I was wondering if I can implement your library to cache HLS videos. Since it is written in the description that it can add caching support to ExoPlayer, I wanted to know if it was possible. thanks!

@danikula
Copy link
Owner

@nano92 ExoPlayer hasn't native support for caching direct links. That is why you can use AndroidVideoCache for ExoPlayer. But ExoPlayer has great native support for HLS, SmoothStreaming, Dash. There is no reason to implement it in AndroidVideoCache.

@nano92
Copy link
Author

nano92 commented Sep 29, 2015

I was trying to cache a HLS video using your library but it can't seem to work. I have implemented the ExoPlayer on my application to play videos. Maybe I'm using wrong your library. Have you tried to cache HLS videos being played by ExoPlayer?

@danikula
Copy link
Owner

It is impossible to use library for any adaptive streaming technology. You can use it only for direct links on video file. For adaptive streaming use ExoPlayer.

@nano92
Copy link
Author

nano92 commented Sep 29, 2015

I cannot cache HLS video with ExoPlayer, I was hoping to use your library for that purpose

@danikula
Copy link
Owner

It is totally impossible.

@nano92
Copy link
Author

nano92 commented Sep 29, 2015

Oh well, thank you!

@danikula
Copy link
Owner

AndroidVideoCache is pretty simple. It downloads video file from direct link and saves it as file on a disc. Any streaming protocol is more complex than 'file on internet'. Streaming servers divides file on chunks with different quality , describes them in special metadata and provides these chunks depends on internet channel. Obviously it is possible to implement caching (exoPlayer can) but it will has complex implementation. But I wanna keep my library as simple as possible. The second reason why I don't want implement caching for streaming is that has beean already implemented by Google in exoPlayer.

@ojw28
Copy link

ojw28 commented Apr 3, 2017

It's worth noting that ExoPlayer does now provide support for caching "file on internet" type media.

@danikula
Copy link
Owner

danikula commented Apr 3, 2017

@ojw28 can you provide proof link?

@ojw28
Copy link

ojw28 commented Apr 3, 2017

Support was added in google/ExoPlayer@bd7be1b.
If you hook a CacheDataSource into the DataSource request chain it should "just work".

There's ongoing work/improvements being made to ExoPlayer's caching layer in general:
https://github.com/google/ExoPlayer/commits/dev-v2/library/src/main/java/com/google/android/exoplayer2/upstream/cache

@danikula
Copy link
Owner

danikula commented Apr 3, 2017

@ojw28 really good news. Thanks. I think it should be mentioned in README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants