07-04-2021, 10:00 PM
(07-04-2021, 09:27 PM)TheOldPresbyope Wrote:(07-04-2021, 06:13 PM)oculto Wrote: I can speak for myself only, because living in a 3rd world country, internet traffic and stability is still an issue… the cache solve my intermittent problems with Spotify. All my other files are local for the same reason (sd card).
Yup, it's a valid usage scenario. I'm curious. How much cache was needed to solve your problem and have you ever run the Ookla speed test or some similar test to see what kind of ping times and download speeds you get from your ISP?
Regards,
Kent
Let me be clear, I have a cable internet, witch is relatively fast (+100mb/s) but the problem is the intermittence. for streaming (spotify, netflix, etc) it is common some glitches, especially during the day (with i use spotify), at night is less frequently (netflix) but still under desirable (there is some problem with the sun, some kind of interference). For spotify i manually change the inc/playerlib.php around here:
$cmd = 'librespot' .
' --name "' . $_SESSION['spotifyname'] . '"' .
' --bitrate ' . $cfg_spotify['bitrate'] .
' --format ' . $cfg_spotify['format'] .
' --initial-volume ' . $cfg_spotify['initial_volume'] .
' --volume-ctrl ' . $cfg_spotify['volume_curve'] .
$volume_normalization .
$autoplay .
' --cache /var/local/www/spotify_cache --disable-audio-cache --backend alsa --device "' . $device . '"' . // audio file cache eats disk space
' --onevent /var/local/www/commandw/spotevent.sh' .
' > /dev/null 2>&1 &';
//' -v > /home/pi/librespot.txt 2>&1 &'; // For debug
to include the cache. but i didn't make the change for the 7.3.0 yet, i need to test the options first. for older versions i just check the permission on the /var/local/www/spotify_cache folder and remove --disable-audio-cache, but after every update i needed to do it again.
after a few weeks with a 128 SD card I could grow more than 72GB of cache from my playlists without any problem. Before moodeaudio i use raspotify with the same arguments... with a large SD Card the cache size wasn't a problem (for me). And i confirm after my tests that with the cache available, Spotify could play offline without any problem. and during the playtime there is almost no internet traffic (i believe some kind of authorization or authentication still needed)
with the new file cache management by librespot I believe i could save a few bucks using smaller sd cards and 20gb of space for cache, but i didn't test it yet.
and the most important thing: with the cache, the glitch is gone. intermittent signal is no longer a problem for songs. after the playlist first run, I can also repeat any time i want without internet traffic.