MusicPiped icon indicating copy to clipboard operation
MusicPiped copied to clipboard

Implement prefetch/cache to reduce fetch gap between playback

Open NickAcPT opened this issue 5 years ago • 5 comments

Most of the time, the app takes some time to download the audio and start playing it.

I can't seem to reliably get some benchmarks on it, but is there a way to accelerate this and start playing the audio as soon as possible?

I understand this might be a limitation put by YouTube.

Also, sorry for bothering with small details like this.

NickAcPT avatar Mar 20 '19 17:03 NickAcPT

If you mean fetching a audio for first time before it's cached, i.e from search.. then yeah that's slow. It currently gets all data from invidious for each selected track one by one. Main bottleneck here seems to be lots of request to invidious. In coming version there r plan to allow choosing invidious instance to use, some instance might give faster result.

deep-gaurav avatar Mar 20 '19 21:03 deep-gaurav

I think the best that can be done is precache/fetch song before first ends,. I'll change topic to keep me reminded

deep-gaurav avatar May 04 '19 17:05 deep-gaurav

According to https://github.com/deep-gaurav/MusicPiped/issues/35#issuecomment-460745464, it looks like the play store version is 'stuck' and 'frozen in time'. Would it be possible to make it so there's an option to fetch information directly through YouTube with https://github.com/TeamNewPipe/NewPipeExtractor?

Thanks for your efforts on this app.

NickAcPT avatar May 04 '19 19:05 NickAcPT

@NickAcPT that comment was when play store blocked me from updating app, it's now fine, infact play store version just received v1.2.0 update,

And I'm not sure what you mean by fetch information directly through YouTube with NewPipe Extractor.. That's exactly what app does from beginning and is still doing, although instead of newpipe extractor it uses Invidious API first, since it gives more data, newpipe extractor is used later on when url initially fetched is nolonger valid and we need new stream url.

deep-gaurav avatar May 04 '19 19:05 deep-gaurav

Oh. That makes sense. Thanks for the explanation.

NickAcPT avatar May 04 '19 19:05 NickAcPT