Comments (9)
Comment by plietar
Friday Mar 17, 2017 at 14:37 GMT
Interesting, I never really considered very large tracks.
librespot doesn't load the whole song into RAM, but it downloads it into /tmp
, which may be the same thing if that is mounted as a tmpfs.
As a temporary workaround, you can change this line from NamedTempFile::new()
to NamedTempFile::new_in("/somewhere/not/in/ram")
.
Ideally, if a cache directory is specified we can just use $CACHE/temp
automatically for that.
from librespot.
Comment by joerg-krause
Friday Mar 17, 2017 at 17:52 GMT
Thanks, I will try this. In fact, this track is an extreme. It my also happen for tracks having a length of six or seven minutes, depending on the free RAM left.
from librespot.
Comment by joerg-krause
Thursday Mar 23, 2017 at 12:10 GMT
On second thought, my system is NAND flash based. So, using anything else than the RAM for caching is not a good idea. So, I need a bigger RAM?
from librespot.
Comment by plietar
Thursday Mar 23, 2017 at 13:25 GMT
Pretty much. A solution would be to change librespot
to break up the files in blocks of say 500KB, and delete them automatically (if cache is disabled) once it has moved on to the next one. This is a large-ish change, so it's unlikely I'll be able to implement it anytime soon unfortunately.
from librespot.
Comment by michaelherger
Tuesday May 02, 2017 at 04:33 GMT
I've modified librespot to disable the audio file-cache. See pull request #181.
from librespot.
The final PR for this was closed. See here.
from librespot.
This is different from plietar/librespot#204. The issue here is that librespot tries to download the entire file (whether or not cache is enabled), which may be impossible for long tracks and low memory devices.
from librespot.
Yep, I had to learn this the hard way: though I had the audio-cache disabled I still saw people with large files in TMPDIR. In my case I was able to work around this using the method mentioned by @plietar: have librespot write to some place outside in-memory storage. Setting TMPDIR=/path/to/folder librespot ...
does the trick here.
from librespot.
given that all spotify songs are downloaded in chunks, is there an easy way to discard chunks once they have been played when the cache is disabled?
from librespot.
Related Issues (20)
- Librespot starts spamming the new status of the song HOT 5
- "Connection reset by peer" - possible solution HOT 4
- the trait bound `&url::Url: IntoClientRequest` is not satisfied HOT 3
- player.await_end_of_track exit with exit code: 1
- Tidal Connect HOT 1
- Authentication failures HOT 125
- add logging hint to check the source sample rate on buffer underruns HOT 3
- "Too many errors" HOT 2
- Discovery server immediately shuts down after starting, no visible error HOT 1
- AudioFiles not available for some tracks HOT 5
- Possible ratelimiting introduced by Spotify HOT 19
- Updating docs for struct fields HOT 1
- Playback failures HOT 1
- Unable to load encrypted file: ChannelError HOT 37
- Version 5 dev (2ea7436) --initial-volume 0 results in full volume HOT 4
- Build failures caused by nasm HOT 9
- Librespot 20.0.130 Kodi HOT 5
- username/password authentication method broken, results in "bad credentials" error HOT 2
- Token error for some scopes HOT 12
- dropping truncated packet Warning
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from librespot.