InnerTune
InnerTune copied to clipboard
Download speed is slow
Firstly, thank you for the app. This is exactly what i was looking for from a long time.
When i download a song, where is it getting saved, or is it getting saved anywhere at all, as i am not able to locate the file on my phone. Also download takes a while, which surprises me as newpipe extractor should not be taking that long.
The song is saved in the app-specific external files directory. You'll see them in (/Android/data/com.zionhuang.music/files/media), and the filename is the hash of the song id. How users can receive the files are in the roadmap. Possibly providing a share option in the three-dots song menu and implementing a DocumentProvider. Some ideas are mentioned in #3.
The app uses Android DownloadManager to download files. I also experienced a slow download speed. It shouldn't be that slow, but there seems to be no method to tweak that. I'll implement a custom downloader instead. It should be faster.
I might make a PR for this soon
Oh yeah, thank you for this app, it is exactly what I wanted, I had been planning to make an app like this but I then discovered your app.
Much thanks!
Have you try the debug APK in feature/innertube branch? Things has changed a lot.
I haven't taken a look at the code/branches yet, so no
From your reply I guess the downloads are faster now? Great
From your reply I guess the downloads are faster now?
No, I haven't fixed.
From your reply I guess the downloads are faster now?
No, I haven't fixed.
How about this library https://github.com/lingochamp/FileDownloader
Or https://github.com/LagradOst/Aria2cButton
A friend made it so I couldn't hold back and not share it.
It uses aria2 to do the downloads. And you may already know, but aria2 is super fast.
I haven't spent time on this, so I can't say too much. Maybe eventually I need to write my own library for it, which will take massive time. However, I don't prefer aria2 because it is a command line tool and needs a wrapper to make it a java library.
I haven't spent time on this, so I can't say too much. Maybe eventually I need to write my own library for it, which will take massive time. However, I don't prefer aria2 because it is a command line tool and needs a wrapper to make it a java library.
Yes, I sent a library that wraps the json rpc aria has.
I mean the interface may not be rich. Say, it doesn't support proxy.
aria2's json rpc has everything accessible via the CLI and much more
Extending the wrapper to support proxies won't be that hard.
I don't think so. In short, it lacks flexibility.
What?
How does it lack flexibility? And if you can't be arsed to read the code in order to add proxy support, here are the two places you need to modify so you can use proxies with aria2: AbstractClient.kt#L366-L395 and Aria2Classes.kt#L36-L106
Then I'll use other libraries or write one for my own instead. Communicating with a layer of json rpc just looks ugly for me. Also, the file size of a song is roughly 3~5MB. We don't really need a super fast downloader.
Then I'll use other libraries or write one for my own instead. Communicating with a layer of json rpc just looks ugly for me. Also, the file size of a song is roughly 3~5MB. We don't really need a super fast downloader.
The current downloader is capped at 80kb/s, I don't know why, might be because it is using a single connection for each download
The fact is that you will die if you want to download your entire library...and a fast downloader is a must
The slow download speed is caused by YouTube's throttling.
If you want to download YouTube streams at full speed, you have to make it look like you are streaming. Download the file in chunks with a maximum size of 10MB and specify the chunk size either using the Range header or the &range=0-10000000 url parameter.
If you use the Range header, YouTube will send you a Content-Range header back, from which you can extract the total file size and figure out, how many more chunks need to be downloaded.
If you are using the URL parameter method (which is used by the YouTube web player), you need to know the total file size beforehand. It can be extracted from YouTube's player response and it is included in the stream URL as well (clen parameter).
You can use concurrent connections to download multiple chunks at a time, but that is optional. Most music tracks are smaller than 10MB anyway, so they can be downloaded in just 1 chunk.
Adding a bit of randomness to the chunk size is good style, yt-dlp does it too, but I dont know if it is really necessary.
@Theta-Dev Is there a way to somehow speed up the download speed or bypass the throttling somehow? 🤔
Also you can add to the auto download feature, that it only downloads when wifi is available
@Theta-Dev Is there a way to somehow speed up the download speed or bypass the throttling somehow? 🤔
Found a way to do speed up
- Download any song
- Pause the download in notification
- Resume it
- Download is faster than before (2 MB/s for me) This is working for me, I'm not sure is it work for th others, but you can try to reproduce it
@Theta-Dev Is there a way to somehow speed up the download speed or bypass the throttling somehow? 🤔
Found a way to do speed up
- Download any song
- Pause the download in notification
- Resume it
- Download is faster than before (2 MB/s for me) This is working for me, I'm not sure is it work for th others, but you can try to reproduce it
https://user-images.githubusercontent.com/50188628/219656348-5f267ec2-6976-4fdf-b641-f676bbaa87da.mp4
@Theta-Dev Is there a way to somehow speed up the download speed or bypass the throttling somehow? 🤔
Found a way to do speed up
- Download any song
- Pause the download in notification
- Resume it
- Download is faster than before (2 MB/s for me) This is working for me, I'm not sure is it work for th others, but you can try to reproduce it
https://user-images.githubusercontent.com/50188628/219656348-5f267ec2-6976-4fdf-b641-f676bbaa87da.mp4
I don't have the option to pause the downloads
In the latest debug version, The download speed was improved, but only works for <10min songs, it's still slow to download the songs which are longer than 10min
https://github.com/z-huang/InnerTune/assets/50188628/253edf98-af0a-4867-9e6c-88b99bf403a6