spotDL / spotify-downloader

Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
https://spotdl.readthedocs.io/en/latest/
MIT License
15.96k stars 1.51k forks source link

Freeze when downloading playlists and conversion stop #1381

Closed g4njawizard closed 2 years ago

g4njawizard commented 2 years ago

System OS

Linux

Python Version

3.8 (CPython)

Install Source

pip / PyPi

Install version / commit hash

3.8.0

Expected Behavior vs Actual Behavior

Hi everybody, first thanks for making this great tool!

When I try to download a playlist it wont reach 100% for Example I have 241 Songs, and it get stucks in the middle. Nothing happens. I cant CTRL+C. I have to kill the process manually. It even happens often that ffmpeg is freezing too when converting.. It then stucks @ 90%-95% Its not always freezing on the same spot, but even after restarting it, it freezes after a short while. First 153/242 = Freeze Then after 2nd try 53/98 Any idea what could cause this?

Steps to reproduce

Download playlist via snapd spotdl package

Traceback

There is none error since it just freezes.

Other details

No response

Silverarmor commented 2 years ago

ffmpeg -version and show pls

g4njawizard commented 2 years ago

ffmpeg version 4.4-5 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10 (Debian 10.2.1-6) configuration: --prefix=/usr --extra-version=5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 pip show: Name: spotdl Version: 3.8.0 Summary: Download your Spotify playlists and songs along with album art and metadata Home-page: https://github.com/spotDL/spotify-downloader Author: spotDL Team Author-email: spotdladmins@googlegroups.com License: MIT Location: /home/odin/.local/lib/python3.9/site-packages Requires: ytmusicapi, tqdm, requests, beautifulsoup4, pytube, rapidfuzz, spotipy, Unidecode, mutagen, yt-dlp, rich Required-by:

Silverarmor commented 2 years ago

Cannot repro on spotDL installed via pip. Can you send link(s) to the playlists youre having issues with

g4njawizard commented 2 years ago

https://open.spotify.com/playlist/6WPKLtPkHmCb68cKpgAoav\?si\=24e31d5e6af1478d

g4njawizard commented 2 years ago

Could u reproduce? I have the same problem on other lists. The last I tried has 419 tracks and it stopped after 19

Silverarmor commented 2 years ago

The link to the playlist above is malformed. It should be https://open.spotify.com/playlist/6WPKLtPkHmCb68cKpgAoav (It seems that the ? and = have an escape backslash (\) infront of them, which is breaking the link) I am running a test with this corrected link now.

Silverarmor commented 2 years ago

@g4njawizard I cannot repro, all 242 songs downloaded fine in that playlist

g4njawizard commented 2 years ago

Right after first try it stuck before it even started downloading Total 0/242 complete ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:-- My connection is pretty stable. No visible reconnects or errors on my routers log. 2nd try without having my firewall between router and PC - same result as before. Froze here: Total 61/242 complete ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 26% 0:09:59

I think I will try this on my raspberry to make sure, it's not my laptops fault. Strange behaviour. But I dont believe in a network connectivity problem. I personally think that it got something to do with converting 4 titles at once and switching again to download the next songs. Maybe downloading, converting a single track each time would be more stable. Like "if conversion finished and network available, go for the next title". But let me first check if my pi has the same problem.

Silverarmor commented 2 years ago

Can you try force reinstall? pip install -U --force spotdl

Silverarmor commented 2 years ago

Also searching and then downloading song by song would cause rate limit issues, we've tried all aspects.

You can see more at this discord message

g4njawizard commented 2 years ago

So.. I couldnt install it on Pi due to some package errors: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-TESvJm/lyricwikia/ I set up a Linux VM on my Unraid server and it worked. I gonna have to dig deeper why it didnt work properly on my notebook. Little sidenote. It seems that special characters can cause Taggings to break: Édith Piaf - No je ne regrette rien Error Tagging ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━━ 95% 0:00:01 Its the 3rd time I saw this

Trying another shorter playlist caused other different behaviours like permanent 'Download Started' state: Total 32/44 complete ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━ 77% 0:02:54 Mindbenderz - Another Galaxy - Original Mix Done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 Outsiders, Starlab (IN) - Crossing FX - Starlab Remix Done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 Cosmic Tone - Vibration of Energy Done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 Vini Vici, Astrix - Adhana Done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 Faders - Unite Done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 Circuit Breakers, Faders - Mariner 9 - Faders Remix Done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 Faders - Fractals Done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 X-Noize, Rexalted - Follow The Light Done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 Astrix - Deep Jungle Walk Error Tagging ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━ 95% 0:00:02 Mindbenderz - The Dark and the Light Error Tagging ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━ 95% 0:00:02 One Function - Ajna Done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 Astrix, Ilai - Vicious Cycles - Ilai Remix Done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 Lyktum - Midnight Drums - Original Mix Download Started ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:-- Cathar - The Source Download Started ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:-- E-Clip, Divination - Endless Symphony - Divination Remix Download Started ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:-- Kristallklar - Gears of Existence Download Started ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:-- Koi Boi - The Music Makers Download Started ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:-- Liquid Soul, Vini Vici - Universe Inside Me Download Started ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:-- Captain Hook, Astrix - Bungee Jump Download Started ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:-- Symphonix, Venes - Sexy Dance - DJ Fabio, Moon Remix Download Started ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:-- Symphonix, Venes - True Reality - Interactive Noise Remix Download Started ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:-- Fabio Fusco, Moon - Emotionally Unplugged Download Started ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:-- Fabio Fusco, Moon - Ragga Jungle Done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 Nervertheless, it seems to work this way. But thanks for taking time helping and digging into this issue. I have to figure out why it causes so much trouble on my workstation.